feat: new ui changes
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
||||
@@ -16,9 +14,11 @@ class HomeLogic extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
getGeneralBarsInformation();
|
||||
getTodayBars();
|
||||
getDistributionInformation();
|
||||
refreshData();
|
||||
}
|
||||
|
||||
Future<void> refreshData() async {
|
||||
await Future.wait([getGeneralBarsInformation(), getTodayBars(), getDistributionInformation()]);
|
||||
}
|
||||
|
||||
Future<void> getGeneralBarsInformation() async {
|
||||
|
||||
@@ -16,13 +16,16 @@ class HomePage extends GetView<HomeLogic> {
|
||||
return ChickenBasePage(
|
||||
scrollable: true,
|
||||
isBase: true,
|
||||
widgets: [
|
||||
SizedBox(height: 8.h),
|
||||
mainInformation(),
|
||||
SizedBox(height: 8.h),
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
onRefresh: controller.refreshData,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 18.h),
|
||||
mainInformation(),
|
||||
SizedBox(height: 8.h),
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user