156 lines
4.7 KiB
Dart
156 lines
4.7 KiB
Dart
import 'dart:ui';
|
|
|
|
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
|
import 'package:vbvs_app/enum/APPPackageType.dart';
|
|
|
|
class AppConstants {
|
|
// App-related constants
|
|
|
|
static const String zhmht_app_version = "SWES_1.2026.1.8"; //眠花糖
|
|
static const String theh_app_version = "1.2601.12"; //太和
|
|
|
|
// 1. 纯字符串列表格式
|
|
static const List<String> integerTimeZones = [
|
|
'UTC-12',
|
|
'UTC-11',
|
|
'UTC-10',
|
|
'UTC-9',
|
|
'UTC-8',
|
|
'UTC-7',
|
|
'UTC-6',
|
|
'UTC-5',
|
|
'UTC-4',
|
|
'UTC-3',
|
|
'UTC-2',
|
|
'UTC-1',
|
|
'UTC+0',
|
|
'UTC+1',
|
|
'UTC+2',
|
|
'UTC+3',
|
|
'UTC+4',
|
|
'UTC+5',
|
|
'UTC+6',
|
|
'UTC+7',
|
|
'UTC+8',
|
|
'UTC+9',
|
|
'UTC+10',
|
|
'UTC+11',
|
|
'UTC+12',
|
|
'UTC+13',
|
|
'UTC+14',
|
|
];
|
|
static const int code_time = 60; //验证码倒计时
|
|
static const int limit = 10; //分页数量
|
|
|
|
static const double list_end_height = 26; //列表结尾空白高度
|
|
static const double list_ano_end_height = 100; //列表结尾空白高度
|
|
static const double list_start_height = 13; //列表开头空白高度
|
|
|
|
static const double page_button_bottom_padding = 45; //页面底部按钮距离底部距离
|
|
|
|
double main_left_right_padding = 30.rpx; //页面左右布局间距
|
|
double content_left_right_padding = 15.rpx; //页面左右内容间距
|
|
|
|
double normal_container_radius = 24.rpx; //普通容器圆角
|
|
double button_container_radius = 100.rpx; //按钮容器圆角
|
|
|
|
double text_padding_up_dowm_p = 5.rpx; //段落文字上下间距
|
|
double text_padding = 10.rpx; //段落文字上下间距
|
|
|
|
double smaller_text_fontSize = 18.rpx; //普通文字字号
|
|
double small_text_fontSize = 20.rpx; //普通文字字号
|
|
double middler_text_fontSize = 24.rpx; //普通文字字号
|
|
double normal_text_fontSize = 26.rpx; //普通文字字号
|
|
double title_text_fontSize = 30.rpx; //标题文字字号
|
|
|
|
double dropdown_height = 90.rpx; //标题文字字号
|
|
double border_width = 1.rpx; //标题文字字号//border宽度
|
|
|
|
List<Color> mhtButtongradientColors = [
|
|
stringToColor("FCFCFC"), // 浅蓝
|
|
stringToColor("F8FAF9"), // 浅蓝
|
|
stringToColor("ECF6F3"), // 浅蓝
|
|
stringToColor("D9F0E9"), // 浅蓝
|
|
stringToColor("CEECE3"), // 浅蓝
|
|
];
|
|
|
|
List<Color> mhtNormalButton = [
|
|
stringToColor("1592AA"), // 浅蓝
|
|
stringToColor("0C83A7"), // 浅蓝
|
|
stringToColor("006FA3"), // 浅蓝
|
|
];
|
|
|
|
List<Color> thNormalButton = [
|
|
themeController.currentColor.sc1,
|
|
themeController.currentColor.sc2,
|
|
]; //太和按钮颜色
|
|
|
|
//系统参数
|
|
//运行打包APP模式
|
|
// int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖
|
|
// int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖
|
|
// int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖
|
|
int ent_type = APPPackageType.DONGHUA.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华
|
|
int text_length = 8;
|
|
|
|
int wifi1 = -45;
|
|
int wifi2 = -60;
|
|
int wifi3 = -75;
|
|
|
|
static bool is_test_account = false; //是否测试账号
|
|
}
|
|
|
|
//获取协议地址
|
|
// 1.隐私协议 2.用户协议
|
|
String getPrivacy(int type) {
|
|
String? language = "zh_CN";
|
|
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
|
if (mhLanguageController.selectLanguage != null) {
|
|
language = mhLanguageController.selectLanguage.value!.language_code;
|
|
}
|
|
} else {
|
|
if (languageController.selectLanguage != null) {
|
|
language = languageController.selectLanguage.value!.language_code;
|
|
}
|
|
}
|
|
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
|
if (type == 1) {
|
|
return ServiceConstant.policy_url +
|
|
"/mht" +
|
|
"/mht_privacy_policy_$language.html";
|
|
}
|
|
return ServiceConstant.policy_url +
|
|
"/mht" +
|
|
"/mht_user_policy_$language.html";
|
|
} else if (AppConstants().ent_type == APPPackageType.TH.code) {
|
|
if (type == 1) {
|
|
return ServiceConstant.policy_url +
|
|
"/theh" +
|
|
"/th_privacy_policy_$language.html";
|
|
}
|
|
return ServiceConstant.policy_url +
|
|
"/theh" +
|
|
"/th_user_policy_$language.html";
|
|
} else if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
|
|
if (type == 1) {
|
|
return ServiceConstant.policy_url +
|
|
"/donghua" +
|
|
"/th_privacy_policy_$language.html";
|
|
}
|
|
return ServiceConstant.policy_url +
|
|
"/donghua" +
|
|
"/th_user_policy_$language.html";
|
|
} else {
|
|
if (type == 1) {
|
|
return ServiceConstant.policy_url +
|
|
"/theh" +
|
|
"/th_privacy_policy_$language.html";
|
|
}
|
|
return ServiceConstant.policy_url +
|
|
"/theh" +
|
|
"/th_user_policy_$language.html";
|
|
}
|
|
}
|