mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00

- Added ProfileTab widget for displaying user profile information in a tab. - Added ProfileView widget for displaying user profile details in a separate view.
46 lines
1.5 KiB
Dart
46 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_app/features/menu/view/widgets/menu_list_divider.dart';
|
|
import 'package:syncrow_app/features/menu/view/widgets/menu_list_item.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
|
|
|
class MenuList extends StatelessWidget {
|
|
const MenuList({
|
|
super.key,
|
|
required this.section,
|
|
});
|
|
|
|
final Map<String, dynamic> section;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
const SizedBox(height: 5),
|
|
BodySmall(
|
|
text: section['title'] as String,
|
|
),
|
|
const SizedBox(height: 5),
|
|
DefaultContainer(
|
|
child: ListView.separated(
|
|
shrinkWrap: true,
|
|
padding: const EdgeInsets.all(0),
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
itemCount: section['buttons'].length,
|
|
itemBuilder: (context, index) {
|
|
return MenuListItem(
|
|
title: section['buttons'][index]['title'] as String,
|
|
icon: section['buttons'][index]['Icon'] as String,
|
|
page: section['buttons'][index]['page'] as Widget?,
|
|
color: section['color'],
|
|
);
|
|
},
|
|
separatorBuilder: (context, index) => const MenuListDivider()),
|
|
),
|
|
const SizedBox(height: 5),
|
|
],
|
|
);
|
|
}
|
|
}
|