mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 20:24:55 +00:00
initialized menu page
This commit is contained in:
@ -1,12 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/menu_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/view/widgets/menu_list.dart';
|
||||
|
||||
class MenuView extends StatelessWidget {
|
||||
const MenuView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text('Menu View'),
|
||||
return BlocProvider(
|
||||
create: (BuildContext context) => MenuCubit(),
|
||||
child: BlocBuilder<MenuCubit, MenuState>(
|
||||
builder: (context, state) {
|
||||
return SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
children: MenuCubit.of(context)
|
||||
.menuLists
|
||||
.map((list) => MenuList(listModel: list))
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user