feat : module page
This commit is contained in:
@@ -11,7 +11,13 @@ class ModulesPage extends GetView<ModulesLogic> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('انتخاب سامانه', style: AppFonts.yekan18.copyWith(color: Colors.white)),
|
||||
title: Row(
|
||||
spacing: 5.w,
|
||||
children: [
|
||||
Text('سامانه جامع رصدیار', style: AppFonts.yekan18Bold.copyWith(color: Colors.white)),
|
||||
Assets.logos.finalLogo.image(width: 40.w, height: 40.h),
|
||||
],
|
||||
),
|
||||
centerTitle: true,
|
||||
backgroundColor: AppColor.blueNormal,
|
||||
),
|
||||
@@ -19,23 +25,40 @@ class ModulesPage extends GetView<ModulesLogic> {
|
||||
fit: StackFit.expand,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
GridView.builder(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 20),
|
||||
itemBuilder: (context, index) {
|
||||
final module = controller.moduleList[index];
|
||||
return CardIcon(
|
||||
title: module.title,
|
||||
icon: module.icon,
|
||||
onTap: () => controller.onTapCard(module.module, index),
|
||||
);
|
||||
},
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 10,
|
||||
crossAxisSpacing: 10,
|
||||
Positioned.fill(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 24.h),
|
||||
SliderWidget(widgetTag: "up"),
|
||||
|
||||
Expanded(
|
||||
child: GridView.builder(
|
||||
padding: EdgeInsets.symmetric(horizontal: 25.w, vertical: 24.h),
|
||||
itemBuilder: (context, index) {
|
||||
final module = controller.moduleList[index];
|
||||
return CardIcon(
|
||||
title: module.title,
|
||||
icon: module.icon,
|
||||
borderColor: module.borderColor,
|
||||
backgroundColor: module.backgroundColor,
|
||||
titleColor: module.titleColor,
|
||||
onTap: () => controller.onTapCard(module.module, index),
|
||||
);
|
||||
},
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 24.h,
|
||||
crossAxisSpacing: 16.w,
|
||||
),
|
||||
physics: BouncingScrollPhysics(),
|
||||
itemCount: controller.moduleList.length,
|
||||
),
|
||||
),
|
||||
|
||||
SliderWidget(height: 160, widgetTag: "down"),
|
||||
SizedBox(height: 30.h),
|
||||
],
|
||||
),
|
||||
physics: BouncingScrollPhysics(),
|
||||
itemCount: controller.moduleList.length,
|
||||
),
|
||||
ObxValue((loading) {
|
||||
if (!controller.isLoading.value) return SizedBox.shrink();
|
||||
|
||||
Reference in New Issue
Block a user