2025-05-11 11:50:01 +03:30
|
|
|
import 'package:flutter/material.dart';
|
2025-05-19 16:16:33 +03:30
|
|
|
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
|
|
|
|
import 'package:rasadyar_core/core.dart';
|
2025-05-11 11:50:01 +03:30
|
|
|
|
|
|
|
|
import 'logic.dart';
|
|
|
|
|
|
|
|
|
|
class ModulesPage extends GetView<ModulesLogic> {
|
|
|
|
|
const ModulesPage({super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
2025-05-19 16:16:33 +03:30
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: Text(
|
|
|
|
|
'انتخاب سامانه',
|
|
|
|
|
style: AppFonts.yekan18.copyWith(color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
backgroundColor: AppColor.blueNormal,
|
|
|
|
|
),
|
|
|
|
|
body: GridView.builder(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 20),
|
2025-05-11 11:50:01 +03:30
|
|
|
|
2025-05-19 16:16:33 +03:30
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
final module = controller.moduleList[index];
|
|
|
|
|
return CardIcon(
|
|
|
|
|
title: module.title,
|
|
|
|
|
icon: module.icon,
|
|
|
|
|
onTap: () {
|
|
|
|
|
controller.selectedIndex.value = index;
|
|
|
|
|
Get.toNamed(AuthPaths.auth, arguments: module.module);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
),
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
itemCount: controller.moduleList.length,
|
|
|
|
|
),
|
|
|
|
|
);
|
2025-05-11 11:50:01 +03:30
|
|
|
}
|
|
|
|
|
}
|