feat: new ui changes
This commit is contained in:
@@ -107,4 +107,10 @@ class FarmLogic extends GetxController {
|
||||
void toggleExpanded(int index) {
|
||||
expandedIndex.value = expandedIndex.value == index ? -1 : index;
|
||||
}
|
||||
|
||||
Future<void> onRefresh() async {
|
||||
currentPage.value = 1;
|
||||
farmList.value = Resource<PaginationModel<PoultryFarm>>.loading();
|
||||
await getFarmList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/label_item.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -16,6 +15,7 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
return ChickenBasePage(
|
||||
hasFilter: false,
|
||||
hasSearch: true,
|
||||
onRefresh: controller.onRefresh,
|
||||
onFilterTap: () {
|
||||
Get.bottomSheet(
|
||||
isScrollControlled: true,
|
||||
@@ -29,7 +29,7 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
},
|
||||
routes: controller.routes,
|
||||
backId: poultryFirstKey,
|
||||
widgets: [firstTagInformation(), farmListWidget()],
|
||||
child: Column(children: [firstTagInformation(), farmListWidget()]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -76,10 +76,7 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
itemCount: data.value.data?.results?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async => controller.getFarmList(true),
|
||||
onRefresh: () async {
|
||||
controller.currentPage.value = 1;
|
||||
await controller.getFarmList();
|
||||
},
|
||||
|
||||
);
|
||||
}, controller.farmList),
|
||||
);
|
||||
@@ -153,7 +150,7 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
buildRow(
|
||||
title: 'جوجه ریزی فعال (تعداد دوره) ',
|
||||
value:
|
||||
'${(item.hatchingInfo?.activeHatching ?? false) ? 'دارد' : 'ندارد'} (${item.hatchingInfo?.period ?? 0})',
|
||||
'${(item.hatchingInfo?.activeHatching ?? false) ? 'دارد' : 'ندارد'} (${item.hatchingInfo?.period ?? 0})',
|
||||
),
|
||||
|
||||
/* buildRow(
|
||||
|
||||
Reference in New Issue
Block a user