fix : some ui bug
This commit is contained in:
@@ -48,7 +48,9 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.checkSquareSvg.path,
|
||||
labelIcon: item.reportInfo?.image == false
|
||||
? Assets.vec.timerSvg.path
|
||||
: Assets.vec.checkSquareSvg.path,
|
||||
);
|
||||
}, controller.expandedIndex);
|
||||
},
|
||||
@@ -340,7 +342,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
index: index,
|
||||
child: itemListWidgetReport(item),
|
||||
secondChild: itemListExpandedWidgetReport(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelColor: AppColor.greenLight,
|
||||
labelIcon: Assets.vec.checkSquareSvg.path,
|
||||
);
|
||||
}, controller.expandedIndex);
|
||||
@@ -484,7 +486,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 3,
|
||||
spacing: 5,
|
||||
children: [
|
||||
Text(
|
||||
item.poultry?.user?.fullname ?? 'N/A',
|
||||
@@ -502,19 +504,19 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Column(
|
||||
spacing: 3,
|
||||
spacing: 5,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
item.poultry?.unitName ?? 'N/Aaq',
|
||||
textAlign: TextAlign.start,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Text(
|
||||
item.poultry?.licenceNumber ?? 'N/A',
|
||||
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(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 3,
|
||||
spacing: 5,
|
||||
children: [
|
||||
Text(
|
||||
item.hatching?.poultry?.fullname ?? 'N/A',
|
||||
@@ -559,19 +561,19 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Column(
|
||||
spacing: 3,
|
||||
spacing: 5,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
item.hatching?.poultry?.unitName ?? 'N/Aaq',
|
||||
textAlign: TextAlign.start,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Text(
|
||||
item.hatching?.licenceNumber ?? 'N/A',
|
||||
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}) {
|
||||
|
||||
return Container(
|
||||
height: 250,
|
||||
color: Colors.white,
|
||||
|
||||
@@ -2,11 +2,19 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class EmptyWidget extends StatelessWidget {
|
||||
const EmptyWidget({super.key});
|
||||
const EmptyWidget({super.key, this.onRefresh});
|
||||
|
||||
final RefreshCallback? onRefresh;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
return RefreshIndicator(
|
||||
onRefresh: onRefresh?? () async {},
|
||||
child: SingleChildScrollView(
|
||||
physics: AlwaysScrollableScrollPhysics(),
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height/1.5,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@@ -14,6 +22,9 @@ class EmptyWidget extends StatelessWidget {
|
||||
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: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 75,
|
||||
height: 50.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
@@ -63,8 +63,8 @@ class ExpandableListItem2 extends StatelessWidget {
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 20,
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
width: 16.w,
|
||||
|
||||
@@ -55,7 +55,7 @@ class RPaginatedListView<T> extends StatelessWidget {
|
||||
}
|
||||
|
||||
if (resource.isEmpty || resource.data?.results?.isEmpty == true) {
|
||||
return emptyWidget ?? const EmptyWidget();
|
||||
return emptyWidget ?? EmptyWidget(onRefresh: onRefresh);
|
||||
}
|
||||
|
||||
final controller = scrollController ?? ScrollController();
|
||||
|
||||
Reference in New Issue
Block a user