145 lines
5.5 KiB
Dart
145 lines
5.5 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:rasadyar_core/core.dart';
|
|
|
|
import 'logic.dart';
|
|
|
|
class ModulesPage extends GetView<ModulesLogic> {
|
|
const ModulesPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
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,
|
|
),
|
|
body: Stack(
|
|
fit: StackFit.expand,
|
|
alignment: Alignment.center,
|
|
children: [
|
|
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,
|
|
),
|
|
),
|
|
|
|
Container(
|
|
height: 107.h,
|
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
padding: EdgeInsets.fromLTRB(11.w, 8.h, 8.w, 12.h),
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment(0.00, 0.50),
|
|
end: Alignment(1.00, 0.50),
|
|
colors: [const Color(0xFFC9D5FF), Colors.white],
|
|
),
|
|
borderRadius: BorderRadius.circular(8),
|
|
border: Border.all(width: 1.w, color: const Color(0xFFD3D3D3)),
|
|
),
|
|
child: Row(
|
|
spacing: 11.w,
|
|
children: [
|
|
Expanded(
|
|
flex: 2,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'آخرین اخبار ',
|
|
textAlign: TextAlign.right,
|
|
style: AppFonts.yekan16.copyWith(
|
|
color: Color(0xFF5B5B5B),
|
|
height: 1.90,
|
|
),
|
|
),
|
|
Text(
|
|
'اخبار مربوط به جوجه ریزی استان از آخرین روند مطلع شوید اخبار مربوط به جوجه ریزی استان از ',
|
|
maxLines: 2,
|
|
|
|
style: AppFonts.yekan12.copyWith(
|
|
color: Color(0xFF5B5B5B),
|
|
height: 1.5,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Column(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
Container(
|
|
width: 103.w,
|
|
height: 24.h,
|
|
alignment: Alignment.center,
|
|
decoration: ShapeDecoration(
|
|
color: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(50.r),
|
|
),
|
|
),
|
|
child: Text(
|
|
'اطلاعات بیشتر',
|
|
textAlign: TextAlign.right,
|
|
style: AppFonts.yekan14,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
SizedBox(height: 12.h),
|
|
SliderWidget(height: 160, widgetTag: "down"),
|
|
SizedBox(height: 20.h),
|
|
],
|
|
),
|
|
),
|
|
ObxValue((loading) {
|
|
if (!controller.isLoading.value) return SizedBox.shrink();
|
|
return Container(
|
|
color: Colors.grey.withValues(alpha: 0.5),
|
|
child: Center(
|
|
child: CupertinoActivityIndicator(color: AppColor.greenNormal, radius: 30),
|
|
),
|
|
);
|
|
}, controller.isLoading),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|