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