Commit 78e21345 by Nayeli Monserrat Velasco Lopez

Merge branch 'nayeli.velasco' into 'master'

UI home con boton See merge request !5
parents 6e12581b cf5c4977
......@@ -24,6 +24,16 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> {
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<HomePage> {
Navigator.pop(context); // Close the drawer
},
),
ListTile(
leading: const Icon(Icons.settings),
title: const Text('Configuraciones'),
......@@ -91,7 +100,23 @@ class _HomePageState extends State<HomePage> {
),
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')),
],
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment