feat : buy in province

This commit is contained in:
2025-07-07 11:38:37 +03:30
parent 21d3490d0c
commit 80dabe991d
23 changed files with 568 additions and 605 deletions

View File

@@ -28,6 +28,7 @@ class AppColor {
0xFF142b73,
); // #142b73 rgb(20, 43, 115)
static const Color blueDarker = Color(0xFF102159); // #102159 rgb(16, 33, 89)
static const Color blueFlashing = Color(0xFF6F91FF); // #6F91FF rgb(111, 145, 255)
//endregion
//region --- Green Colors ---

View File

@@ -71,6 +71,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/clipboard_task.svg
SvgGenImage get clipboardTask => const SvgGenImage('assets/icons/clipboard_task.svg');
/// File path: assets/icons/clock.svg
SvgGenImage get clock => const SvgGenImage('assets/icons/clock.svg');
/// File path: assets/icons/close_square.svg
SvgGenImage get closeSquare => const SvgGenImage('assets/icons/close_square.svg');
@@ -252,6 +255,7 @@ class $AssetsIconsGen {
chicken,
clipboardEye,
clipboardTask,
clock,
closeSquare,
convertCube,
cube,
@@ -384,6 +388,9 @@ class $AssetsVecGen {
/// File path: assets/vec/clipboard_task.svg.vec
SvgGenImage get clipboardTaskSvg => const SvgGenImage.vec('assets/vec/clipboard_task.svg.vec');
/// File path: assets/vec/clock.svg.vec
SvgGenImage get clockSvg => const SvgGenImage.vec('assets/vec/clock.svg.vec');
/// File path: assets/vec/close_square.svg.vec
SvgGenImage get closeSquareSvg => const SvgGenImage.vec('assets/vec/close_square.svg.vec');
@@ -565,6 +572,7 @@ class $AssetsVecGen {
chickenSvg,
clipboardEyeSvg,
clipboardTaskSvg,
clockSvg,
closeSquareSvg,
convertCubeSvg,
cubeSvg,

View File

@@ -0,0 +1,80 @@
import 'package:flutter/material.dart';
class AnimatedFab extends StatelessWidget {
final VoidCallback? onPressed;
final Color backgroundColor;
final Color foregroundColor;
final Widget icon;
final double radius;
final bool isLoading;
final String? message;
const AnimatedFab({
super.key,
required this.onPressed,
required this.icon,
required this.backgroundColor,
this.foregroundColor = Colors.white,
this.radius = 56.0,
this.isLoading = false,
this.message,
});
@override
Widget build(BuildContext context) {
return message != null
? Tooltip(
message: message ?? '',
child: AnimatedContainer(
duration: const Duration(milliseconds: 1300),
width: radius,
height: radius,
decoration: BoxDecoration(color: backgroundColor, shape: BoxShape.circle),
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(radius),
onTap: isLoading ? null : onPressed,
child: Center(
child: isLoading
? SizedBox(
height: radius / 2,
width: radius / 2,
child: CircularProgressIndicator(
strokeWidth: 2.5,
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
),
)
: icon,
),
),
),
),
)
: AnimatedContainer(
duration: const Duration(milliseconds: 1300),
width: radius,
height: radius,
decoration: BoxDecoration(color: backgroundColor, shape: BoxShape.circle),
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(radius),
onTap: isLoading ? null : onPressed,
child: Center(
child: isLoading
? SizedBox(
height: radius / 2,
width: radius / 2,
child: CircularProgressIndicator(
strokeWidth: 2.5,
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
),
)
: icon,
),
),
),
);
}
}

View File

@@ -0,0 +1,7 @@
export 'animated_fab.dart';
export 'elevated.dart';
export 'fab.dart';
export 'fab_outlined.dart';
export 'outline_elevated.dart';
export 'outline_elevated_icon.dart';
export 'text_button.dart';

View File

@@ -0,0 +1,2 @@
export 'delete_dialog.dart';
export 'warning_dialog.dart';

View File

@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import '../../../core.dart';
Future<void> buildWarningDialog({
required String title,
required String middleText,
required Future<void> Function() onConfirm,
required Future<void> Function() onRefresh,
}) async {
await Get.defaultDialog(
title: title,
middleText: middleText,
confirm: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppColor.error,
foregroundColor: Colors.white,
),
onPressed: () async {
await onConfirm();
onRefresh();
Get.back();
},
child: Text('بله'),
),
cancel: ElevatedButton(
onPressed: () {
Get.back();
},
child: Text('خیر'),
),
);
}

View File

@@ -3,14 +3,10 @@ export 'bottom_navigation/r_bottom_navigation.dart';
export 'bottom_navigation/wave_bottom_navigation.dart';
export 'bottom_sheet/base_bottom_sheet.dart';
export 'bottom_sheet/date_picker_bottom_sheet.dart';
export 'buttons/elevated.dart';
export 'buttons/fab.dart';
export 'buttons/outline_elevated.dart';
export 'buttons/outline_elevated_icon.dart';
export 'buttons/text_button.dart';
export 'buttons/buttons.dart';
export 'card/card_with_icon_with_border.dart';
export 'chips/r_chips.dart';
export 'dialog/delete_dialog.dart';
export 'dialog/dialog.dart';
export 'draggable_bottom_sheet/bottom_sheet_manger.dart';
export 'draggable_bottom_sheet/draggable_bottom_sheet.dart';
export 'draggable_bottom_sheet/draggable_bottom_sheet2.dart';