BASE: Update Icons & Name Of The App.

This commit is contained in:
2025-12-04 10:23:59 +05:00
parent b04050384d
commit e602782edd
228 changed files with 34364 additions and 7905 deletions

View File

@@ -4,7 +4,7 @@ import 'package:customer/models/currency_model.dart';
import 'package:customer/models/user_model.dart';
import 'package:customer/utils/notification_service.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import '../constant/collection_name.dart';
import '../service/fire_store_utils.dart';
@@ -18,13 +18,27 @@ class GlobalSettingController extends GetxController {
}
Future<void> getCurrentCurrency() async {
FireStoreUtils.fireStore.collection(CollectionName.currencies).where("isActive", isEqualTo: true).snapshots().listen((event) {
if (event.docs.isNotEmpty) {
Constant.currencyModel = CurrencyModel.fromJson(event.docs.first.data());
} else {
Constant.currencyModel = CurrencyModel(id: "", code: "USD", decimal: 2, isactive: true, name: "US Dollar", symbol: "\$", symbolatright: false);
}
});
FireStoreUtils.fireStore
.collection(CollectionName.currencies)
.where("isActive", isEqualTo: true)
.snapshots()
.listen((event) {
if (event.docs.isNotEmpty) {
Constant.currencyModel = CurrencyModel.fromJson(
event.docs.first.data(),
);
} else {
Constant.currencyModel = CurrencyModel(
id: "",
code: "USD",
decimal: 2,
isactive: true,
name: "US Dollar",
symbol: "\$",
symbolatright: false,
);
}
});
await FireStoreUtils.getSettings();
}
@@ -35,7 +49,9 @@ class GlobalSettingController extends GetxController {
String token = await NotificationService.getToken();
log(":::::::TOKEN:::::: $token");
if (FirebaseAuth.instance.currentUser != null) {
await FireStoreUtils.getUserProfile(FireStoreUtils.getCurrentUid()).then((value) {
await FireStoreUtils.getUserProfile(
FireStoreUtils.getCurrentUid(),
).then((value) {
if (value != null) {
UserModel driverUserModel = value;
driverUserModel.fcmToken = token;