mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 10:35:10 +00:00
34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
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';
|
|
import 'package:syncrow_app/features/menu/view/widgets/profile_tab.dart';
|
|
|
|
class MenuView extends StatelessWidget {
|
|
const MenuView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (BuildContext context) => MenuCubit(),
|
|
child: BlocBuilder<MenuCubit, MenuState>(
|
|
builder: (context, state) {
|
|
return SingleChildScrollView(
|
|
physics: const BouncingScrollPhysics(),
|
|
child: Column(
|
|
children: [
|
|
const ProfileTab(),
|
|
...MenuCubit.of(context).menuLists.map(
|
|
(list) => MenuList(
|
|
listModel: list,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|