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
36 lines
870 B
Dart
36 lines
870 B
Dart
import 'package:flutter/material.dart';
|
|
import '../../core/widgets/app_widgets.dart';
|
|
import '../eta/eta_screen.dart';
|
|
import '../alerts/alerts_screen.dart';
|
|
import 'house_screen.dart';
|
|
import '../profile/profile_screen.dart';
|
|
|
|
class MainShell extends StatefulWidget {
|
|
const MainShell({super.key});
|
|
|
|
@override
|
|
State<MainShell> createState() => _MainShellState();
|
|
}
|
|
|
|
class _MainShellState extends State<MainShell> {
|
|
int _currentIndex = 0;
|
|
|
|
static const List<Widget> _screens = [
|
|
EtaScreen(),
|
|
AlertsScreen(),
|
|
MyHouseScreen(),
|
|
ProfileScreen(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: IndexedStack(index: _currentIndex, children: _screens),
|
|
bottomNavigationBar: AppBottomNav(
|
|
currentIndex: _currentIndex,
|
|
onTap: (i) => setState(() => _currentIndex = i),
|
|
),
|
|
);
|
|
}
|
|
}
|