BASE: Fix Buttons Radiuses.

This commit is contained in:
2025-11-29 10:49:25 +05:00
parent b2cb9b5dc5
commit d703dadafd
21 changed files with 1219 additions and 243 deletions

View File

@@ -14,6 +14,7 @@ import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart';
import 'package:firebase_auth/firebase_auth.dart' as auth;
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../screen_ui/auth_screens/login_screen.dart';
import '../screen_ui/multi_vendor_service/dash_board_screens/dash_board_screen.dart';
@@ -38,7 +39,17 @@ class ServiceListController extends GetxController {
// fetch currency
CurrencyModel? currency = await FireStoreUtils.getCurrency();
currencyData.value = currency ?? CurrencyModel(id: "", code: "USD", decimal: 2, isactive: true, name: "US Dollar", symbol: "\$", symbolatright: false);
currencyData.value =
currency ??
CurrencyModel(
id: "",
code: "USD",
decimal: 2,
isactive: true,
name: "US Dollar",
symbol: "\$",
symbolatright: false,
);
// Load sections
List<SectionModel> sections = await FireStoreUtils.getSections();
@@ -59,11 +70,17 @@ class ServiceListController extends GetxController {
});
}
Future<void> onServiceTap(BuildContext context, SectionModel sectionModel) async {
Future<void> onServiceTap(
BuildContext context,
SectionModel sectionModel,
) async {
try {
ShowToastDialog.showLoader("Please wait...".tr);
Constant.sectionConstantModel = sectionModel;
AppThemeData.primary300 = Color(int.tryParse(sectionModel.color?.replaceFirst("#", "0xff") ?? '') ?? 0xff2196F3);
AppThemeData.primary300 = Color(
int.tryParse(sectionModel.color?.replaceFirst("#", "0xff") ?? '') ??
0xff2196F3,
);
if (auth.FirebaseAuth.instance.currentUser != null) {
String uid = auth.FirebaseAuth.instance.currentUser!.uid;
UserModel? user = await FireStoreUtils.getUserProfile(uid);
@@ -93,7 +110,8 @@ class ServiceListController extends GetxController {
}
});
if (sectionModel.serviceTypeFlag == "ecommerce-service" || sectionModel.serviceTypeFlag == "delivery-service") {
if (sectionModel.serviceTypeFlag == "ecommerce-service" ||
sectionModel.serviceTypeFlag == "delivery-service") {
if (cartItem.isNotEmpty) {
showAlertDialog(Get.context!, UserModel(), sectionModel);
} else {
@@ -130,18 +148,27 @@ class ServiceListController extends GetxController {
final CartProvider cartProvider = CartProvider();
void showAlertDialog(BuildContext context, UserModel user, SectionModel sectionModel) {
void showAlertDialog(
BuildContext context,
UserModel user,
SectionModel sectionModel,
) {
Get.defaultDialog(
title: "Alert!",
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text("If you select this Section/Service, your previously added items will be removed from the cart.".tr, textAlign: TextAlign.center),
Text(
"If you select this Section/Service, your previously added items will be removed from the cart."
.tr,
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
Row(
children: [
Expanded(
child: RoundedButtonFill(
borderRadius: 10.r,
height: 5.5,
title: "Cancel".tr,
onPress: () {
@@ -154,6 +181,7 @@ class ServiceListController extends GetxController {
const SizedBox(width: 12),
Expanded(
child: RoundedButtonFill(
borderRadius: 10.r,
title: "OK".tr,
height: 5.5,
onPress: () async {