feat: splash page done

This commit is contained in:
jahongireshonqulov
2025-10-31 12:29:30 +05:00
parent ab1ac6e6fa
commit 077ea23416
229 changed files with 3187 additions and 13517 deletions

View File

@@ -1,46 +0,0 @@
import '../../../../../food_delivery_client.dart';
class MainPage extends StatelessWidget with MainPageMixin {
MainPage({super.key});
@override
Widget build(BuildContext context) {
final List<String> labels = [
context.loc.home,
context.loc.browse,
context.loc.baskets,
context.loc.account,
];
return BlocProvider(
create: (context) => sl<MainBloc>(),
child: BlocBuilder<MainBloc, MainState>(
builder: (context, state) {
return Scaffold(
body: IndexedStack(
index: state.currentIndex,
sizing: StackFit.expand,
alignment: AlignmentGeometry.center,
children: pages,
),
bottomNavigationBar: BottomNavigationBar(
onTap: (value) {
context.read<MainBloc>().add(MainEvent.loaded(value));
},
currentIndex: state.currentIndex,
items: List.generate(
defaultIcons.length,
(index) => BottomNavigationBarItem(
icon: defaultIcons[index].paddingOnly(bottom: 4.85),
activeIcon: activeIcons[index].paddingOnly(bottom: 4.85),
label: labels[index],
tooltip: labels[index],
backgroundColor: AppColors.cFFFFFF,
),
),
),
);
},
),
);
}
}