Files
c_trans_mobile/lib/constants/constants.dart
jahongireshonqulov 1bf3e41abe Initial commit
2025-10-18 09:40:06 +05:00

131 lines
4.2 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:dio/dio.dart';
import '../core/entity/name/name_entity.dart';
class Constants {
static String baseUrl = "https://ctrans-api.felix-its.uz";
}
class Validations {
static const someThingWentWrong = 'Something went wrong!';
}
class DioConstants {
static final options = Options(
contentType: 'application/json',
sendTimeout: const Duration(seconds: 30),
);
}
class AppKeys {
static const locale = 'locale';
static const accessToken = 'access_token';
static const firstName = 'firstname';
static const lastName = 'lastname';
static const email = 'email';
static const isFirst = "isFirst";
static const gender = "gender";
static const userId = "userId";
static const dateOfBirth = "dateOfBirth";
static const refreshToken = "refreshToken";
static const phone = "phone";
static const hasProfile = "hasProfile";
static const isProd = 'isProd';
static const page = 'page';
static const limit = 'limit';
static const status = 'status';
static const sort = 'sort';
static const themeMode = 'themeMode';
static const ucode = 'UCode';
}
class AppConst {
static const limit = 20;
static const reviewLimit = 10;
static const all = "all";
static const status = "status";
static const waiting = "WAITING";
static const partReceived = "PART_RECEIVED";
static const fullReceived = "FULL_RECEIVED";
static const shipped = "SHIPPED";
static const leftChine = "LEFT_CHINA";
static const enteredUzbekistan = "ENTERED_UZBEKISTAN";
static const tashkentWarehouse = "TASHKENT_WAREHOUSE";
static const customsClearance = "CUSTOMS_CLEARANCE";
static const delivered = "DELIVERED";
static const clickAction = "page_link";
static const Map<String, NameEntity> statusList = {
all: NameEntity(uz: "Barchasi", ru: "Все", zh: "全部"),
waiting: NameEntity(uz: "Kutilmoqda", ru: "Ожидание", zh: "等待中"),
partReceived: NameEntity(
uz: "Yarim keldi",
ru: "Частичный прибыл",
zh: "部分接收",
),
fullReceived: NameEntity(
uz: "To'liq keldi",
ru: "Полный прибл",
zh: "已全部接收",
),
shipped: NameEntity(uz: "Yuborildi", ru: "Отправлено", zh: "已发货"),
leftChine: NameEntity(
uz: "Xitoydan chiqdi",
ru: "Покинул Китай",
zh: "离开中国",
),
enteredUzbekistan: NameEntity(
uz: "O'zbekistonga kirdi",
ru: "Прибыл в Узбекистан",
zh: "进入乌兹别克斯坦",
),
tashkentWarehouse: NameEntity(
uz: "Toshkent omborida",
ru: "На складе в Ташкенте",
zh: "塔什干仓库",
),
customsClearance: NameEntity(
uz: "Bojxona rasmiylashtiruvi",
ru: "Таможенное оформление",
zh: "清关中",
),
delivered: NameEntity(uz: "Yetkazib berildi", ru: "Доставлено", zh: "已送达"),
};
static const warehouseOptions = {
"1": NameEntity(uz: "Yiwu", ru: "Иу", zh: "义乌"),
"2": NameEntity(uz: "Foshan", ru: "Фошань", zh: "佛山"),
"3": NameEntity(uz: "Qashqar", ru: "Кашгар", zh: "喀什"),
"4": NameEntity(uz: "Hargos", ru: "Харгос", zh: "哈戈斯"),
};
}
class Urls {
static const login = '/api/v1/auth/login/user';
static const signUp = '/api/v1/auth/register';
static const getProfile = '/api/v1/mobile/me';
static const updateProfile = '/api/v1/mobile/me/{id}';
static const verify = '/api/v1/auth/verify-sms';
static const orderList = '/api/v1/mobile/orders';
static const calculatePrice = '/api/v1/leads/calculate';
static const lead = '/api/v1/leads';
static const addFcm = '/api/v1/user/update-sfm-token';
static const comment = '/api/v1/testimonials';
static const notification = '/api/v1/notifications';
static const notificationRead = '/api/v1/notifications/mark-as-read';
static const banners = '/api/v1/slider';
static const delete = '/api/v1/mobile/me';
}
class CacheKeys {
static const profile = "profile.cache";
}
class Warnings {
Warnings._();
static const someThingWentWrong = 'Something went wrong!';
}
class RegExConst {
static final phoneRegex = RegExp(r'^\+?\d{12}$');
static final emailRegex = RegExp(r'^[a-zA-Z0-9._%+-]+@gmail\.com$');
}