Co-authored-by: MENDOZA BALLARDO GAEL RICARDO <gael-meb123@users.noreply.github.com>
Co-authored-by: Azareth-Tr <Azareth-Tr@users.noreply.github.com> Co-authored-by: eddgranados12 <eddgranados12@users.noreply.github.com> implementacion de login, vistas, correcion de errores en vista registro, domicilios
This commit is contained in:
50
recolecta_app/lib/features/admin/admin_shell.dart
Normal file
50
recolecta_app/lib/features/admin/admin_shell.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class AdminShell extends StatefulWidget {
|
||||
const AdminShell({super.key, required this.child});
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
State<AdminShell> createState() => _AdminShellState();
|
||||
}
|
||||
|
||||
class _AdminShellState extends State<AdminShell> {
|
||||
int _currentIndex = 0;
|
||||
|
||||
void _onTap(int index) {
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
switch (index) {
|
||||
case 0:
|
||||
context.go('/admin');
|
||||
break;
|
||||
case 1:
|
||||
// Placeholder for future routes
|
||||
break;
|
||||
case 2:
|
||||
// Placeholder for future routes
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: widget.child,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
currentIndex: _currentIndex,
|
||||
onTap: _onTap,
|
||||
items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.dashboard),
|
||||
label: 'Dashboard',
|
||||
),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.route), label: 'Rutas'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Choferes'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user