feat : list view item in out of the province
This commit is contained in:
@@ -361,8 +361,10 @@ class AppColor {
|
||||
|
||||
|
||||
static const Color bgLight = Color(0xFFF5F5F5); // #083940 rgb(8, 57, 64)
|
||||
static const Color bgIcon = Color(0xFF797979); // #797979
|
||||
static const Color bgDark = Color(0xFF979797); // #083940 rgb(8, 57, 64)
|
||||
static const Color textColor = Color(0xFF5B5B5B); // #083940 rgb(8, 57, 64)
|
||||
static const Color textColorLight = Color(0xFFB2B2B2);
|
||||
|
||||
//endregion
|
||||
|
||||
|
||||
@@ -16,11 +16,14 @@ import 'package:vector_graphics/vector_graphics.dart' as _vg;
|
||||
class $AssetsAnimGen {
|
||||
const $AssetsAnimGen();
|
||||
|
||||
/// File path: assets/anim/error.json
|
||||
LottieGenImage get error => const LottieGenImage('assets/anim/error.json');
|
||||
|
||||
/// File path: assets/anim/loading.json
|
||||
LottieGenImage get loading => const LottieGenImage('assets/anim/loading.json');
|
||||
|
||||
/// List of all assets
|
||||
List<LottieGenImage> get values => [loading];
|
||||
List<LottieGenImage> get values => [error, loading];
|
||||
}
|
||||
|
||||
class $AssetsIconsGen {
|
||||
@@ -62,6 +65,12 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/chicken.svg
|
||||
SvgGenImage get chicken => const SvgGenImage('assets/icons/chicken.svg');
|
||||
|
||||
/// File path: assets/icons/clipboard_eye.svg
|
||||
SvgGenImage get clipboardEye => const SvgGenImage('assets/icons/clipboard_eye.svg');
|
||||
|
||||
/// File path: assets/icons/clipboard_task.svg
|
||||
SvgGenImage get clipboardTask => const SvgGenImage('assets/icons/clipboard_task.svg');
|
||||
|
||||
/// File path: assets/icons/close_square.svg
|
||||
SvgGenImage get closeSquare => const SvgGenImage('assets/icons/close_square.svg');
|
||||
|
||||
@@ -128,6 +137,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/key.svg
|
||||
SvgGenImage get key => const SvgGenImage('assets/icons/key.svg');
|
||||
|
||||
/// File path: assets/icons/killogram.svg
|
||||
SvgGenImage get killogram => const SvgGenImage('assets/icons/killogram.svg');
|
||||
|
||||
/// File path: assets/icons/liveStock.svg
|
||||
SvgGenImage get liveStock => const SvgGenImage('assets/icons/liveStock.svg');
|
||||
|
||||
@@ -238,6 +250,8 @@ class $AssetsIconsGen {
|
||||
check,
|
||||
checkSquare,
|
||||
chicken,
|
||||
clipboardEye,
|
||||
clipboardTask,
|
||||
closeSquare,
|
||||
convertCube,
|
||||
cube,
|
||||
@@ -260,6 +274,7 @@ class $AssetsIconsGen {
|
||||
inside,
|
||||
inspection,
|
||||
key,
|
||||
killogram,
|
||||
liveStock,
|
||||
logout,
|
||||
map,
|
||||
@@ -363,6 +378,12 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/chicken.svg.vec
|
||||
SvgGenImage get chickenSvg => const SvgGenImage.vec('assets/vec/chicken.svg.vec');
|
||||
|
||||
/// File path: assets/vec/clipboard_eye.svg.vec
|
||||
SvgGenImage get clipboardEyeSvg => const SvgGenImage.vec('assets/vec/clipboard_eye.svg.vec');
|
||||
|
||||
/// File path: assets/vec/clipboard_task.svg.vec
|
||||
SvgGenImage get clipboardTaskSvg => const SvgGenImage.vec('assets/vec/clipboard_task.svg.vec');
|
||||
|
||||
/// File path: assets/vec/close_square.svg.vec
|
||||
SvgGenImage get closeSquareSvg => const SvgGenImage.vec('assets/vec/close_square.svg.vec');
|
||||
|
||||
@@ -429,6 +450,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/key.svg.vec
|
||||
SvgGenImage get keySvg => const SvgGenImage.vec('assets/vec/key.svg.vec');
|
||||
|
||||
/// File path: assets/vec/killogram.svg.vec
|
||||
SvgGenImage get killogramSvg => const SvgGenImage.vec('assets/vec/killogram.svg.vec');
|
||||
|
||||
/// File path: assets/vec/liveStock.svg.vec
|
||||
SvgGenImage get liveStockSvg => const SvgGenImage.vec('assets/vec/liveStock.svg.vec');
|
||||
|
||||
@@ -539,6 +563,8 @@ class $AssetsVecGen {
|
||||
checkSvg,
|
||||
checkSquareSvg,
|
||||
chickenSvg,
|
||||
clipboardEyeSvg,
|
||||
clipboardTaskSvg,
|
||||
closeSquareSvg,
|
||||
convertCubeSvg,
|
||||
cubeSvg,
|
||||
@@ -561,6 +587,7 @@ class $AssetsVecGen {
|
||||
insideSvg,
|
||||
inspectionSvg,
|
||||
keySvg,
|
||||
killogramSvg,
|
||||
liveStockSvg,
|
||||
logoutSvg,
|
||||
mapSvg,
|
||||
|
||||
@@ -15,8 +15,11 @@ class BaseBottomSheet extends StatelessWidget {
|
||||
height: height ?? MediaQuery.of(context).size.height * 0.85,
|
||||
padding: EdgeInsets.symmetric(vertical: 15, horizontal: 20),
|
||||
decoration: BoxDecoration(
|
||||
color:bgColor?? Colors.white,
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)),
|
||||
color: bgColor ?? Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(25),
|
||||
topRight: Radius.circular(25),
|
||||
),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
@@ -33,11 +36,14 @@ class BaseBottomSheet extends StatelessWidget {
|
||||
Container(
|
||||
height: 3,
|
||||
width: 50,
|
||||
decoration: BoxDecoration(color: AppColor.darkGreyDark, borderRadius: BorderRadius.circular(8)),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.darkGreyDark,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
left: 0,
|
||||
left: -10,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -6,16 +6,14 @@ class EmptyWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(),
|
||||
Assets.icons.empty.svg(width: 156.w, height: 156.h),
|
||||
Text('داده ای یافت نشد', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
|
||||
],
|
||||
),
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(),
|
||||
Assets.anim.error.lottie(),
|
||||
Text('داده ای یافت نشد', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
enum RTextFieldVariant {
|
||||
normal,
|
||||
noBorder,
|
||||
password,
|
||||
passwordNoBorder,
|
||||
}
|
||||
enum RTextFieldVariant { normal, noBorder, password, passwordNoBorder }
|
||||
|
||||
class RTextField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
@@ -40,6 +35,7 @@ class RTextField extends StatefulWidget {
|
||||
final void Function(String)? onChanged;
|
||||
final void Function(String)? onSubmitted;
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final Widget? suffix;
|
||||
|
||||
const RTextField({
|
||||
super.key,
|
||||
@@ -71,32 +67,25 @@ class RTextField extends StatefulWidget {
|
||||
this.onChanged,
|
||||
this.onSubmitted,
|
||||
this.borderColor,
|
||||
this.inputFormatters
|
||||
this.inputFormatters,
|
||||
this.suffix,
|
||||
});
|
||||
|
||||
|
||||
@override
|
||||
State<RTextField> createState() => _RTextFieldState();
|
||||
|
||||
bool get _isPassword => variant == RTextFieldVariant.password;
|
||||
|
||||
bool get _noBorder => variant == RTextFieldVariant.noBorder;
|
||||
|
||||
bool get _passwordNoBorder => variant == RTextFieldVariant.passwordNoBorder;
|
||||
|
||||
|
||||
InputBorder get _inputBorder =>
|
||||
_noBorder || _passwordNoBorder ? InputBorder.none : OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: borderColor ?? AppColor.lightGreyDarkActive,
|
||||
width: 1,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
InputBorder get _inputBorder => _noBorder || _passwordNoBorder
|
||||
? InputBorder.none
|
||||
: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor ?? AppColor.lightGreyDarkActive, width: 1),
|
||||
);
|
||||
}
|
||||
|
||||
class _RTextFieldState extends State<RTextField> {
|
||||
@@ -164,6 +153,7 @@ class _RTextFieldState extends State<RTextField> {
|
||||
errorStyle: widget.errorStyle,
|
||||
errorMaxLines: 1,
|
||||
isDense: widget.isDense,
|
||||
suffix: widget.suffix,
|
||||
suffixIcon: _buildSuffixIcon(),
|
||||
suffixIconConstraints: widget.boxConstraints,
|
||||
prefixIcon: widget.prefixIcon,
|
||||
@@ -185,4 +175,4 @@ class _RTextFieldState extends State<RTextField> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ class LoadingWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(child: Center(child: Assets.anim.loading.lottie(
|
||||
return Center(child: Assets.anim.loading.lottie(
|
||||
width: 120.w,
|
||||
height: 120.h,
|
||||
)));
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,9 @@ class _OverlayDropdownState<T> extends State<OverlayDropdownWidget<T>> {
|
||||
elevation: 4,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Container(
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: AppColor.bgLight,
|
||||
border: Border.all(color: AppColor.darkGreyLight),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
@@ -123,6 +124,7 @@ class _OverlayDropdownState<T> extends State<OverlayDropdownWidget<T>> {
|
||||
width: Get.width,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.bgLight,
|
||||
border: Border.all(color: AppColor.darkGreyLight),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
|
||||
@@ -21,6 +21,11 @@ extension XDateTime on String {
|
||||
String get formattedYHMS {
|
||||
return DateFormat('yyyy-MM-dd HH:mm:ss').format(toDateTime);
|
||||
}
|
||||
|
||||
Jalali get toJalali{
|
||||
final dateTime = DateTime.parse(this);
|
||||
return Jalali.fromDateTime(dateTime);
|
||||
}
|
||||
}
|
||||
|
||||
extension XDateTime2 on DateTime {
|
||||
|
||||
Reference in New Issue
Block a user