refactor : base page
This commit is contained in:
@@ -11,11 +11,13 @@ class ActiveHatchingPage extends GetView<ActiveHatchingLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BasePage(
|
||||
return ChickenBasePage(
|
||||
hasSearch: false,
|
||||
hasFilter: false,
|
||||
routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
backId: poultryFirstKey,
|
||||
|
||||
//routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/base_page/widgets/back_ground_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -13,18 +11,13 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BasePage(
|
||||
return ChickenBasePage(
|
||||
hasFilter: false,
|
||||
hasSearch: false,
|
||||
isBase: true,
|
||||
routes: [],
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(child: chickenBackground()),
|
||||
Positioned.fill(child: Column(children: [firstTagInformation(), farmListWidget()])),
|
||||
],
|
||||
),
|
||||
backId: poultryFirstKey,
|
||||
widgets: [firstTagInformation(), farmListWidget()],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -83,7 +76,10 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
Container itemListExpandedWidget(PoultryFarm item) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
@@ -132,10 +128,19 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
),
|
||||
),
|
||||
|
||||
buildRow(title: 'مالک/ تلفن', value: '${item.user?.fullname} (${item.user?.mobile})'),
|
||||
buildRow(
|
||||
title: 'مالک/ تلفن',
|
||||
value: '${item.user?.fullname} (${item.user?.mobile})',
|
||||
),
|
||||
buildRow(title: 'شناسه یکتا', value: item.breedingUniqueId ?? 'N/A'),
|
||||
buildRow(title: 'کد اپیدمیولوژیک', value: item.epidemiologicalCode ?? 'N/A'),
|
||||
buildRow(title: 'کد بهداشتی', value: item.healthCertificateNumber ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'کد اپیدمیولوژیک',
|
||||
value: item.epidemiologicalCode ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
title: 'کد بهداشتی',
|
||||
value: item.healthCertificateNumber ?? 'N/A',
|
||||
),
|
||||
buildRow(
|
||||
title: 'دامپزشک فارم',
|
||||
value: '${item.vetFarm?.fullName} (${item.vetFarm?.mobile ?? '-'})',
|
||||
|
||||
@@ -14,16 +14,16 @@ class GenocidePage extends GetView<GenocideLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BasePage(
|
||||
routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
return ChickenBasePage(
|
||||
routes:controller.routesName,
|
||||
hasSearch: true,
|
||||
hasFilter: true,
|
||||
onSearchChanged: (data) {
|
||||
controller.searchedValue.value = data;
|
||||
controller.getPoultryOrderList();
|
||||
},
|
||||
backId: poultryFirstKey,
|
||||
filteringWidget: filterBottomSheet(),
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user