feat : Page Route Widget

This commit is contained in:
2025-06-30 09:33:14 +03:30
parent 443b9f489c
commit 7cec6bd084
2 changed files with 184 additions and 175 deletions

View File

@@ -15,15 +15,10 @@ class HomePage extends GetView<HomeLogic> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.bgLight,
appBar: chickenAppBar(
hasBack: false,
hasFilter: false,
hasSearch: false
),
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false),
body: Column(
spacing: 8,
children: [
InkWell(
onTap: () {
controller.isExpanded.value = !controller.isExpanded.value;
@@ -36,8 +31,10 @@ class HomePage extends GetView<HomeLogic> {
),
child: ObxValue((data) {
return AnimatedSize(duration: Duration(milliseconds: 300),
child: data.value ? Padding(
return AnimatedSize(
duration: Duration(milliseconds: 300),
child: data.value
? Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -51,7 +48,9 @@ class HomePage extends GetView<HomeLogic> {
height: 40,
decoration: ShapeDecoration(
image: DecorationImage(
image: AssetImage(Assets.images.chicken.path), fit: BoxFit.cover),
image: AssetImage(Assets.images.chicken.path),
fit: BoxFit.cover,
),
shape: RoundedRectangleBorder(
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
borderRadius: BorderRadius.circular(4),
@@ -89,7 +88,8 @@ class HomePage extends GetView<HomeLogic> {
distributionInformationWidget(),
],
),
) : Padding(
)
: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -103,7 +103,9 @@ class HomePage extends GetView<HomeLogic> {
height: 40,
decoration: ShapeDecoration(
image: DecorationImage(
image: AssetImage(Assets.images.chicken.path), fit: BoxFit.cover),
image: AssetImage(Assets.images.chicken.path),
fit: BoxFit.cover,
),
shape: RoundedRectangleBorder(
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
borderRadius: BorderRadius.circular(4),
@@ -122,10 +124,10 @@ class HomePage extends GetView<HomeLogic> {
],
),
),
);
}, controller.isExpanded),
)),
),
),
Padding(
padding: EdgeInsetsGeometry.all(6),
@@ -539,7 +541,8 @@ class HomePage extends GetView<HomeLogic> {
),
Text(title, style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal)),
],
));
),
);
}
Widget addWidelyUsed({required VoidCallback onTap}) {

View File

@@ -0,0 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:rasadyar_core/core.dart';
Text buildPageRoute(List<String> route) {
return Text(route.isEmpty ? 'خانه' : route.join("/"), style: AppFonts.yekan14.copyWith(color: AppColor.bgDark));
}