feat:提交环境

This commit is contained in:
anfe 2024-05-28 09:56:40 +08:00
parent bb1ef339bf
commit 419405946c
26 changed files with 66 additions and 64 deletions

View File

@ -218,11 +218,9 @@ dependencies {
implementation('com.amap.api:location:5.6.0')
implementation('com.amap.api:3dmap:8.1.0')
implementation 'cn.jiguang.sdk:jpush:5.2.3'
implementation 'cn.jiguang.sdk:jpush:5.3.1'
//
implementation 'com.huawei.hms:push:6.12.0.300'
implementation 'cn.jiguang.sdk.plugin:huawei:5.2.3'
implementation 'cn.jiguang.sdk.plugin:xiaomi:5.2.3'
implementation 'com.huawei.hms:push:6.11.0.300'
implementation 'cn.jiguang.sdk.plugin:huawei:5.3.1'
implementation 'cn.jiguang.sdk.plugin:xiaomi:5.3.1'
}

View File

@ -1,10 +1,13 @@
buildscript {
ext.kotlin_version = '1.8.20'
repositories {
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
google()
mavenCentral()
mavenLocal()
// hms
// maven { url 'https://maven.aliyun.com/repository/central'}
maven { url 'https://developer.huawei.com/repo/'}
// fcm FCM
maven { url "https://maven.google.com" }
@ -25,6 +28,8 @@ buildscript {
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
google()
mavenCentral()
jcenter()

View File

@ -462,7 +462,7 @@ abstract class AppRouters {
GetPage(
name: Routers.starLockMain,
page: () => F.sw(
defaultCall: () => StarLockMainPage(),
skyCall: () => StarLockMainPage(),
xhjCall: () => const StarLockMainXHJPage()),
),
GetPage(
@ -572,19 +572,19 @@ abstract class AppRouters {
GetPage(
name: Routers.starLockLoginPage,
page: () => F.sw(
defaultCall: () => const StarLockLoginPage(),
skyCall: () => const StarLockLoginPage(),
xhjCall: () => const StarLockLoginXHJPage()),
),
GetPage(
name: Routers.starLockRegisterPage,
page: () => F.sw(
defaultCall: () => const StarLockRegisterPage(),
skyCall: () => const StarLockRegisterPage(),
xhjCall: () => const StarLockRegisterXHJPage()),
binding: StarLockRegisterBinding()),
GetPage(
name: Routers.starLockForgetPasswordPage,
page: () => F.sw(
defaultCall: () => const StarLockForgetPasswordPage(),
skyCall: () => const StarLockForgetPasswordPage(),
xhjCall: () => const StarLockForgetPasswordXHJPage()),
),
GetPage(

View File

@ -5,7 +5,7 @@ import 'package:star_lock/flavors.dart';
class AppColors {
// static Color mainColor = const Color(0xFF385DEA);
static Color get mainColor => F.sw(
defaultCall: () => const Color(0xFF4777EE),
skyCall: () => const Color(0xFF4777EE),
xhjCall: () => const Color(0xFF68c1b9));
static Color mainBackgroundColor = const Color(0xFFF5F5F5);

View File

@ -32,19 +32,19 @@ class F {
//便
static dynamic sw(
{required fCallFunction defaultCall, fCallFunction? xhjCall}) {
{required fCallFunction skyCall, required fCallFunction? xhjCall}) {
if (xhjCall == null) {
return defaultCall();
return skyCall();
}
switch (appFlavor) {
case Flavor.xhj:
return xhjCall();
case Flavor.sky:
return skyCall();
case Flavor.local:
case Flavor.dev:
case Flavor.pre:
case Flavor.sky:
case Flavor.xhj:
default:
return defaultCall();
return xhjCall();
}
}
@ -72,7 +72,7 @@ class F {
case Flavor.dev:
return '${"starLock".tr}-dev';
case Flavor.pre:
return "starLock".tr;
return 'starLock'.tr;
case Flavor.sky:
return '锁通通';
case Flavor.xhj:
@ -94,8 +94,7 @@ class F {
case Flavor.sky:
return 'https://lock.skychip.top';
case Flavor.xhj:
return 'https://pre.lock.star-lock.cn';
// return 'https://lock.xhjcn.ltd';
return 'https://lock.xhjcn.ltd';
// return 'https://pre.lock.star-lock.cn';
default:
throw Exception('flavor[$name] apiPrefix not found');

View File

@ -32,7 +32,7 @@ class _LockDetailMainPageState extends State<LockDetailMainPage> {
isOnlyOneData = obj["isOnlyOneData"];
return F.sw(
defaultCall: () => Scaffold(
skyCall: () => Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: F.navTitle,

View File

@ -145,7 +145,7 @@ class _LockDetailPageState extends State<LockDetailPage>
@override
Widget build(BuildContext context) {
loadData();
return F.sw(defaultCall: skWidget, xhjCall: xhjWidget);
return F.sw(skyCall: skWidget, xhjCall: xhjWidget);
}
//
@ -490,7 +490,7 @@ class _LockDetailPageState extends State<LockDetailPage>
return Column(
children: <Widget>[
F.sw(
defaultCall: () => SizedBox(height: 50.h),
skyCall: () => SizedBox(height: 50.h),
xhjCall: () => Padding(
padding: EdgeInsets.only(
top: 12.h,
@ -584,7 +584,7 @@ class _LockDetailPageState extends State<LockDetailPage>
],
),
F.sw(
defaultCall: () => SizedBox(height: 30.h),
skyCall: () => SizedBox(height: 30.h),
xhjCall: () => SizedBox(height: 15.h),
),
Container(
@ -699,7 +699,7 @@ class _LockDetailPageState extends State<LockDetailPage>
SizedBox(
height: 30.h,
),
F.sw(defaultCall: adminInfoView, xhjCall: () => const SizedBox()),
F.sw(skyCall: adminInfoView, xhjCall: () => const SizedBox()),
SizedBox(
height: 20.h,
),
@ -1147,7 +1147,7 @@ class _LockDetailPageState extends State<LockDetailPage>
Widget bottomItem(
String iconUrl, String name, bool bottomBtnisEable, Function() onClick) {
final Widget child = F.sw(
defaultCall: () => Container(
skyCall: () => Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -116,7 +116,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
);
}
child = F.sw(
defaultCall: () => child,
skyCall: () => child,
xhjCall: () => Container(
decoration: const BoxDecoration(
image: DecorationImage(
@ -133,7 +133,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
Widget returnWidget;
if (type == 1) {
type = F.sw(defaultCall: () => 1, xhjCall: () => 2);
type = F.sw(skyCall: () => 1, xhjCall: () => 2);
}
switch (type) {
case 0:
@ -152,7 +152,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
//
Storage.setBool(ifIsDemoModeOrNot, false);
returnWidget = F.sw(
defaultCall: () => LockListPage(
skyCall: () => LockListPage(
lockListInfoGroupEntity: state.lockListInfoGroupEntity.value),
xhjCall: () => LockListXHJPage(
lockListInfoGroupEntity: state.lockListInfoGroupEntity.value));

View File

@ -50,7 +50,7 @@ class _AboutPageState extends State<AboutPage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.about!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -67,11 +67,11 @@ class _AboutPageState extends State<AboutPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
F.sw(
defaultCall: () => logoView(),
skyCall: () => logoView(),
xhjCall: () => const SizedBox()),
listView(),
F.sw(
defaultCall: () => const SizedBox(),
skyCall: () => const SizedBox(),
xhjCall: () => logoView()),
],
),
@ -185,7 +185,7 @@ class _AboutPageState extends State<AboutPage> {
],
);
view = F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
@ -221,7 +221,7 @@ class _AboutPageState extends State<AboutPage> {
borderRadius: BorderRadius.circular(20.r),
child: Image.asset(
F.sw(
defaultCall: () => "images/icon_main_1024.png",
skyCall: () => "images/icon_main_1024.png",
xhjCall: () => "images/icon_main_xhj_1024.png"),
width: 160.w,
height: 160.w),

View File

@ -26,7 +26,7 @@ class _WebviewShowPageState extends State<WebviewShowPage> {
@override
Widget build(BuildContext context) {
state.webViewController.loadRequest(Uri.parse(state.webURL));
return F.sw(defaultCall: () => defaultView(), xhjCall: () => xhjView());
return F.sw(skyCall: () => defaultView(), xhjCall: () => xhjView());
}
Widget defaultView() {

View File

@ -32,7 +32,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
return Scaffold(
backgroundColor: Colors.white,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,

View File

@ -28,7 +28,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,

View File

@ -27,7 +27,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage>
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -52,7 +52,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage>
//
Widget lockTypeList() {
Widget view = F.sw(
defaultCall: () => GridView.count(
skyCall: () => GridView.count(
crossAxisCount: 2,
childAspectRatio: 2.83,
crossAxisSpacing: 10,
@ -162,7 +162,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage>
//
view = F.sw(
defaultCall: () => Container(
skyCall: () => Container(
height: 150.h,
color: Colors.white,
margin: const EdgeInsets.all(10),
@ -195,7 +195,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage>
child: Container(
height: 120.h,
decoration: F.sw(
defaultCall: () => const BoxDecoration(
skyCall: () => const BoxDecoration(
color: Colors.white,
),
xhjCall: () => BoxDecoration(

View File

@ -39,13 +39,13 @@ class _LockMallPageState extends State<LockMallPage> {
barTitle: getWebTitle(logic),
haveBack: logic.state.canGoBack || logic.state.allowReturn,
backgroundColor: F.sw(
defaultCall: () => AppColors.mainColor,
skyCall: () => AppColors.mainColor,
xhjCall: () => Colors.white),
titleColor: F.sw(
defaultCall: () => null,
skyCall: () => null,
xhjCall: () => AppColors.blackColor),
iconColor: F.sw(
defaultCall: () => null,
skyCall: () => null,
xhjCall: () => AppColors.blackColor),
backAction: () => logic.canGoBack(false),
)

View File

@ -24,7 +24,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -60,7 +60,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
);
return F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
padding: EdgeInsets.only(
top: 20.h, bottom: 20.h, left: 20.w, right: 20.w),

View File

@ -28,7 +28,7 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,

View File

@ -27,7 +27,7 @@ class _MinePersonInfoEditAccountNextPageState
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,

View File

@ -28,7 +28,7 @@ class _MinePersonInfoEditNamePageState
return Scaffold(
backgroundColor: AppColors.greyBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -97,7 +97,7 @@ class _MinePersonInfoEditNamePageState
],
);
view = F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 16.w, right: 16.w),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),

View File

@ -30,7 +30,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,

View File

@ -31,7 +31,7 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: F.sw(
defaultCall: () => AppColors.mainBackgroundColor,
skyCall: () => AppColors.mainBackgroundColor,
xhjCall: () => AppColors.mainBackgroundColor),
appBar: widget.showAppBar
? TitleAppBar(
@ -42,7 +42,7 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
body: Column(
children: [
F.sw(
defaultCall: () => SizedBox(),
skyCall: () => SizedBox(),
xhjCall: () => Container(
width: 1.sw,
height: 0.2.sw,

View File

@ -30,7 +30,7 @@ class _MinePersonInfoResetPasswordPageState
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -140,7 +140,7 @@ class _MinePersonInfoResetPasswordPageState
],
);
view = F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h,

View File

@ -37,7 +37,7 @@ class _MinePersonInfoSetSafetyProblemPageState
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -137,7 +137,7 @@ class _MinePersonInfoSetSafetyProblemPageState
],
);
view = F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(

View File

@ -54,7 +54,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
skyCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
@ -76,7 +76,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
Widget styleHierarchy() {
Widget view = getListDataView();
view = F.sw(
defaultCall: () => view,
skyCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h, left: 20.w, right: 20.w, bottom: 40.h),

View File

@ -42,20 +42,20 @@ class _StarLockApplicationState extends State<StarLockApplication> {
if (snapshot.data!) {
//
return F.sw(
defaultCall: () => StarLockMainPage(),
skyCall: () => StarLockMainPage(),
xhjCall: () => const StarLockMainXHJPage());
} else {
//
AppFirstEnterHandle().getAppFirstEnter(isAgreePrivacy);
return F.sw(
defaultCall: () => const StarLockLoginPage(),
skyCall: () => const StarLockLoginPage(),
xhjCall: () => const StarLockLoginXHJPage());
}
} else {
//
return F.sw(
defaultCall: () => const StarLockLoginPage(),
skyCall: () => const StarLockLoginPage(),
xhjCall: () => const StarLockLoginXHJPage());
}
},

View File

@ -51,7 +51,7 @@ class AppFirstEnterHandle {
return PopScope(
canPop: false,
child: F.sw(
defaultCall: () => _defaultPrivacyAgreementAlert(context),
skyCall: () => _defaultPrivacyAgreementAlert(context),
xhjCall: () => _xhjPrivacyAgreementAlert(context)));
},
);

View File

@ -123,7 +123,7 @@ class _LoginInputState extends State<LoginInput> {
Padding(
padding: EdgeInsets.only(
top:
F.sw(defaultCall: () => 27.h, xhjCall: () => 39.h)),
F.sw(skyCall: () => 27.h, xhjCall: () => 39.h)),
child: Text(
pwd,
style: TextStyle(