import 'package:flutter/material.dart'; import 'package:primer_practica/src/pages/category/lista_categorias.dart'; class HomePage extends StatelessWidget { const HomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Home'), backgroundColor: Colors.blue, actions: [ IconButton( icon: const Icon(Icons.search), onPressed: () { // Acción de búsqueda }, ) ], ), drawer: Drawer( child: ListView( padding: EdgeInsets.zero, children: [ const DrawerHeader( decoration: BoxDecoration( color: Colors.blue, ), child: Text('Menu'), ), ListTile( title: const Text('Configuraciones'), ), ListTile( title: const Text('Ayuda'), ), ListTile( title: const Text('Exit'), ), ], ), ), body: ListaCategorias(), floatingActionButton: FloatingActionButton( onPressed: () { Navigator.pushNamed(context, 'formulario'); }, child: const Icon(Icons.add), tooltip: 'Agregar categoria', ), floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, ); } }