feat : buy in province
This commit is contained in:
33
packages/chicken/lib/presentation/utils/string_utils.dart
Normal file
33
packages/chicken/lib/presentation/utils/string_utils.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
extension XStringUtils on String {
|
||||
get faAllocationType {
|
||||
final tmp = split('_');
|
||||
tmp.insert(1, '_');
|
||||
if (tmp.length > 1) {
|
||||
return tmp.map((e) => utilsMap[e] ?? e).join(' ');
|
||||
} else {
|
||||
return utilsMap[this] ?? this;
|
||||
}
|
||||
}
|
||||
|
||||
get faItem => utilsMap[this] ?? this;
|
||||
|
||||
get buyerIsGuild {
|
||||
final tmp = split('_');
|
||||
if (tmp.length > 1) {
|
||||
return tmp.last == 'guild';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> utilsMap = {
|
||||
'killhouse': 'کشتارگاه',
|
||||
'_': 'به',
|
||||
'steward': 'مباشر',
|
||||
'exclusive': 'اختصاصی',
|
||||
'free': 'آزاد',
|
||||
'pending': 'در انتظار',
|
||||
'accepted': 'تایید شده',
|
||||
'guild': 'صنف',
|
||||
};
|
||||
@@ -3,6 +3,11 @@ import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart
|
||||
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
|
||||
const int timeDebounce = 1200;
|
||||
|
||||
|
||||
void handleGeneric(DioException error,[void Function()? onError]) {
|
||||
Get.showSnackbar(_errorSnackBar('اعتبار توکن شما منقضی شده است لطفا دوباره وارد شوید'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user