diff --git a/lib/src/pages/home_page.dart b/lib/src/pages/home_page.dart index fa4152f..a9cd8c0 100644 --- a/lib/src/pages/home_page.dart +++ b/lib/src/pages/home_page.dart @@ -24,6 +24,16 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { String selectedPage = ''; + void _handleNewCategory() { + // Define la acción que debe ocurrir cuando se presiona el botón "Nueva categoria" + setState(() { + selectedPage = 'Nueva categoria'; + }); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Nueva categoria presionada')), + ); + } + @override Widget build(BuildContext context) { return DefaultTabController( @@ -75,7 +85,6 @@ class _HomePageState extends State { Navigator.pop(context); // Close the drawer }, ), - ListTile( leading: const Icon(Icons.settings), title: const Text('Configuraciones'), @@ -91,7 +100,23 @@ class _HomePageState extends State { ), body: TabBarView( children: [ - Center(child: Text('Tab 1 Contenido')), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Center( + + ), + ), + Padding( + padding: const EdgeInsets.all(50.0), + child: ElevatedButton( + onPressed: _handleNewCategory, + child: const Text('Nueva categoria'), + ), + ), + ], + ), Center(child: Text('Tab 2 Contenido')), ], ),