fix : some ui bug

This commit is contained in:
2025-09-20 15:23:58 +03:30
parent 78a426029b
commit 0fc82c8eb9
5 changed files with 37 additions and 25 deletions

View File

@@ -51,7 +51,6 @@ GestureDetector dateFilterWidget({
}
Container modalDatePicker({required ValueChanged<Jalali> onDateSelected, Jalali? initialDate}) {
return Container(
height: 250,
color: Colors.white,
@@ -92,7 +91,7 @@ Container modalDatePicker({required ValueChanged<Jalali> onDateSelected, Jalali?
initialDateTime: initialDate ?? Jalali.now(),
mode: PersianCupertinoDatePickerMode.date,
onDateTimeChanged: (dateTime) {
initialDate = dateTime;
initialDate = dateTime;
},
),
),

View File

@@ -2,18 +2,29 @@ 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(
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)),
],
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: [
Row(),
Assets.vec.emptySvg.svg(width: 170.w, height: 170.h),
Text('داده ای یافت نشد!', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
],
),
),
),
);
}
}

View File

@@ -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,

View File

@@ -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();