App Flutter 2.11 para vendedores de ruta de Telcotronics. Incluye ruta del día con mapa custom, catálogo, pedidos CRUD, firma digital, scanner QR/barcode, selector de clientes escalable, notificaciones in-app y soporte multiplataforma (Android + Linux desktop). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
79 lines
2.3 KiB
Dart
79 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../theme/app_theme.dart';
|
|
import 'home/home_screen.dart';
|
|
import 'rutas/rutas_screen.dart';
|
|
import 'pedidos/pedidos_screen.dart';
|
|
import 'catalogo/catalogo_screen.dart';
|
|
import 'perfil/perfil_screen.dart';
|
|
|
|
class MainShell extends StatefulWidget {
|
|
const MainShell({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<MainShell> createState() => _MainShellState();
|
|
}
|
|
|
|
class _MainShellState extends State<MainShell> {
|
|
int _currentIndex = 0;
|
|
|
|
final _screens = const [
|
|
HomeScreen(),
|
|
RutasScreen(),
|
|
PedidosScreen(),
|
|
CatalogoScreen(),
|
|
PerfilScreen(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: IndexedStack(
|
|
index: _currentIndex,
|
|
children: _screens,
|
|
),
|
|
bottomNavigationBar: Container(
|
|
decoration: const BoxDecoration(
|
|
boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 10, offset: Offset(0, -2))],
|
|
),
|
|
child: BottomNavigationBar(
|
|
currentIndex: _currentIndex,
|
|
onTap: (i) => setState(() => _currentIndex = i),
|
|
type: BottomNavigationBarType.fixed,
|
|
backgroundColor: Colors.white,
|
|
selectedItemColor: AppTheme.primaryColor,
|
|
unselectedItemColor: const Color(0xFF94A3B8),
|
|
selectedFontSize: 11,
|
|
unselectedFontSize: 11,
|
|
items: const [
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.home_outlined),
|
|
activeIcon: Icon(Icons.home_rounded),
|
|
label: 'Inicio',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.route_outlined),
|
|
activeIcon: Icon(Icons.route_rounded),
|
|
label: 'Mi Ruta',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.receipt_long_outlined),
|
|
activeIcon: Icon(Icons.receipt_long_rounded),
|
|
label: 'Pedidos',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.inventory_2_outlined),
|
|
activeIcon: Icon(Icons.inventory_2_rounded),
|
|
label: 'Catálogo',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.person_outline_rounded),
|
|
activeIcon: Icon(Icons.person_rounded),
|
|
label: 'Perfil',
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|