mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
43 lines
1.4 KiB
Dart
43 lines
1.4 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';
|
|
import 'package:syncrow_app/utils/resource_manager/constants.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 Padding(
|
|
padding: EdgeInsets.only(
|
|
top: Constants.appBarHeight,
|
|
bottom: Constants.bottomNavBarHeight,
|
|
left: Constants.defaultPadding,
|
|
right: Constants.defaultPadding,
|
|
),
|
|
child: SingleChildScrollView(
|
|
physics: const BouncingScrollPhysics(),
|
|
child: Column(
|
|
children: [
|
|
const ProfileTab(),
|
|
...MenuCubit.of(context).menuLists.map(
|
|
(list) => MenuList(
|
|
listModel: list,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|