Merge branch 'master_hyx'
This commit is contained in:
commit
7711525db2
@ -25,6 +25,26 @@ if (flutterVersionName == null) {
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'android-junk-code'
|
||||||
|
|
||||||
|
androidJunkCode {
|
||||||
|
variantConfig {
|
||||||
|
release {
|
||||||
|
//注意:这里的release是变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
|
||||||
|
packageBase = "cn.hx.plugin.ui" //生成java类根包名
|
||||||
|
packageCount = 30 //生成包数量
|
||||||
|
activityCountPerPackage = 3 //每个包下生成Activity类数量
|
||||||
|
excludeActivityJavaFile = false
|
||||||
|
//是否排除生成Activity的Java文件,默认false(layout和写入AndroidManifest.xml还会执行),主要用于处理类似神策全埋点编译过慢问题
|
||||||
|
otherCountPerPackage = 50 //每个包下生成其它类的数量
|
||||||
|
methodCountPerClass = 20 //每个类下生成方法数量
|
||||||
|
resPrefix = "junk_" //生成的layout、drawable、string等资源名前缀
|
||||||
|
drawableCount = 300 //生成drawable资源数量
|
||||||
|
stringCount = 300 //生成string数量
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@ -100,7 +120,7 @@ android {
|
|||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.xhjcn.lock"
|
applicationId "com.xhjcn.lock"
|
||||||
signingConfig signingConfigs.xhj
|
signingConfig signingConfigs.xhj
|
||||||
resValue "string", "app_name", "鑫锁"
|
resValue "string", "app_name", "星星锁"
|
||||||
manifestPlaceholders.JPUSH_PKGNAME = "com.xhjcn.lock"
|
manifestPlaceholders.JPUSH_PKGNAME = "com.xhjcn.lock"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,8 @@ buildscript {
|
|||||||
classpath 'com.google.gms:google-services:4.3.8'
|
classpath 'com.google.gms:google-services:4.3.8'
|
||||||
// hms,若不集成华为厂商通道,可直接跳过
|
// hms,若不集成华为厂商通道,可直接跳过
|
||||||
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
||||||
|
// 垃圾代码生成器
|
||||||
|
classpath "com.github.qq549631030:android-junk-code:1.3.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
# flutter run --flavor dev -t lib/main_dev.dart
|
# flutter run --flavor dev -t lib/main_dev.dart
|
||||||
# flutter run --flavor pre -t lib/main_pre.dart
|
# flutter run --flavor pre -t lib/main_pre.dart
|
||||||
# flutter run --flavor sky -t lib/main_sky_full.dart
|
# flutter run --flavor sky -t lib/main_sky_full.dart
|
||||||
# flutter run --flavor xhj -t lib/main_xhj.dart
|
# flutter run --flavor xhj -t lib/main_xhj_full.dart
|
||||||
|
|
||||||
# 下面是安卓发布编译命令
|
# 下面是安卓发布编译命令
|
||||||
# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky_full.dart
|
# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky_full.dart
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
FLUTTER_TARGET=lib/main_xhj.dart
|
FLUTTER_TARGET=lib/main_xhj_full.dart
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
BUNDLE_NAME=鑫锁
|
BUNDLE_NAME=星星锁
|
||||||
BUNDLE_DISPLAY_NAME=鑫锁
|
BUNDLE_DISPLAY_NAME=星星锁
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
FLUTTER_TARGET=lib/main_xhj.dart
|
FLUTTER_TARGET=lib/main_xhj_full.dart
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
BUNDLE_NAME=鑫锁
|
BUNDLE_NAME=星星锁
|
||||||
BUNDLE_DISPLAY_NAME=鑫锁
|
BUNDLE_DISPLAY_NAME=星星锁
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
FLUTTER_TARGET=lib/main_xhj.dart
|
FLUTTER_TARGET=lib/main_xhj_lite.dart
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
BUNDLE_NAME=鑫锁
|
BUNDLE_NAME=星星锁
|
||||||
BUNDLE_DISPLAY_NAME=鑫锁
|
BUNDLE_DISPLAY_NAME=星星锁
|
||||||
|
|||||||
@ -116,20 +116,7 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
04BFC44A2BCFE48600688FCA /* RunnerRelease-xhj.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-xhj.entitlements"; sourceTree = "<group>"; };
|
04BFC4482BCFE05100688FCA /* RunnerRelease-xhj.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-xhj.entitlements"; sourceTree = "<group>"; };
|
||||||
04BFC44B2BD0B50A00688FCA /* RunnerProfile-xhj.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerProfile-xhj.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC44C2BD0B51500688FCA /* RunnerDebug-xhj.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerDebug-xhj.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC44D2BD0B51D00688FCA /* RunnerRelease-sky.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-sky.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC44E2BD0B52300688FCA /* RunnerProfile-sky.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerProfile-sky.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC44F2BD0B52C00688FCA /* RunnerDebug-sky.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerDebug-sky.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4502BD0B53400688FCA /* RunnerRelease-pre.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-pre.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4512BD0B53B00688FCA /* RunnerProfile-pre.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerProfile-pre.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4522BD0B54200688FCA /* RunnerDebug-pre.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerDebug-pre.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4532BD0B54900688FCA /* RunnerRelease-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-dev.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4542BD0B55000688FCA /* RunnerProfile-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerProfile-dev.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4552BD0B55600688FCA /* RunnerDebug-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerDebug-dev.entitlements"; sourceTree = "<group>"; };
|
|
||||||
04BFC4562BD0B55F00688FCA /* RunnerProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerProfile.entitlements; sourceTree = "<group>"; };
|
|
||||||
04BFC4572BD0B56600688FCA /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = "<group>"; };
|
|
||||||
0BEB3ADCCEC961E2916B9004 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
0BEB3ADCCEC961E2916B9004 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
0D02C18E16914A687A4A1AC2 /* devDebug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = devDebug.xcconfig; path = Flutter/devDebug.xcconfig; sourceTree = "<group>"; };
|
0D02C18E16914A687A4A1AC2 /* devDebug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = devDebug.xcconfig; path = Flutter/devDebug.xcconfig; sourceTree = "<group>"; };
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
@ -406,20 +393,7 @@
|
|||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
04BFC4572BD0B56600688FCA /* RunnerRelease.entitlements */,
|
04BFC4482BCFE05100688FCA /* RunnerRelease-xhj.entitlements */,
|
||||||
04BFC4562BD0B55F00688FCA /* RunnerProfile.entitlements */,
|
|
||||||
04BFC4552BD0B55600688FCA /* RunnerDebug-dev.entitlements */,
|
|
||||||
04BFC4542BD0B55000688FCA /* RunnerProfile-dev.entitlements */,
|
|
||||||
04BFC4532BD0B54900688FCA /* RunnerRelease-dev.entitlements */,
|
|
||||||
04BFC4522BD0B54200688FCA /* RunnerDebug-pre.entitlements */,
|
|
||||||
04BFC4512BD0B53B00688FCA /* RunnerProfile-pre.entitlements */,
|
|
||||||
04BFC4502BD0B53400688FCA /* RunnerRelease-pre.entitlements */,
|
|
||||||
04BFC44F2BD0B52C00688FCA /* RunnerDebug-sky.entitlements */,
|
|
||||||
04BFC44E2BD0B52300688FCA /* RunnerProfile-sky.entitlements */,
|
|
||||||
04BFC44D2BD0B51D00688FCA /* RunnerRelease-sky.entitlements */,
|
|
||||||
04BFC44C2BD0B51500688FCA /* RunnerDebug-xhj.entitlements */,
|
|
||||||
04BFC44B2BD0B50A00688FCA /* RunnerProfile-xhj.entitlements */,
|
|
||||||
04BFC44A2BCFE48600688FCA /* RunnerRelease-xhj.entitlements */,
|
|
||||||
3364C3F32B0C902100AA5ABC /* lcokStarMain.png */,
|
3364C3F32B0C902100AA5ABC /* lcokStarMain.png */,
|
||||||
82C026552AEB6C050011FE6A /* img */,
|
82C026552AEB6C050011FE6A /* img */,
|
||||||
82C026532AE8AC6D0011FE6A /* AliyunEmasServices-Info.plist */,
|
82C026532AE8AC6D0011FE6A /* AliyunEmasServices-Info.plist */,
|
||||||
@ -852,8 +826,8 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
|
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerDebug-xhj.entitlements";
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
DEVELOPMENT_TEAM = 7D53BZAN75;
|
DEVELOPMENT_TEAM = P8997RW3V8;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -866,8 +840,8 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = D62237D2D011BDC27FB2BC28 /* Pods-Runner.profile-xhj.xcconfig */;
|
baseConfigurationReference = D62237D2D011BDC27FB2BC28 /* Pods-Runner.profile-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerProfile-xhj.entitlements";
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
DEVELOPMENT_TEAM = 7D53BZAN75;
|
DEVELOPMENT_TEAM = P8997RW3V8;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -881,7 +855,7 @@
|
|||||||
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
|
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
|
||||||
DEVELOPMENT_TEAM = 7D53BZAN75;
|
DEVELOPMENT_TEAM = P8997RW3V8;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
|||||||
@ -109,8 +109,8 @@ class F {
|
|||||||
case Flavor.sky:
|
case Flavor.sky:
|
||||||
return 'https://lock.skychip.top';
|
return 'https://lock.skychip.top';
|
||||||
case Flavor.xhj:
|
case Flavor.xhj:
|
||||||
// return 'https://lock.xhjcn.ltd';
|
return 'https://lock.xhjcn.ltd';
|
||||||
return 'https://pre.lock.star-lock.cn';
|
// return 'https://pre.lock.star-lock.cn';
|
||||||
default:
|
default:
|
||||||
throw Exception('flavor[$name] apiPrefix not found');
|
throw Exception('flavor[$name] apiPrefix not found');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,15 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:colorfilter_generator/addons.dart';
|
||||||
|
import 'package:colorfilter_generator/colorfilter_generator.dart';
|
||||||
|
import 'package:colorfilter_generator/presets.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
|
import 'package:star_lock/widget/flavors_img.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -68,6 +73,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
|
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
|
||||||
|
|
||||||
void _initRefreshLockDetailInfoDataEventAction() {
|
void _initRefreshLockDetailInfoDataEventAction() {
|
||||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||||
_lockRefreshLockDetailInfoDataEvent =
|
_lockRefreshLockDetailInfoDataEvent =
|
||||||
@ -224,24 +230,33 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
Widget topWidget() {
|
Widget topWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 50.h),
|
F.sw(
|
||||||
|
defaultCall: () => SizedBox(height: 50.h),
|
||||||
|
xhjCall: () => Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 12.h,
|
||||||
|
left: 15.w,
|
||||||
|
bottom: 16.h,
|
||||||
|
right: 15.w,
|
||||||
|
),
|
||||||
|
child: adminInfoView(center: false, add: true),
|
||||||
|
),
|
||||||
|
),
|
||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Center(
|
||||||
width: 1.sw - 120.w * 2,
|
child: Text(
|
||||||
child: Center(
|
state.lockAlias.value,
|
||||||
child: Text(
|
style: TextStyle(
|
||||||
state.lockAlias.value,
|
fontSize: 22.sp,
|
||||||
style: TextStyle(
|
fontWeight: FontWeight.w400,
|
||||||
fontSize: 22.sp,
|
color: state.isOpenPassageMode.value == 1
|
||||||
fontWeight: FontWeight.w400,
|
? AppColors.openPassageModeColor
|
||||||
color: state.isOpenPassageMode.value == 1
|
: AppColors.darkGrayTextColor),
|
||||||
? AppColors.openPassageModeColor
|
)),
|
||||||
: AppColors.darkGrayTextColor),
|
|
||||||
))),
|
|
||||||
Positioned(
|
Positioned(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -252,20 +267,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
FlavorsImg(
|
||||||
showElectricIcon(state.electricQuantity.value),
|
child: Image.asset(
|
||||||
width: 30.w,
|
showElectricIcon(state.electricQuantity.value),
|
||||||
height: 24.w),
|
width: 30.w,
|
||||||
|
height: 24.w),
|
||||||
|
),
|
||||||
SizedBox(width: 2.w),
|
SizedBox(width: 2.w),
|
||||||
Text("${state.electricQuantity.value}%",
|
Text("${state.electricQuantity.value}%",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
color: AppColors.darkGrayTextColor)),
|
color: AppColors.darkGrayTextColor)),
|
||||||
SizedBox(width: 2.w),
|
SizedBox(width: 2.w),
|
||||||
Icon(
|
FlavorsImg(
|
||||||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
child: Icon(
|
||||||
color: AppColors.mainColor, // 设置图标颜色为红色
|
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||||||
size: 25.w, // 设置图标大小为 30
|
color: AppColors.mainColor, // 设置图标颜色为红色
|
||||||
|
size: 25.w, // 设置图标大小为 30
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
],
|
],
|
||||||
@ -274,18 +293,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(showElectricIcon(state.electricQuantity.value),
|
FlavorsImg(
|
||||||
width: 30.w, height: 24.w),
|
child: Image.asset(
|
||||||
|
showElectricIcon(state.electricQuantity.value),
|
||||||
|
width: 30.w,
|
||||||
|
height: 24.w),
|
||||||
|
),
|
||||||
SizedBox(width: 2.w),
|
SizedBox(width: 2.w),
|
||||||
Text("--%",
|
Text("--%",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
color: AppColors.darkGrayTextColor)),
|
color: AppColors.darkGrayTextColor)),
|
||||||
SizedBox(width: 2.w),
|
SizedBox(width: 2.w),
|
||||||
Icon(
|
FlavorsImg(
|
||||||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
child: Icon(
|
||||||
color: AppColors.mainColor, // 设置图标颜色为红色
|
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||||||
size: 25.w, // 设置图标大小为 30
|
color: AppColors.mainColor, // 设置图标颜色为红色
|
||||||
|
size: 25.w, // 设置图标大小为 30
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
],
|
],
|
||||||
@ -294,7 +319,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 30.h),
|
F.sw(
|
||||||
|
defaultCall: () => SizedBox(height: 30.h),
|
||||||
|
xhjCall: () => SizedBox(height: 15.h),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
// width: 1.sw,
|
// width: 1.sw,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -317,37 +345,43 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
setState(() {
|
setState(() {
|
||||||
startUnLock();
|
startUnLock();
|
||||||
});
|
});
|
||||||
// startUnLock();
|
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
FlavorsImg(
|
||||||
state.openDoorBtnisUneable.value == false
|
child: Image.asset(
|
||||||
? 'images/main/icon_main_openLockBtn_grey.png'
|
state.openDoorBtnisUneable.value == false
|
||||||
: (state.isOpenPassageMode.value == 1
|
? 'images/main/icon_main_openLockBtn_grey.png'
|
||||||
? 'images/main/icon_main_normallyOpenMode_center.png'
|
: (state.isOpenPassageMode.value == 1
|
||||||
: 'images/main/icon_main_openLockBtn_center.png'),
|
? 'images/main/icon_main_normallyOpenMode_center.png'
|
||||||
width: 330.w,
|
: 'images/main/icon_main_openLockBtn_center.png'),
|
||||||
height: 330.w,
|
width: 330.w,
|
||||||
|
height: 330.w,
|
||||||
|
// color: AppColors.primaryTopColor,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
state.openDoorBtnisUneable.value == false
|
state.openDoorBtnisUneable.value == false
|
||||||
? Positioned(
|
? Positioned(
|
||||||
child: Image.asset(
|
child: FlavorsImg(
|
||||||
'images/main/icon_main_openLockBtn_grey.png',
|
child: Image.asset(
|
||||||
width: 330.w,
|
'images/main/icon_main_openLockBtn_grey.png',
|
||||||
height: 330.w,
|
width: 330.w,
|
||||||
|
height: 330.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: state.openLockBtnState.value == 1
|
: state.openLockBtnState.value == 1
|
||||||
? buildRotationTransition()
|
? buildRotationTransition()
|
||||||
: Positioned(
|
: Positioned(
|
||||||
|
child: FlavorsImg(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
state.isOpenPassageMode.value == 1
|
state.isOpenPassageMode.value == 1
|
||||||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
||||||
: 'images/main/icon_main_openLockBtn_circle.png',
|
: 'images/main/icon_main_openLockBtn_circle.png',
|
||||||
width: 330.w,
|
width: 330.w,
|
||||||
height: 330.w,
|
height: 330.w,
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -358,21 +392,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Text(
|
|
||||||
// '门已上锁',
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 26.sp,
|
|
||||||
// color: Colors.black,
|
|
||||||
// fontWeight: FontWeight.w500),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 6.h,
|
|
||||||
// ),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -388,47 +407,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
Row(
|
F.sw(defaultCall: () => adminInfoView(), xhjCall: () => SizedBox()),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'images/icon_electronicKey_admin.png',
|
|
||||||
width: 24.w,
|
|
||||||
height: 20.w,
|
|
||||||
color: AppColors.blackColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标)
|
|
||||||
),
|
|
||||||
SizedBox(width: 6.w),
|
|
||||||
Text(
|
|
||||||
state.keyInfos.value.isLockOwner == 1
|
|
||||||
? TranslationLoader.lanKeys!.superAdmin!.tr
|
|
||||||
: (state.keyInfos.value.keyRight == 1
|
|
||||||
? TranslationLoader.lanKeys!.authorizedAdmin!.tr
|
|
||||||
: TranslationLoader.lanKeys!.normalUser!.tr),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
|
||||||
),
|
|
||||||
SizedBox(width: 80.w),
|
|
||||||
Image.asset(
|
|
||||||
state.keyInfos.value.remoteEnable == 1
|
|
||||||
? 'images/main/icon_main_remoteUnlocking.png'
|
|
||||||
: 'images/main/icon_main_remoteUnlocking_grey.png',
|
|
||||||
width: 24.w,
|
|
||||||
height: 20.w,
|
|
||||||
// color: state.keyInfos.value.remoteEnable == 1
|
|
||||||
// ? AppColors.btnDisableColor
|
|
||||||
// : AppColors.mainColor,
|
|
||||||
),
|
|
||||||
SizedBox(width: 6.w),
|
|
||||||
Text(
|
|
||||||
TranslationLoader.lanKeys!.gatewayDevice!.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.sp,
|
|
||||||
color: state.keyInfos.value.remoteEnable == 1
|
|
||||||
? AppColors.mainColor
|
|
||||||
: AppColors.btnDisableColor),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
@ -442,6 +421,77 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget adminInfoView({bool center = true, bool add = false}) {
|
||||||
|
return Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
center ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_electronicKey_admin.png',
|
||||||
|
width: 24.w,
|
||||||
|
height: 20.w,
|
||||||
|
color: AppColors.blackColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标)
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
Text(
|
||||||
|
state.keyInfos.value.isLockOwner == 1
|
||||||
|
? TranslationLoader.lanKeys!.superAdmin!.tr
|
||||||
|
: (state.keyInfos.value.keyRight == 1
|
||||||
|
? TranslationLoader.lanKeys!.authorizedAdmin!.tr
|
||||||
|
: TranslationLoader.lanKeys!.normalUser!.tr),
|
||||||
|
style: TextStyle(fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
|
if (add) SizedBox(width: 20.w) else SizedBox(width: 80.w),
|
||||||
|
FlavorsImg(
|
||||||
|
child: Image.asset(
|
||||||
|
state.keyInfos.value.remoteEnable == 1
|
||||||
|
? 'images/main/icon_main_remoteUnlocking.png'
|
||||||
|
: 'images/main/icon_main_remoteUnlocking_grey.png',
|
||||||
|
width: 24.w,
|
||||||
|
height: 20.w,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.gatewayDevice!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
color: state.keyInfos.value.remoteEnable == 1
|
||||||
|
? AppColors.mainColor
|
||||||
|
: AppColors.btnDisableColor),
|
||||||
|
),
|
||||||
|
if (add) ...[
|
||||||
|
const Spacer(),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routers.selectLockTypePage);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
FlavorsImg(
|
||||||
|
child: Image.asset(
|
||||||
|
'images/mine/icon_mine_main_addLock.png',
|
||||||
|
width: 24.w,
|
||||||
|
height: 20.w,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.addDevice!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//旋转动画
|
//旋转动画
|
||||||
Widget buildRotationTransition() {
|
Widget buildRotationTransition() {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
@ -451,12 +501,14 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
//动画控制器
|
//动画控制器
|
||||||
turns: state.animationController!,
|
turns: state.animationController!,
|
||||||
//将要执行动画的子view
|
//将要执行动画的子view
|
||||||
child: Image.asset(
|
child: FlavorsImg(
|
||||||
state.isOpenPassageMode.value == 1
|
child: Image.asset(
|
||||||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
state.isOpenPassageMode.value == 1
|
||||||
: 'images/main/icon_main_openLockBtn_circle.png',
|
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
||||||
width: 330.w,
|
: 'images/main/icon_main_openLockBtn_circle.png',
|
||||||
height: 330.w,
|
width: 330.w,
|
||||||
|
height: 330.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -487,7 +539,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: ScreenUtil().screenWidth - 20.w,
|
width: ScreenUtil().screenWidth - 20.w,
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: 4,
|
crossAxisCount: F.sw(defaultCall: () => 4, xhjCall: () => 3),
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 20.w,
|
crossAxisSpacing: 20.w,
|
||||||
mainAxisSpacing: 0.h,
|
mainAxisSpacing: 0.h,
|
||||||
@ -532,12 +584,14 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: ScreenUtil().screenWidth - 20.w,
|
width: ScreenUtil().screenWidth - 20.w,
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: 4,
|
crossAxisCount: F.sw(defaultCall: () => 4, xhjCall: () => 3),
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 25.h,
|
crossAxisSpacing: 25.h,
|
||||||
mainAxisSpacing: 0.h,
|
mainAxisSpacing: 0.h,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: getBottomWidget()),
|
children: F.sw(
|
||||||
|
defaultCall: () => getBottomWidget(),
|
||||||
|
xhjCall: () => getBottomWidget().reversed.toList())),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,7 +608,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
// 普通用户
|
// 普通用户
|
||||||
List<Widget> getNormalWidget() {
|
List<Widget> getNormalWidget() {
|
||||||
var showWidgetArr = <Widget>[];
|
List<Widget> showWidgetArr = <Widget>[];
|
||||||
// 考勤
|
// 考勤
|
||||||
if (state.isAttendance.value == 1) {
|
if (state.isAttendance.value == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem(
|
||||||
@ -630,9 +684,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
TranslationLoader.lanKeys!.card!.tr,
|
TranslationLoader.lanKeys!.card!.tr,
|
||||||
state.openDoorBtnisUneable.value,
|
state.openDoorBtnisUneable.value,
|
||||||
state.bottomBtnisEable.value, () {
|
state.bottomBtnisEable.value, () {
|
||||||
// logic.showToast("普通用户第一次需要在锁旁边操作哦。", something: () {
|
|
||||||
// logic.showEasyLoading();
|
|
||||||
// });
|
|
||||||
Get.toNamed(Routers.cardListPage, arguments: {
|
Get.toNamed(Routers.cardListPage, arguments: {
|
||||||
"lockId": state.keyInfos.value.lockId,
|
"lockId": state.keyInfos.value.lockId,
|
||||||
});
|
});
|
||||||
@ -727,10 +778,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
arguments: {"keyInfo": state.keyInfos.value});
|
arguments: {"keyInfo": state.keyInfos.value});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
// bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr, state.bottomBtnisUneable.value, () {
|
|
||||||
// Get.toNamed(Routers.authorizedAdminListPage,
|
|
||||||
// arguments: {"keyInfo": state.keyInfos.value});
|
|
||||||
// })
|
|
||||||
|
|
||||||
var endWiddget = <Widget>[];
|
var endWiddget = <Widget>[];
|
||||||
endWiddget.add(
|
endWiddget.add(
|
||||||
@ -788,8 +835,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
//
|
//
|
||||||
Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable,
|
Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable,
|
||||||
bool bottomBtnisEable, Function() onClick) {
|
bool bottomBtnisEable, Function() onClick) {
|
||||||
var width = 42.w;
|
var width = F.sw(defaultCall: () => 42.w, xhjCall: () => 63.w);
|
||||||
var height = 42.h;
|
var height = F.sw(defaultCall: () => 42.h, xhjCall: () => 63.h);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: openDoorBtnisUneable
|
onTap: openDoorBtnisUneable
|
||||||
? (bottomBtnisEable
|
? (bottomBtnisEable
|
||||||
@ -807,16 +854,16 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
child: Image.asset(
|
child: FlavorsImg(
|
||||||
iconUrl,
|
child: Image.asset(iconUrl,
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
color: openDoorBtnisUneable
|
color: openDoorBtnisUneable
|
||||||
? (bottomBtnisEable
|
? (bottomBtnisEable
|
||||||
? AppColors.mainColor
|
? AppColors.mainColor
|
||||||
: AppColors.lockDetailBottomBtnUneable)
|
: AppColors.lockDetailBottomBtnUneable)
|
||||||
: AppColors.lockDetailBottomBtnUneable,
|
: AppColors.lockDetailBottomBtnUneable,
|
||||||
// fit: BoxFit.fitWidth
|
fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10.w),
|
||||||
@ -933,25 +980,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return formattedTime;
|
return formattedTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void showDeletAlertDialog(BuildContext context, String dateStr) {
|
|
||||||
// showCupertinoDialog(
|
|
||||||
// context: context,
|
|
||||||
// builder: (context) {
|
|
||||||
// return CupertinoAlertDialog(
|
|
||||||
// content: Text('锁更新时间:$dateStr'),
|
|
||||||
// actions: [
|
|
||||||
// CupertinoDialogAction(
|
|
||||||
// child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
|
||||||
// onPressed: () {
|
|
||||||
// Get.back();
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
startOpenLock() {
|
startOpenLock() {
|
||||||
if (state.openLockBtnState.value == 1) {
|
if (state.openLockBtnState.value == 1) {
|
||||||
return;
|
return;
|
||||||
@ -996,15 +1024,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @override
|
|
||||||
// void didChangeDependencies() {
|
|
||||||
// // TODO: implement didChangeDependencies
|
|
||||||
// super.didChangeDependencies();
|
|
||||||
//
|
|
||||||
// /// 路由订阅
|
|
||||||
// AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
@ -1043,12 +1062,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
BlueManage().disconnect();
|
BlueManage().disconnect();
|
||||||
state.openLockBtnState.value = 0;
|
state.openLockBtnState.value = 0;
|
||||||
|
|
||||||
// if(state.animationController != null){
|
|
||||||
// state.animationController.reset();
|
|
||||||
// state.animationController.forward();
|
|
||||||
// state.animationController.dispose();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 从下级返回 当前界面即将出现
|
/// 从下级返回 当前界面即将出现
|
||||||
@ -1068,9 +1081,5 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
state.openLockBtnState.value = 0;
|
state.openLockBtnState.value = 0;
|
||||||
|
|
||||||
// if (state.animationController!.isAnimating) {
|
|
||||||
// state.animationController!.stop();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: Container(
|
||||||
height: 100.h + Get.bottomBarHeight,
|
padding: EdgeInsets.only(top: 20.h),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
border: Border(
|
border: Border(
|
||||||
@ -89,28 +89,32 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: SafeArea(
|
||||||
children: [
|
top: false,
|
||||||
// navigationBarItem(Icons.start, '场景', false, () {
|
child: Row(
|
||||||
// logic.setIndex(0);
|
children: [
|
||||||
// }),
|
// navigationBarItem(Icons.start, '场景', false, () {
|
||||||
|
// logic.setIndex(0);
|
||||||
|
// }),
|
||||||
|
|
||||||
navigationBarItem(Icons.devices,
|
navigationBarItem(Icons.devices,
|
||||||
TranslationLoader.lanKeys!.device!.tr, logic, 0, () {
|
TranslationLoader.lanKeys!.device!.tr, logic, 0, () {
|
||||||
logic.setIndex(0);
|
logic.setIndex(0);
|
||||||
}),
|
}),
|
||||||
navigationBarItem(Icons.message,
|
navigationBarItem(Icons.message,
|
||||||
TranslationLoader.lanKeys!.message!.tr, logic, 1, () {
|
TranslationLoader.lanKeys!.message!.tr, logic, 1, () {
|
||||||
logic.setIndex(1);
|
logic.setIndex(1);
|
||||||
}),
|
}),
|
||||||
navigationBarItem(Icons.shopping_cart, '商城'.tr, logic, 2, () {
|
navigationBarItem(Icons.shopping_cart, '商城'.tr, logic, 2,
|
||||||
logic.setIndex(2);
|
() {
|
||||||
}),
|
logic.setIndex(2);
|
||||||
navigationBarItem(Icons.account_circle, '我的'.tr, logic, 3,
|
}),
|
||||||
() {
|
navigationBarItem(Icons.account_circle, '我的'.tr, logic, 3,
|
||||||
logic.setIndex(3);
|
() {
|
||||||
}),
|
logic.setIndex(3);
|
||||||
],
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
9
star_lock/lib/main_xhj_lite.dart
Normal file
9
star_lock/lib/main_xhj_lite.dart
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import 'flavors.dart';
|
||||||
|
|
||||||
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
|
Future<void> main() async {
|
||||||
|
F.appFlavor = Flavor.xhj;
|
||||||
|
F.isLite = true;
|
||||||
|
await runner.main();
|
||||||
|
}
|
||||||
@ -161,6 +161,16 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
|||||||
Get.toNamed(Routers.valueAddedServicesPage);
|
Get.toNamed(Routers.valueAddedServicesPage);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (widget.showAbout)
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.set!.tr,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed(Routers.mineSetPage);
|
||||||
|
},
|
||||||
|
),
|
||||||
if (widget.showAbout)
|
if (widget.showAbout)
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.about!.tr,
|
leftTitel: TranslationLoader.lanKeys!.about!.tr,
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class WxPayTool {
|
|||||||
static Future<void> pay(Payment payment, WeChatResponseSubscriber listener) async {
|
static Future<void> pay(Payment payment, WeChatResponseSubscriber listener) async {
|
||||||
if (!isInit) {
|
if (!isInit) {
|
||||||
isInit = true;
|
isInit = true;
|
||||||
await init(payment.appId, '123');
|
await init(payment.appId, 'https://lock.skychip.top/apple-app-site-association.json');
|
||||||
//回调
|
//回调
|
||||||
responseListener(WeChatResponse response) {
|
responseListener(WeChatResponse response) {
|
||||||
if (response is WeChatPaymentResponse) {
|
if (response is WeChatPaymentResponse) {
|
||||||
|
|||||||
27
star_lock/lib/widget/flavors_img.dart
Normal file
27
star_lock/lib/widget/flavors_img.dart
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import 'package:colorfilter_generator/addons.dart';
|
||||||
|
import 'package:colorfilter_generator/colorfilter_generator.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
|
|
||||||
|
class FlavorsImg extends StatelessWidget {
|
||||||
|
FlavorsImg({required this.child, key});
|
||||||
|
|
||||||
|
Widget child;
|
||||||
|
|
||||||
|
ColorFilterGenerator myFilter = ColorFilterGenerator(name: "xhj", filters: [
|
||||||
|
// ColorFilterAddons.addictiveColor(1, 22, 93),
|
||||||
|
ColorFilterAddons.addictiveColor(1, 22, 93),
|
||||||
|
// ColorFilterAddons.grayscale(),z
|
||||||
|
]);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (F.appFlavor != Flavor.xhj) {
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
return ColorFiltered(
|
||||||
|
colorFilter: ColorFilter.matrix(myFilter.matrix),
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -31,9 +31,11 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.26+20240408:打包预发布环境给欧阳测试
|
# 1.0.26+20240408:打包预发布环境给欧阳测试
|
||||||
# 1.0.27+2024041101:打包提审
|
# 1.0.27+2024041101:打包提审
|
||||||
# 1.0.27+2024041102:打包预发布环境给田总测试
|
# 1.0.27+2024041102:打包预发布环境给田总测试
|
||||||
# 1.0.28+2024041703:打包给欧阳回归测试
|
# 1.0.28+2024041702:打包给欧阳回归测试
|
||||||
|
# 1.0.27+2024041702 打包星星锁提审华为
|
||||||
|
# 1.0.27+2024041703 打包星星锁提审ios
|
||||||
|
|
||||||
version: 1.0.28+2024041703
|
version: 1.0.27+2024041803
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
@ -161,6 +163,7 @@ dependencies:
|
|||||||
fluwx: ^4.5.5
|
fluwx: ^4.5.5
|
||||||
system_settings: ^2.0.0
|
system_settings: ^2.0.0
|
||||||
expandable: ^5.0.1
|
expandable: ^5.0.1
|
||||||
|
colorfilter_generator: ^0.0.8
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user