fix : some ui bug
This commit is contained in:
@@ -48,7 +48,9 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
child: itemListWidget(item),
|
child: itemListWidget(item),
|
||||||
secondChild: itemListExpandedWidget(item),
|
secondChild: itemListExpandedWidget(item),
|
||||||
labelColor: AppColor.blueLight,
|
labelColor: AppColor.blueLight,
|
||||||
labelIcon: Assets.vec.checkSquareSvg.path,
|
labelIcon: item.reportInfo?.image == false
|
||||||
|
? Assets.vec.timerSvg.path
|
||||||
|
: Assets.vec.checkSquareSvg.path,
|
||||||
);
|
);
|
||||||
}, controller.expandedIndex);
|
}, controller.expandedIndex);
|
||||||
},
|
},
|
||||||
@@ -340,7 +342,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
index: index,
|
index: index,
|
||||||
child: itemListWidgetReport(item),
|
child: itemListWidgetReport(item),
|
||||||
secondChild: itemListExpandedWidgetReport(item),
|
secondChild: itemListExpandedWidgetReport(item),
|
||||||
labelColor: AppColor.blueLight,
|
labelColor: AppColor.greenLight,
|
||||||
labelIcon: Assets.vec.checkSquareSvg.path,
|
labelIcon: Assets.vec.checkSquareSvg.path,
|
||||||
);
|
);
|
||||||
}, controller.expandedIndex);
|
}, controller.expandedIndex);
|
||||||
@@ -484,7 +486,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
spacing: 3,
|
spacing: 5,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.poultry?.user?.fullname ?? 'N/A',
|
item.poultry?.user?.fullname ?? 'N/A',
|
||||||
@@ -502,19 +504,19 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 3,
|
spacing: 5,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.poultry?.unitName ?? 'N/Aaq',
|
item.poultry?.unitName ?? 'N/Aaq',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.poultry?.licenceNumber ?? 'N/A',
|
item.poultry?.licenceNumber ?? 'N/A',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -541,7 +543,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
spacing: 3,
|
spacing: 5,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.hatching?.poultry?.fullname ?? 'N/A',
|
item.hatching?.poultry?.fullname ?? 'N/A',
|
||||||
@@ -559,19 +561,19 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 3,
|
spacing: 5,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.hatching?.poultry?.unitName ?? 'N/Aaq',
|
item.hatching?.poultry?.unitName ?? 'N/Aaq',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.hatching?.licenceNumber ?? 'N/A',
|
item.hatching?.licenceNumber ?? 'N/A',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ GestureDetector dateFilterWidget({
|
|||||||
}
|
}
|
||||||
|
|
||||||
Container modalDatePicker({required ValueChanged<Jalali> onDateSelected, Jalali? initialDate}) {
|
Container modalDatePicker({required ValueChanged<Jalali> onDateSelected, Jalali? initialDate}) {
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: 250,
|
height: 250,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -92,7 +91,7 @@ Container modalDatePicker({required ValueChanged<Jalali> onDateSelected, Jalali?
|
|||||||
initialDateTime: initialDate ?? Jalali.now(),
|
initialDateTime: initialDate ?? Jalali.now(),
|
||||||
mode: PersianCupertinoDatePickerMode.date,
|
mode: PersianCupertinoDatePickerMode.date,
|
||||||
onDateTimeChanged: (dateTime) {
|
onDateTimeChanged: (dateTime) {
|
||||||
initialDate = dateTime;
|
initialDate = dateTime;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,18 +2,29 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class EmptyWidget extends StatelessWidget {
|
class EmptyWidget extends StatelessWidget {
|
||||||
const EmptyWidget({super.key});
|
const EmptyWidget({super.key, this.onRefresh});
|
||||||
|
|
||||||
|
final RefreshCallback? onRefresh;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return RefreshIndicator(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
onRefresh: onRefresh?? () async {},
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: SingleChildScrollView(
|
||||||
children: [
|
physics: AlwaysScrollableScrollPhysics(),
|
||||||
Row(),
|
child: SizedBox(
|
||||||
Assets.vec.emptySvg.svg(width: 170.w,height: 170.h),
|
height: MediaQuery.of(context).size.height/1.5,
|
||||||
Text('داده ای یافت نشد!', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
|
child: Column(
|
||||||
],
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(),
|
||||||
|
Assets.vec.emptySvg.svg(width: 170.w, height: 170.h),
|
||||||
|
Text('داده ای یافت نشد!', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ExpandableListItem2 extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 75,
|
height: 50.h,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@@ -63,8 +63,8 @@ class ExpandableListItem2 extends StatelessWidget {
|
|||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
SizedBox(
|
||||||
width: 20,
|
width: 20.w,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SvgGenImage.vec(labelIcon).svg(
|
child: SvgGenImage.vec(labelIcon).svg(
|
||||||
width: 16.w,
|
width: 16.w,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class RPaginatedListView<T> extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resource.isEmpty || resource.data?.results?.isEmpty == true) {
|
if (resource.isEmpty || resource.data?.results?.isEmpty == true) {
|
||||||
return emptyWidget ?? const EmptyWidget();
|
return emptyWidget ?? EmptyWidget(onRefresh: onRefresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
final controller = scrollController ?? ScrollController();
|
final controller = scrollController ?? ScrollController();
|
||||||
|
|||||||
Reference in New Issue
Block a user