diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 00000000..d50c782e
Binary files /dev/null and b/.DS_Store differ
diff --git a/star_lock/.gitignore b/star_lock/.gitignore
new file mode 100644
index 00000000..24476c5d
--- /dev/null
+++ b/star_lock/.gitignore
@@ -0,0 +1,44 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/star_lock/.metadata b/star_lock/.metadata
new file mode 100644
index 00000000..31b763f9
--- /dev/null
+++ b/star_lock/.metadata
@@ -0,0 +1,45 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled.
+
+version:
+ revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: android
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: ios
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: linux
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: macos
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: web
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ - platform: windows
+ create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+ base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/star_lock/README.md b/star_lock/README.md
new file mode 100644
index 00000000..debff993
--- /dev/null
+++ b/star_lock/README.md
@@ -0,0 +1,16 @@
+# star_lock
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/star_lock/analysis_options.yaml b/star_lock/analysis_options.yaml
new file mode 100644
index 00000000..61b6c4de
--- /dev/null
+++ b/star_lock/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/star_lock/android/.gitignore b/star_lock/android/.gitignore
new file mode 100644
index 00000000..6f568019
--- /dev/null
+++ b/star_lock/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/star_lock/android/app/build.gradle b/star_lock/android/app/build.gradle
new file mode 100644
index 00000000..2c82c384
--- /dev/null
+++ b/star_lock/android/app/build.gradle
@@ -0,0 +1,71 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.star_lock"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/star_lock/android/app/src/debug/AndroidManifest.xml b/star_lock/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 00000000..e38be3cb
--- /dev/null
+++ b/star_lock/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/star_lock/android/app/src/main/AndroidManifest.xml b/star_lock/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..0f4383a6
--- /dev/null
+++ b/star_lock/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/main/kotlin/com/example/star_lock/MainActivity.kt b/star_lock/android/app/src/main/kotlin/com/example/star_lock/MainActivity.kt
new file mode 100644
index 00000000..7cc68c46
--- /dev/null
+++ b/star_lock/android/app/src/main/kotlin/com/example/star_lock/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.star_lock
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/star_lock/android/app/src/main/res/drawable-v21/launch_background.xml b/star_lock/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 00000000..f74085f3
--- /dev/null
+++ b/star_lock/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/main/res/drawable/launch_background.xml b/star_lock/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 00000000..304732f8
--- /dev/null
+++ b/star_lock/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/star_lock/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..db77bb4b
Binary files /dev/null and b/star_lock/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/star_lock/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/star_lock/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..17987b79
Binary files /dev/null and b/star_lock/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/star_lock/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/star_lock/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..09d43914
Binary files /dev/null and b/star_lock/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/star_lock/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/star_lock/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..d5f1c8d3
Binary files /dev/null and b/star_lock/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/star_lock/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/star_lock/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..4d6372ee
Binary files /dev/null and b/star_lock/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/star_lock/android/app/src/main/res/values-night/styles.xml b/star_lock/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 00000000..06952be7
--- /dev/null
+++ b/star_lock/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/main/res/values/styles.xml b/star_lock/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..cb1ef880
--- /dev/null
+++ b/star_lock/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/profile/AndroidManifest.xml b/star_lock/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 00000000..41b3e34c
--- /dev/null
+++ b/star_lock/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/star_lock/android/build.gradle b/star_lock/android/build.gradle
new file mode 100644
index 00000000..83ae2200
--- /dev/null
+++ b/star_lock/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.6.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.1.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/star_lock/android/gradle.properties b/star_lock/android/gradle.properties
new file mode 100644
index 00000000..94adc3a3
--- /dev/null
+++ b/star_lock/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/star_lock/android/gradle/wrapper/gradle-wrapper.properties b/star_lock/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..cb24abda
--- /dev/null
+++ b/star_lock/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/star_lock/android/settings.gradle b/star_lock/android/settings.gradle
new file mode 100644
index 00000000..44e62bcf
--- /dev/null
+++ b/star_lock/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/star_lock/images/ic_menu_up_arrow.png b/star_lock/images/ic_menu_up_arrow.png
new file mode 100644
index 00000000..bacb2bbb
Binary files /dev/null and b/star_lock/images/ic_menu_up_arrow.png differ
diff --git a/star_lock/images/icon_item_checked.png b/star_lock/images/icon_item_checked.png
new file mode 100644
index 00000000..330c61fc
Binary files /dev/null and b/star_lock/images/icon_item_checked.png differ
diff --git a/star_lock/images/icon_lock.png b/star_lock/images/icon_lock.png
new file mode 100644
index 00000000..0d7054a3
Binary files /dev/null and b/star_lock/images/icon_lock.png differ
diff --git a/star_lock/images/icon_main_1024.png b/star_lock/images/icon_main_1024.png
new file mode 100644
index 00000000..aa0093ef
Binary files /dev/null and b/star_lock/images/icon_main_1024.png differ
diff --git a/star_lock/images/icon_right.png b/star_lock/images/icon_right.png
new file mode 100644
index 00000000..96479871
Binary files /dev/null and b/star_lock/images/icon_right.png differ
diff --git a/star_lock/images/icon_round_selet.png b/star_lock/images/icon_round_selet.png
new file mode 100644
index 00000000..10501495
Binary files /dev/null and b/star_lock/images/icon_round_selet.png differ
diff --git a/star_lock/images/icon_round_unSelet.png b/star_lock/images/icon_round_unSelet.png
new file mode 100644
index 00000000..c96a5f8e
Binary files /dev/null and b/star_lock/images/icon_round_unSelet.png differ
diff --git a/star_lock/images/icon_unHaveData.png b/star_lock/images/icon_unHaveData.png
new file mode 100644
index 00000000..9ca9b958
Binary files /dev/null and b/star_lock/images/icon_unHaveData.png differ
diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json
new file mode 100644
index 00000000..d2c03c74
--- /dev/null
+++ b/star_lock/images/lan/lan_en.json
@@ -0,0 +1,206 @@
+{
+ "starLock":"Star Lock",
+ "clickUnlockAndHoldDownClose":"Click To Unlock And Hold Down to Close",
+ "checkingIn":"Checking In",
+ "electronicKey":"Electronic Key",
+ "password":"Password",
+ "card":"Card",
+ "fingerprint":"Fingerprint",
+ "remoteControl":"RemoteControl",
+ "operatingRecord":"Operating Record",
+ "number":"Number",
+ "additive":"Additive",
+ "addTime":"Add Time",
+
+ "reset":"Reset",
+ "sendKey":"SendKey",
+ "timeLimit":"TimeLimit",
+ "permanent":"Permanent",
+ "once":"Once",
+ "circulation":"Circulation",
+ "receiver":"Receiver",
+ "pleaseEnterNumberOrEmail":"Please enter the number or email",
+ "name":"Name",
+ "enterYourName":"Please Enter Your Name",
+ "effectiveTime":"Effective Time",
+ "failureTime":"Failure Time",
+ "effectiveDate":"Effective Date",
+ "failureDate":"Failure Date",
+ "Monday":"M",
+ "Tuesday":"T",
+ "Wednesday":"W",
+ "Thursday":"T",
+ "Friday":"F",
+ "Saturday":"S",
+ "Sunday":"S",
+
+ "realNameAuthentication":"RealNameAuthentication",
+ "sendKeyBottomTip":"The recipient can use it unlimited times during the validity period",
+ "send":"Send",
+ "periodValidity":"PeriodValidity",
+ "sendGroupKey":"Send Group Key",
+ "lock":"Lock",
+ "pleaseAdd":"Please Add",
+ "pleaseSelet":"Please Selet",
+ "remoteUnlockingAllowed":"Remote Unlocking Allowed",
+ "pleaseEnter":"Please Enter",
+ "getPassword":"Get Password",
+ "custom":"Custom",
+ "clearAll":"ClearAll",
+ "recursiveDevice":"Recursive Device",
+ "pleaseNameYourPassword":"Please Name Your Password",
+ "pleaseEnterDigitsNumber":"pleaseEnter6",
+ "getPasswordTip1":"The password must be used at least once in the last 24 hours, otherwise it is invalid\n",
+ "getPasswordTip2":"The password can be used for an unlimited number of times in the next period. The password must be used at least once within 24 hours after it takes effect, otherwise it will be invalid\n",
+ "getPasswordTip3":"The password is valid for 6 hours and can only be used once\n",
+ "getPasswordTip4":"It can be added next to the lock via Bluetooth on the phone or remotely via the gateway\n",
+ "getPasswordTip5":"The password must be used at least once within the first 24 hours, otherwise it will be invalid\n",
+ "getPasswordTip6":"The password is valid for 24 hours. Entering it on the lock invalidates all previously used passwords\n",
+ "getTip":"Get",
+ "addTip":"Add",
+ "sender":"Sender",
+ "senderTime":"Sender Time",
+ "keyDetail":"Key Detail",
+ "detail":"Detail",
+ "delete":"Delete",
+ "passwordDetail":"Password Detail",
+ "share":"Share",
+ "amend":"Amend",
+ "sure":"Sure",
+ "cancel":"Cancel",
+
+ "add":"Add",
+ "accountNumber":"AccountNumber",
+ "volumeAuthorizationLock":"Volume Authorization Lock",
+ "authorizedAdminTip":"The authorized administrator has important access to this lock, so make sure you only send it to people you trust",
+ "lockOperatingRecordTip":"The historical records can be retained only for a certain period of time. If you want to retain historical records, export them in the upper right corner",
+
+ "basicInformation":"Basic Information",
+ "wirelessKeyboard":"Wireless Keyboard",
+ "doorMagnetic":"Door Magnetic",
+ "remoteUnlocking":"Remote Unlocking",
+ "automaticBlocking":"Automatic Blocking",
+ "normallyOpenMode":"Normally Open Mode",
+ "lockSound":"Lock Sound",
+ "burglarAlarm":"Burglar Alarm",
+ "resetButton":"Reset Button",
+ "lockTime":"Lock Time",
+ "diagnose":"Diagnose",
+ "uploadData":"Upload Data",
+ "importOtherLockData":"Import Other Lock Data",
+ "lockEscalation":"Lock Escalation",
+ "markedHouseState":"Marked House State",
+ "unlockReminder":"Unlock Reminder",
+ "unlockQRCode":"Unlock QR Code",
+ "lockNumber":"Lock Number",
+ "electricQuantity":"Electric Quantity",
+ "lockName":"Lock Name",
+ "lockGrouping":"Lock Grouping",
+ "adminOpenLockPassword":"Admin Open Lock Password",
+ "update":"Update",
+ "updateElectricQuantityTip":"The battery information can be updated remotely via the gateway or next to the lock via Bluetooth on the phone\n",
+ "adminOpenLockPasswordTip":"If you have changed the password on the lock, the actual valid password inside the lock may be different from the one shown here\n",
+ "updateLockAdminPassword":"Upload the lock administrator password",
+ "whenScreenFlashesClickNext":"When the screen flashes, click Next",
+ "theScreenNeverFlickered":"The screen never flickered",
+ "enterNumberOrPressSet":"Enter *529# or press the Settings key",
+ "theLocationOfTheSetKeyWillBeDifferent":"The location of the set key will be different",
+ "pressAndHoldTheResetButtonTwoSeconds":"Press And Hold The Reset Button 2 Seconds",
+ "nearbyEquipment":"Nearby Equipment",
+ "noData":"No Data",
+ "doorMagneticListTopTip":"You can query the open and close status of a door by using the door status sensor. Add a door magnet to each lock",
+ "remoteUnlockingPageTip":"When enabled, you will be able to open the lock remotely through the gateway. This function can only be turned on and off near the lock via Bluetooth on the phone.",
+ "currentMode":"Current Mode",
+ "delayTime":"Delay Time",
+ "automaticBlockingTip":"After the time set above, the lock will automatically close. After you enable or modify the Settings, open the lock once for the time to take effect",
+ "time":"Time",
+ "normallyOpen":"Normally Open",
+ "date":"Date",
+ "begin":"Begin",
+ "end":"End",
+ "allDay":"All Day",
+ "save":"Save",
+ "normallyOpenModeTip":"During the set normal opening time, the lock will remain open after opening until it is manually closed During the set normal opening time, the lock will remain open after opening until it is manually closed",
+ "pleaseSeletLockVolume":"Please Selet Lock Volume",
+ "lockSoundTip":"When the function is enabled, you can hear the prompt tone of the smart lock. Including low battery, incorrect password and so on.",
+ "low":"Low",
+ "lower":"Lower",
+ "medium":"Medium",
+ "high":"High",
+ "higher":"Higher",
+ "burglarAlarmTip":"After opening, an alarm sound will be issued when the lock is picked",
+ "resetButtonTip":"After opening, you can re-add with APP by long pressing the reset key on the lock. After closing, the reset key is invalid, and the lock can be re-added only after being deleted by app",
+ "calibrationTime":"Calibration Time",
+ "setTheDSTMode":"Set The DST Mode",
+ "diagnoseTip":"Diagnosis is to read the configuration information inside the lock and upload it so that the staff can analyze the cause of the failure",
+ "uploading":"Uploading",
+ "uploadDataTip":"This operation will upload the locked data to the server, which may take several minutes",
+ "importOtherLockDataTip":"Please select which lock you want to import from",
+ "haveNewVersion":"Have New Version",
+ "currentVersion":"Current Version",
+ "newVersion":"New Version",
+ "upgrade":"Upgrade",
+ "leisure":"Leisure",
+ "checkedIn":"Checked In",
+
+ "lanEnglish":"English",
+ "lanChinese":"Chinese",
+ "multilingual":"Multilingual",
+ "addLock":"Add Lock",
+ "gateway":"Gateway",
+ "message":"Message",
+ "supportStaff":"Support Staff",
+ "set":"Set",
+ "moreServices":"More Services",
+
+ "moreSet":"More Set",
+ "prompTone":"Promp Tone",
+ "touchUnlock":"Touch Unlock",
+ "pushNotification":"Push Notification",
+ "lockUserManagement":"Lock User Management",
+ "authorizedAdmin":"Authorized Admin",
+ "lockGroup":"Lock Group",
+ "transferSmartLock":"Transfer Smart Lock",
+ "multiLanguage":"Multi Language",
+ "lockScreen":"Lock Screen",
+ "closed":"Closed",
+ "opened":"Opened",
+ "hideInvalidUnlockPermissions":"Hide Invalid Unlock Permissions",
+ "appUnlockRequiresMobilePhoneAccessToTheLock":"APP Unlock Requires Mobile Phone Access To The Lock",
+ "valueAddedServices":"Value Added Services",
+ "about":"About",
+ "userAgreement":"User Agreement",
+ "privacyPolicy":"Privacy Policy",
+ "personalInformationCollectionList":"Personal Information Collection List",
+ "applicationPermissionDescription":"Application Permission Description",
+ "thirdPartyInformationSharingList":"Third party information sharing list",
+ "logout":"Logout",
+ "deleteAccount":"Delete Account",
+
+ "allLock":"All Lock",
+ "searchAllLockType":"Search All Lock Type",
+ "doorLock":"Door Lock",
+ "padlock":"Pad lock",
+ "safeLock":"Safe Lock",
+ "intelligentLockCore":"Intelligent Lock Core",
+ "parkingLock":"Parking Lock",
+ "bicycleLock":"Bicycle Lock",
+ "longRangeControl":"LongRange Control",
+ "lightTouchScreen":"Light Touch Screen",
+ "lightTouchScreenTip":"Light Touch Screen Tip",
+ "next":"Next",
+ "nearbyLock":"Nearby Lock",
+ "addSuccessfullyPleaseRename":"Add Successfully Please Rename",
+ "whenAddingLockThePhoneMustBeNextToTheLock":"When adding a lock, the phone must be next to the lock",
+
+ "login":"Login",
+ "register":"Register",
+ "forgetPassword":"Forget Password",
+ "readAndAgree":"I Have Read And Agree",
+ "verificationCode":"VerificationCode",
+ "registerPasswordTip":"The password must be 8-20 characters, including at least 2 of the numbers/letters/symbols",
+ "iphone":"Iphone",
+ "email":"Email",
+ "countryAndRegion":"Country And Region",
+ "selet":"Selet"
+}
diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json
new file mode 100644
index 00000000..a3ca2ae2
--- /dev/null
+++ b/star_lock/images/lan/lan_keys.json
@@ -0,0 +1,207 @@
+{
+ "starLock":"starLock",
+ "clickUnlockAndHoldDownClose":"clickUnlockAndHoldDownClose",
+ "checkingIn":"checkingIn",
+ "electronicKey":"electronicKey",
+ "password":"password",
+ "card":"card",
+ "fingerprint":"fingerprint",
+ "remoteControl":"remoteControl",
+ "operatingRecord":"operatingRecord",
+ "number":"number",
+ "additive":"additive",
+ "addTime":"addTime",
+
+ "reset":"reset",
+ "sendKey":"sendKey",
+ "timeLimit":"timeLimit",
+ "permanent":"permanent",
+ "once":"once",
+ "circulation":"circulation",
+ "receiver":"receiver",
+ "pleaseEnterNumberOrEmail":"pleaseEnterNumberOrEmail",
+ "name":"name",
+ "enterYourName":"enterYourName",
+ "effectiveTime":"effectiveTime",
+ "failureTime":"failureTime",
+ "effectiveDate":"effectiveDate",
+ "failureDate":"failureDate",
+ "Monday":"Monday",
+ "Tuesday":"Tuesday",
+ "Wednesday":"Wednesday",
+ "Thursday":"Thursday",
+ "Friday":"Friday",
+ "Saturday":"Saturday",
+ "Sunday":"Sunday",
+
+ "realNameAuthentication":"realNameAuthentication",
+ "sendKeyBottomTip":"sendKeyBottomTip",
+ "send":"send",
+ "periodValidity":"periodValidity",
+ "sendGroupKey":"sendGroupKey",
+ "lock":"lock",
+ "pleaseAdd":"pleaseAdd",
+ "pleaseSelet":"pleaseSelet",
+ "remoteUnlockingAllowed":"remoteUnlockingAllowed",
+ "pleaseEnter":"pleaseEnter",
+ "getPassword":"getPassword",
+ "custom":"custom",
+ "clearAll":"clearAll",
+ "recursiveDevice":"recursiveDevice",
+ "pleaseNameYourPassword":"pleaseNameYourPassword",
+ "pleaseEnterDigitsNumber":"pleaseEnter6",
+ "getPasswordTip1":"getPasswordTip1",
+ "getPasswordTip2":"getPasswordTip2",
+ "getPasswordTip3":"getPasswordTip3",
+ "getPasswordTip4":"getPasswordTip4",
+ "getPasswordTip5":"getPasswordTip5",
+ "getPasswordTip6":"getPasswordTip6",
+ "getTip":"getTip",
+ "addTip":"addTip",
+ "sender":"sender",
+ "senderTime":"senderTime",
+ "keyDetail":"keyDetail",
+ "detail":"detail",
+ "delete":"delete",
+ "passwordDetail":"passwordDetail",
+ "share":"share",
+ "amend":"amend",
+ "sure":"sure",
+ "cancel":"cancel",
+ "add":"add",
+ "accountNumber":"accountNumber",
+ "volumeAuthorizationLock":"volumeAuthorizationLock",
+ "authorizedAdminTip":"authorizedAdminTip",
+ "lockOperatingRecordTip":"lockOperatingRecordTip",
+
+ "basicInformation":"basicInformation",
+ "wirelessKeyboard":"wirelessKeyboard",
+ "doorMagnetic":"doorMagnetic",
+ "remoteUnlocking":"remoteUnlocking",
+ "automaticBlocking":"automaticBlocking",
+ "normallyOpenMode":"normallyOpenMode",
+ "lockSound":"lockSound",
+ "burglarAlarm":"burglarAlarm",
+ "resetButton":"resetButton",
+ "lockTime":"lockTime",
+ "diagnose":"diagnose",
+ "uploadData":"uploadData",
+ "importOtherLockData":"importOtherLockData",
+ "lockEscalation":"lockEscalation",
+ "markedHouseState":"markedHouseState",
+ "unlockReminder":"unlockReminder",
+ "unlockQRCode":"unlockQRCode",
+ "lockNumber":"lockNumber",
+ "electricQuantity":"electricQuantity",
+ "lockName":"lockName",
+ "lockGrouping":"lockGrouping",
+ "adminOpenLockPassword":"adminOpenLockPassword",
+ "update":"update",
+ "updateElectricQuantityTip":"updateElectricQuantityTip",
+ "adminOpenLockPasswordTip":"adminOpenLockPasswordTip",
+ "updateLockAdminPassword":"updateLockAdminPassword",
+ "whenScreenFlashesClickNext":"whenScreenFlashesClickNext",
+ "theScreenNeverFlickered":"theScreenNeverFlickered",
+ "enterNumberOrPressSet":"enterNumberOrPressSet",
+ "theLocationOfTheSetKeyWillBeDifferent":"theLocationOfTheSetKeyWillBeDifferent",
+ "pressAndHoldTheResetButtonTwoSeconds":"pressAndHoldTheResetButtonTwoSeconds",
+ "nearbyEquipment":"nearbyEquipment",
+ "noData":"noData",
+ "doorMagneticListTopTip":"doorMagneticListTopTip",
+ "remoteUnlockingPageTip":"remoteUnlockingPageTip",
+ "currentMode":"currentMode",
+ "delayTime":"delayTime",
+ "automaticBlockingTip":"automaticBlockingTip",
+ "time":"time",
+ "normallyOpen":"normallyOpen",
+ "date":"date",
+ "begin":"begin",
+ "end":"end",
+ "allDay":"allDay",
+ "save":"save",
+ "normallyOpenModeTip":"normallyOpenModeTip",
+ "pleaseSeletLockVolume":"pleaseSeletLockVolume",
+ "lockSoundTip":"lockSoundTip",
+ "low":"low",
+ "lower":"lower",
+ "medium":"medium",
+ "high":"high",
+ "higher":"higher",
+ "burglarAlarmTip":"burglarAlarmTip",
+ "resetButtonTip":"resetButtonTip",
+ "calibrationTime":"calibrationTime",
+ "setTheDSTMode":"setTheDSTMode",
+ "diagnoseTip":"diagnoseTip",
+ "uploading":"uploading",
+ "uploadDataTip":"uploadDataTip",
+ "importOtherLockDataTip":"importOtherLockDataTip",
+ "haveNewVersion":"haveNewVersion",
+ "currentVersion":"currentVersion",
+ "newVersion":"newVersion",
+ "upgrade":"upgrade",
+ "leisure":"leisure",
+ "checkedIn":"checkedIn",
+
+ "lanEnglish":"lanEnglish",
+ "lanChinese":"lanChinese",
+ "multilingual":"multilingual",
+ "addLock":"addLock",
+ "gateway":"gateway",
+ "message":"message",
+ "supportStaff":"supportStaff",
+ "set":"set",
+ "moreServices":"moreServices",
+
+ "moreSet":"moreSet",
+ "prompTone":"prompTone",
+ "touchUnlock":"touchUnlock",
+ "pushNotification":"pushNotification",
+ "lockUserManagement":"lockUserManagement",
+ "authorizedAdmin":"authorizedAdmin",
+ "lockGroup":"lockGroup",
+ "transferSmartLock":"transferSmartLock",
+ "transferGateway":"transferGateway",
+
+ "multiLanguage":"multiLanguage",
+ "lockScreen":"lockScreen",
+ "closed":"closed",
+ "opened":"opened",
+ "hideInvalidUnlockPermissions":"hideInvalidUnlockPermissions",
+ "appUnlockRequiresMobilePhoneAccessToTheLock":"appUnlockRequiresMobilePhoneAccessToTheLock",
+ "valueAddedServices":"valueAddedServices",
+ "about":"about",
+ "userAgreement":"userAgreement",
+ "privacyPolicy":"privacyPolicy",
+ "personalInformationCollectionList":"personalInformationCollectionList",
+ "applicationPermissionDescription":"applicationPermissionDescription",
+ "thirdPartyInformationSharingList":"thirdPartyInformationSharingList",
+ "logout":"logout",
+ "deleteAccount":"deleteAccount",
+
+ "allLock":"allLock",
+ "searchAllLockType":"searchAllLockType",
+ "doorLock":"doorLock",
+ "padlock":"padlock",
+ "safeLock":"safeLock",
+ "intelligentLockCore":"intelligentLockCore",
+ "parkingLock":"parkingLock",
+ "bicycleLock":"bicycleLock",
+ "longRangeControl":"longRangeControl",
+ "lightTouchScreen":"lightTouchScreen",
+ "lightTouchScreenTip":"lightTouchScreenTip",
+ "next":"next",
+ "nearbyLock":"nearbyLock",
+ "addSuccessfullyPleaseRename":"addSuccessfullyPleaseRename",
+ "whenAddingLockThePhoneMustBeNextToTheLock":"whenAddingLockThePhoneMustBeNextToTheLock",
+
+ "login":"login",
+ "register":"Register",
+ "forgetPassword":"forgetPassword",
+ "readAndAgree":"readAndAgree",
+ "verificationCode":"verificationCode",
+ "registerPasswordTip":"registerPasswordTip",
+ "iphone":"iphone",
+ "email":"email",
+ "countryAndRegion":"countryAndRegion",
+ "selet":"selet"
+}
\ No newline at end of file
diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json
new file mode 100644
index 00000000..6fd56a6d
--- /dev/null
+++ b/star_lock/images/lan/lan_zh.json
@@ -0,0 +1,206 @@
+{
+ "starLock":"星锁",
+ "clickUnlockAndHoldDownClose":"点击开锁,长按关闭",
+ "checkingIn":"考勤",
+ "electronicKey":"电子钥匙",
+ "password":"密码",
+ "card":"卡",
+ "fingerprint":"指纹",
+ "remoteControl":"遥控",
+ "operatingRecord":"操作记录",
+ "number":"号",
+ "additive":"添加者",
+ "addTime":"添加时间",
+
+ "reset":"重置",
+ "sendKey":"发送钥匙",
+ "timeLimit":"限时",
+ "permanent":"永久",
+ "once":"单次",
+ "circulation":"循环",
+ "receiver":"接收者",
+ "pleaseEnterNumberOrEmail":"请输入手机号或者邮箱",
+ "name":"姓名",
+ "enterYourName":"请输入姓名",
+ "effectiveTime":"生效时间",
+ "failureTime":"失效时间",
+ "effectiveDate":"生效日期",
+ "failureDate":"失效日期",
+ "Monday":"一",
+ "Tuesday":"二",
+ "Wednesday":"三",
+ "Thursday":"四",
+ "Friday":"五",
+ "Saturday":"六",
+ "Sunday":"日",
+
+ "realNameAuthentication":"实名认证",
+ "sendKeyBottomTip":"接收者在有效期内可以不限次数使用",
+ "send":"发送",
+ "periodValidity":"有效期",
+ "sendGroupKey":"群发钥匙",
+ "lock":"锁",
+ "pleaseAdd":"请添加",
+ "pleaseSelet":"请选择",
+ "remoteUnlockingAllowed":"允许远程开锁",
+ "pleaseEnter":"请输入",
+ "getPassword":"获取密码",
+ "custom":"自定义",
+ "clearAll":"清空",
+ "recursiveDevice":"循环方式",
+ "pleaseNameYourPassword":"请给密码命名",
+ "pleaseEnterDigitsNumber":"请输入6-9位数字",
+ "getPasswordTip1":"密码在24小时内至少要使用过一次,否则将无效",
+ "getPasswordTip2":"限时密码可以再有下期内不限次数使用 \\n密码在生效后的24小时内至少要使用过一次,否则将失效",
+ "getPasswordTip3":"密码有限期为6个小时,只能使用一次",
+ "getPasswordTip4":"可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加",
+ "getPasswordTip5":"密码在生效后的24小时内至少要使用过一次,否则将失效",
+ "getPasswordTip6":"密码有效期为24小时,在锁上输入后,将使之前使用过的密码都失效",
+ "getTip":"获取",
+ "addTip":"添加",
+ "sender":"发送人",
+ "senderTime":"发送时间",
+ "keyDetail":"钥匙详情",
+ "detail":"详情",
+ "delete":"删除",
+ "passwordDetail":"密码详情",
+ "share":"分享",
+ "amend":"修改",
+ "sure":"确定",
+ "cancel":"取消",
+ "add":"添加",
+ "accountNumber":"账号",
+ "volumeAuthorizationLock":"批量授权锁",
+ "authorizedAdminTip":"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
+ "lockOperatingRecordTip":"只能保留一定时间内的记录,如果您需要保留历史记录,可以在右上角导出",
+
+ "basicInformation":"基本信息",
+ "wirelessKeyboard":"无线键盘",
+ "doorMagnetic":"门磁",
+ "remoteUnlocking":"远程开锁",
+ "automaticBlocking":"自动闭锁",
+ "normallyOpenMode":"常开模式",
+ "lockSound":"锁声音",
+ "burglarAlarm":"防撬报警",
+ "resetButton":"重置键",
+ "lockTime":"锁时间",
+ "diagnose":"诊断",
+ "uploadData":"上传数据",
+ "importOtherLockData":"导入其他锁数据",
+ "lockEscalation":"锁升级",
+ "markedHouseState":"标记房态",
+ "unlockReminder":"开锁提醒",
+ "unlockQRCode":"开锁二维码",
+ "lockNumber":"锁编号",
+ "electricQuantity":"电量",
+ "lockName":"名称",
+ "lockGrouping":"锁分组",
+ "adminOpenLockPassword":"管理员开锁密码",
+ "update":"更新",
+ "updateElectricQuantityTip":"电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新",
+ "adminOpenLockPasswordTip":"如果你在锁上修改过密码,锁内实际有效密码与这里显示的可能不同",
+ "updateLockAdminPassword":"上传锁内管理员密码",
+ "whenScreenFlashesClickNext":"当屏幕闪烁时,点击下一步",
+ "theScreenNeverFlickered":"屏幕一直没有闪烁",
+ "enterNumberOrPressSet":"输入*529#或按设置键",
+ "theLocationOfTheSetKeyWillBeDifferent":"设置键的位置会有差异",
+ "pressAndHoldTheResetButtonTwoSeconds":"长按重置键2秒",
+ "nearbyEquipment":"附近的设备",
+ "noData":"暂无数据",
+ "doorMagneticListTopTip":"通过门磁可查询门的开、关状态。每把锁咳添加一个门磁",
+ "remoteUnlockingPageTip":"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
+ "currentMode":"当前模式",
+ "delayTime":"延迟时间",
+ "automaticBlockingTip":"经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效",
+ "time":"时间",
+ "normallyOpen":"常开",
+ "date":"日期",
+ "begin":"开始",
+ "end":"结束",
+ "allDay":"全天",
+ "save":"保存",
+ "normallyOpenModeTip":"在设置的常开时间内,锁呗打开后将一直处于打开的状态,直到被手动关闭",
+ "pleaseSeletLockVolume":"请选择锁音量",
+ "lockSoundTip":"功能开启后,你将可以听到智能锁的提示音。包括电量过低,密码错误等提示。",
+ "low":"低",
+ "lower":"较低",
+ "medium":"中",
+ "higher":"较高",
+ "high":"高",
+ "burglarAlarmTip":"开启后,锁被撬动时,会发出报警声",
+ "resetButtonTip":"开启后,可通过长按锁上的重置键来用APP重新添加\\n关闭后,重置键无效,锁要通过app删除后才能重新添加",
+ "calibrationTime":"校准时间",
+ "setTheDSTMode":"夏令时模式设置",
+ "diagnoseTip":"诊断是读取锁内的配置信息并上传,以便工作人员分析故障的原因",
+ "uploading":"上传",
+ "uploadDataTip":"本操作将上传锁内数据到服务器,过程可能需要几分钟,请耐心等待",
+ "importOtherLockDataTip":"请选择要从哪把锁导入",
+ "haveNewVersion":"有新版本",
+ "currentVersion":"当前版本",
+ "newVersion":"新版本",
+ "upgrade":"升级",
+ "leisure":"空闲",
+ "checkedIn":"已入住",
+
+ "lanEnglish":"英文",
+ "lanChinese":"中文",
+ "multilingual":"多语言",
+ "addLock":"添加锁",
+ "gateway":"网关",
+ "message":"消息",
+ "supportStaff":"客服",
+ "set":"设置",
+ "moreServices":"更多服务",
+
+ "moreSet":"更多设置",
+ "prompTone":"提示音",
+ "touchUnlock":"触摸开锁",
+ "pushNotification":"消息推送",
+ "lockUserManagement":"锁用户管理",
+ "authorizedAdmin":"授权管理员",
+ "lockGroup":"锁分组",
+ "transferSmartLock":"转移智能锁",
+ "transferGateway":"转移网关",
+ "multiLanguage":"多语言",
+ "lockScreen":"锁屏",
+ "closed":"已关闭",
+ "opened":"已开启",
+ "hideInvalidUnlockPermissions":"隐藏无效开锁权限",
+ "appUnlockRequiresMobilePhoneAccessToTheLock":"APP开锁时需手机连网的锁",
+ "valueAddedServices":"增值服务",
+ "about":"关于",
+ "userAgreement":"用户协议",
+ "privacyPolicy":"隐私政策",
+ "personalInformationCollectionList":"个人信息收集清单",
+ "applicationPermissionDescription":"应用权限说明",
+ "thirdPartyInformationSharingList":"第三方信息共享清单",
+ "logout":"退出",
+ "deleteAccount":"删除账号",
+
+ "allLock":"所有锁",
+ "searchAllLockType":"搜索所有锁类型",
+ "doorLock":"门锁",
+ "padlock":"挂锁",
+ "safeLock":"保险箱锁",
+ "intelligentLockCore":"智能锁芯",
+ "parkingLock":"车位锁",
+ "bicycleLock":"自行车锁",
+ "longRangeControl":"远程控制",
+ "lightTouchScreen":"摸亮触摸屏",
+ "lightTouchScreenTip":"摸亮触摸屏,锁进入可添加状态,点击下一步",
+ "next":"下一步",
+ "nearbyLock":"附近的锁",
+ "addSuccessfullyPleaseRename":"添加成功,请重命名",
+ "whenAddingLockThePhoneMustBeNextToTheLock":"添加锁时,手机必须在锁旁边",
+
+ "login":"登录",
+ "register":"注册",
+ "forgetPassword":"忘记密码",
+ "readAndAgree":"我已阅读并同意",
+ "verificationCode":"验证码",
+ "registerPasswordTip":"密码必须是8-20位,至少包括数字/字母/符号中的2种",
+ "iphone":"手机",
+ "email":"邮箱",
+ "countryAndRegion":"国家/地区",
+ "selet":"选择"
+}
\ No newline at end of file
diff --git a/star_lock/images/main/icon_addDoorMagnetic_tip.png b/star_lock/images/main/icon_addDoorMagnetic_tip.png
new file mode 100644
index 00000000..a2fadc4f
Binary files /dev/null and b/star_lock/images/main/icon_addDoorMagnetic_tip.png differ
diff --git a/star_lock/images/main/icon_addWirelessKeyboardTip.png b/star_lock/images/main/icon_addWirelessKeyboardTip.png
new file mode 100644
index 00000000..e752b914
Binary files /dev/null and b/star_lock/images/main/icon_addWirelessKeyboardTip.png differ
diff --git a/star_lock/images/main/icon_addWirelessKeyboardUnLightOnTip.png b/star_lock/images/main/icon_addWirelessKeyboardUnLightOnTip.png
new file mode 100644
index 00000000..cd0ce2a4
Binary files /dev/null and b/star_lock/images/main/icon_addWirelessKeyboardUnLightOnTip.png differ
diff --git a/star_lock/images/main/icon_main_addLock.png b/star_lock/images/main/icon_main_addLock.png
new file mode 100644
index 00000000..9c640139
Binary files /dev/null and b/star_lock/images/main/icon_main_addLock.png differ
diff --git a/star_lock/images/main/icon_main_authorizedAdmin.png b/star_lock/images/main/icon_main_authorizedAdmin.png
new file mode 100644
index 00000000..cdf18471
Binary files /dev/null and b/star_lock/images/main/icon_main_authorizedAdmin.png differ
diff --git a/star_lock/images/main/icon_main_cell.png b/star_lock/images/main/icon_main_cell.png
new file mode 100644
index 00000000..ceeeb8dd
Binary files /dev/null and b/star_lock/images/main/icon_main_cell.png differ
diff --git a/star_lock/images/main/icon_main_clockingIn.png b/star_lock/images/main/icon_main_clockingIn.png
new file mode 100644
index 00000000..d21ba58e
Binary files /dev/null and b/star_lock/images/main/icon_main_clockingIn.png differ
diff --git a/star_lock/images/main/icon_main_electronicKey.png b/star_lock/images/main/icon_main_electronicKey.png
new file mode 100644
index 00000000..577e2336
Binary files /dev/null and b/star_lock/images/main/icon_main_electronicKey.png differ
diff --git a/star_lock/images/main/icon_main_fingerprint.png b/star_lock/images/main/icon_main_fingerprint.png
new file mode 100644
index 00000000..6e211f0a
Binary files /dev/null and b/star_lock/images/main/icon_main_fingerprint.png differ
diff --git a/star_lock/images/main/icon_main_icCard.png b/star_lock/images/main/icon_main_icCard.png
new file mode 100644
index 00000000..68930543
Binary files /dev/null and b/star_lock/images/main/icon_main_icCard.png differ
diff --git a/star_lock/images/main/icon_main_lockSet_lockEscalation.png b/star_lock/images/main/icon_main_lockSet_lockEscalation.png
new file mode 100644
index 00000000..db64bb71
Binary files /dev/null and b/star_lock/images/main/icon_main_lockSet_lockEscalation.png differ
diff --git a/star_lock/images/main/icon_main_openLockBtn.png b/star_lock/images/main/icon_main_openLockBtn.png
new file mode 100644
index 00000000..52cf88e5
Binary files /dev/null and b/star_lock/images/main/icon_main_openLockBtn.png differ
diff --git a/star_lock/images/main/icon_main_operatingRecord.png b/star_lock/images/main/icon_main_operatingRecord.png
new file mode 100644
index 00000000..698e0eb2
Binary files /dev/null and b/star_lock/images/main/icon_main_operatingRecord.png differ
diff --git a/star_lock/images/main/icon_main_password.png b/star_lock/images/main/icon_main_password.png
new file mode 100644
index 00000000..a6cb4df3
Binary files /dev/null and b/star_lock/images/main/icon_main_password.png differ
diff --git a/star_lock/images/main/icon_main_remoteControl.png b/star_lock/images/main/icon_main_remoteControl.png
new file mode 100644
index 00000000..a71016d9
Binary files /dev/null and b/star_lock/images/main/icon_main_remoteControl.png differ
diff --git a/star_lock/images/main/icon_main_remoteUnlocking.png b/star_lock/images/main/icon_main_remoteUnlocking.png
new file mode 100644
index 00000000..46924b35
Binary files /dev/null and b/star_lock/images/main/icon_main_remoteUnlocking.png differ
diff --git a/star_lock/images/main/icon_main_search.png b/star_lock/images/main/icon_main_search.png
new file mode 100644
index 00000000..1128d404
Binary files /dev/null and b/star_lock/images/main/icon_main_search.png differ
diff --git a/star_lock/images/main/icon_main_set.png b/star_lock/images/main/icon_main_set.png
new file mode 100644
index 00000000..4f23cb4e
Binary files /dev/null and b/star_lock/images/main/icon_main_set.png differ
diff --git a/star_lock/images/main/mainLeft_menu_icon.png b/star_lock/images/main/mainLeft_menu_icon.png
new file mode 100644
index 00000000..bff9ae26
Binary files /dev/null and b/star_lock/images/main/mainLeft_menu_icon.png differ
diff --git a/star_lock/images/mine/icon_mine_main_addLock.png b/star_lock/images/mine/icon_mine_main_addLock.png
new file mode 100644
index 00000000..627bd844
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_addLock.png differ
diff --git a/star_lock/images/mine/icon_mine_main_defaultAvatar.png b/star_lock/images/mine/icon_mine_main_defaultAvatar.png
new file mode 100644
index 00000000..1a1012d1
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_defaultAvatar.png differ
diff --git a/star_lock/images/mine/icon_mine_main_gateway.png b/star_lock/images/mine/icon_mine_main_gateway.png
new file mode 100644
index 00000000..9ed9ccd1
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_gateway.png differ
diff --git a/star_lock/images/mine/icon_mine_main_message.png b/star_lock/images/mine/icon_mine_main_message.png
new file mode 100644
index 00000000..4d486df2
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_message.png differ
diff --git a/star_lock/images/mine/icon_mine_main_moreServices.png b/star_lock/images/mine/icon_mine_main_moreServices.png
new file mode 100644
index 00000000..1da757a7
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_moreServices.png differ
diff --git a/star_lock/images/mine/icon_mine_main_set.png b/star_lock/images/mine/icon_mine_main_set.png
new file mode 100644
index 00000000..1663d2ff
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_set.png differ
diff --git a/star_lock/images/mine/icon_mine_main_supportStaff.png b/star_lock/images/mine/icon_mine_main_supportStaff.png
new file mode 100644
index 00000000..0a0f0b2b
Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_supportStaff.png differ
diff --git a/star_lock/images/tabbar/icon_tab_main_selet.png b/star_lock/images/tabbar/icon_tab_main_selet.png
new file mode 100644
index 00000000..21552ddc
Binary files /dev/null and b/star_lock/images/tabbar/icon_tab_main_selet.png differ
diff --git a/star_lock/images/tabbar/icon_tab_main_unselet.png b/star_lock/images/tabbar/icon_tab_main_unselet.png
new file mode 100644
index 00000000..b497c09e
Binary files /dev/null and b/star_lock/images/tabbar/icon_tab_main_unselet.png differ
diff --git a/star_lock/images/tabbar/icon_tab_my_selet.png b/star_lock/images/tabbar/icon_tab_my_selet.png
new file mode 100644
index 00000000..f06eb894
Binary files /dev/null and b/star_lock/images/tabbar/icon_tab_my_selet.png differ
diff --git a/star_lock/images/tabbar/icon_tab_my_unselet.png b/star_lock/images/tabbar/icon_tab_my_unselet.png
new file mode 100644
index 00000000..7511da6e
Binary files /dev/null and b/star_lock/images/tabbar/icon_tab_my_unselet.png differ
diff --git a/star_lock/ios/.gitignore b/star_lock/ios/.gitignore
new file mode 100644
index 00000000..7a7f9873
--- /dev/null
+++ b/star_lock/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/star_lock/ios/Flutter/AppFrameworkInfo.plist b/star_lock/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 00000000..9625e105
--- /dev/null
+++ b/star_lock/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 11.0
+
+
diff --git a/star_lock/ios/Flutter/Debug.xcconfig b/star_lock/ios/Flutter/Debug.xcconfig
new file mode 100644
index 00000000..ec97fc6f
--- /dev/null
+++ b/star_lock/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/star_lock/ios/Flutter/Release.xcconfig b/star_lock/ios/Flutter/Release.xcconfig
new file mode 100644
index 00000000..c4855bfe
--- /dev/null
+++ b/star_lock/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/star_lock/ios/Podfile b/star_lock/ios/Podfile
new file mode 100644
index 00000000..d207307f
--- /dev/null
+++ b/star_lock/ios/Podfile
@@ -0,0 +1,38 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '11.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/star_lock/ios/Podfile.lock b/star_lock/ios/Podfile.lock
new file mode 100644
index 00000000..9c90cf90
--- /dev/null
+++ b/star_lock/ios/Podfile.lock
@@ -0,0 +1,41 @@
+PODS:
+ - device_info_plus (0.0.1):
+ - Flutter
+ - Flutter (1.0.0)
+ - flutter_native_contact_picker (0.0.1):
+ - Flutter
+ - package_info_plus (0.4.5):
+ - Flutter
+ - path_provider_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+
+DEPENDENCIES:
+ - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
+ - Flutter (from `Flutter`)
+ - flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`)
+ - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
+
+EXTERNAL SOURCES:
+ device_info_plus:
+ :path: ".symlinks/plugins/device_info_plus/ios"
+ Flutter:
+ :path: Flutter
+ flutter_native_contact_picker:
+ :path: ".symlinks/plugins/flutter_native_contact_picker/ios"
+ package_info_plus:
+ :path: ".symlinks/plugins/package_info_plus/ios"
+ path_provider_foundation:
+ :path: ".symlinks/plugins/path_provider_foundation/ios"
+
+SPEC CHECKSUMS:
+ device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
+ flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907
+ package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
+ path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
+
+PODFILE CHECKSUM: 663715e941f9adb426e33bf9376914006f9ea95b
+
+COCOAPODS: 1.12.1
diff --git a/star_lock/ios/Runner.xcodeproj/project.pbxproj b/star_lock/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..908be74a
--- /dev/null
+++ b/star_lock/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,532 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 3ED61D98CC08F93BC18EEFD0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B7537A79A618D0BBB434A17B /* libPods-Runner.a */; };
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ 99F6494C6B1A24363CCC6D32 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ B7537A79A618D0BBB434A17B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ BDB5B400176768766E85D5EB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ DC20461C9C4624BEB2DCD779 /* 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 = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3ED61D98CC08F93BC18EEFD0 /* libPods-Runner.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 780FAA17A040B9755AD6154A /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ DC20461C9C4624BEB2DCD779 /* Pods-Runner.debug.xcconfig */,
+ 99F6494C6B1A24363CCC6D32 /* Pods-Runner.release.xcconfig */,
+ BDB5B400176768766E85D5EB /* Pods-Runner.profile.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
+ 9304F75C378DB3447BB2408C /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ B7537A79A618D0BBB434A17B /* libPods-Runner.a */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 780FAA17A040B9755AD6154A /* Pods */,
+ 9304F75C378DB3447BB2408C /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146F21CF9000F007C117D /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 03BC065FC3064C0B6EE97546 /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 03BC065FC3064C0B6EE97546 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+ 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 7NLFRKNVY3;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.starLock;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 7NLFRKNVY3;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.starLock;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 7NLFRKNVY3;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.starLock;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/star_lock/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..919434a6
--- /dev/null
+++ b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..f9b0d7c5
--- /dev/null
+++ b/star_lock/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/star_lock/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/star_lock/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 00000000..c87d15a3
--- /dev/null
+++ b/star_lock/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/star_lock/ios/Runner.xcworkspace/contents.xcworkspacedata b/star_lock/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..21a3cc14
--- /dev/null
+++ b/star_lock/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/star_lock/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/star_lock/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/star_lock/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/star_lock/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/star_lock/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..f9b0d7c5
--- /dev/null
+++ b/star_lock/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/star_lock/ios/Runner/AppDelegate.h b/star_lock/ios/Runner/AppDelegate.h
new file mode 100644
index 00000000..36e21bbf
--- /dev/null
+++ b/star_lock/ios/Runner/AppDelegate.h
@@ -0,0 +1,6 @@
+#import
+#import
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end
diff --git a/star_lock/ios/Runner/AppDelegate.m b/star_lock/ios/Runner/AppDelegate.m
new file mode 100644
index 00000000..70e83933
--- /dev/null
+++ b/star_lock/ios/Runner/AppDelegate.m
@@ -0,0 +1,13 @@
+#import "AppDelegate.h"
+#import "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [GeneratedPluginRegistrant registerWithRegistry:self];
+ // Override point for customization after application launch.
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+@end
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000..d36b1fab
--- /dev/null
+++ b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 00000000..dc9ada47
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 00000000..28c6bf03
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 00000000..f091b6b0
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 00000000..4cde1211
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 00000000..d0ef06e7
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 00000000..dcdc2306
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 00000000..c8f9ed8f
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 00000000..75b2d164
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 00000000..c4df70d3
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 00000000..6a84f41e
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 00000000..d0e1f585
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 00000000..0bedcf2f
--- /dev/null
+++ b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 00000000..89c2725b
--- /dev/null
+++ b/star_lock/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/star_lock/ios/Runner/Base.lproj/LaunchScreen.storyboard b/star_lock/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000..f2e259c7
--- /dev/null
+++ b/star_lock/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/star_lock/ios/Runner/Base.lproj/Main.storyboard b/star_lock/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..f3c28516
--- /dev/null
+++ b/star_lock/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/star_lock/ios/Runner/Info.plist b/star_lock/ios/Runner/Info.plist
new file mode 100644
index 00000000..9023ff34
--- /dev/null
+++ b/star_lock/ios/Runner/Info.plist
@@ -0,0 +1,53 @@
+
+
+
+
+ NSContactsUsageDescription
+ Reason we need access to the contact list
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Star Lock
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ star_lock
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/star_lock/ios/Runner/main.m b/star_lock/ios/Runner/main.m
new file mode 100644
index 00000000..dff6597e
--- /dev/null
+++ b/star_lock/ios/Runner/main.m
@@ -0,0 +1,9 @@
+#import
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char* argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart
new file mode 100644
index 00000000..8b66f312
--- /dev/null
+++ b/star_lock/lib/appRouters.dart
@@ -0,0 +1,367 @@
+
+import 'package:get/get.dart';
+import 'package:star_lock/mine/mineSet/mineSet_page.dart';
+
+import 'login/forgetPassword/starLock_forgetPassword_page.dart';
+import 'login/login/starLock_login_page.dart';
+import 'login/register/starLock_register_page.dart';
+import 'login/seletCountryRegion/seletCountryRegion_page.dart';
+import 'main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart';
+import 'main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart';
+import 'main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart';
+import 'main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart';
+import 'main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart';
+import 'main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart';
+import 'main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart';
+import 'main/lockDetail/lcokSet/diagnose/diagnose_page.dart';
+import 'main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart';
+import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart';
+import 'main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart';
+import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_Page.dart';
+import 'main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart';
+import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart';
+import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart';
+import 'main/lockDetail/lcokSet/lockTime/lockTime_page.dart';
+import 'main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart';
+import 'main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart';
+import 'main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart';
+import 'main/lockDetail/lcokSet/resetButton/resetButton_page.dart';
+import 'main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart';
+import 'main/lockDetail/lcokSet/uploadData/uploadData_page.dart';
+import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart';
+import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart';
+import 'main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart';
+import 'main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart';
+import 'mine/addLock/addLock/addLock_page.dart';
+import 'main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart';
+import 'main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart';
+import 'main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart';
+import 'main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart';
+import 'main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart';
+import 'main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart';
+import 'main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart';
+import 'main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart';
+import 'main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart';
+import 'main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart';
+import 'main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart';
+import 'main/lockDetail/lockDetail/lockDetail_page.dart';
+import 'main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart';
+import 'main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart';
+import 'main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart';
+import 'main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart';
+import 'main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart';
+import 'main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart';
+import 'main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart';
+import 'main/lockMian/lockMain_page.dart';
+import 'mine/addLock/lockAddress/lockAddress_page.dart';
+import 'mine/addLock/nearbyLock/nearbyLock_page.dart';
+import 'mine/addLock/saveLock/saveLock_page.dart';
+import 'mine/addLock/seletLockType/seletLockType_page.dart';
+import 'mine/mineMultiLanguage/mineMultiLanguage_page.dart';
+import 'mine/mine_page.dart';
+import 'starLockApplication.dart';
+
+abstract class Routers {
+ static const initial = '/';// 加载页
+ static const starLockMain = '/StarLockMain';// 首页
+ static const starLockMinePage = '/StarLockMinePage';// 我的
+ static const seletLockTypePage = '/SeletLockTypePage';// 选择锁类型
+ static const addLockPage = '/AddLockPage';// 选择锁类型
+ static const nearbyLockPage = '/NearbyLockPage';// 附近的锁
+ static const lockAddressPage = '/LockAddressPage';// 锁地址
+ static const saveLockPage = '/SaveLockPage';// 保存锁
+ static const lockDetailPage = '/LockDetailPage';// 锁详情
+ static const electronicKeyListPage = '/ElectronicKeyListPage';// 电子钥匙列表
+ static const electronicKeyDetailPage = '/ElectronicKeyDetailPage';// 电子钥匙详情
+ static const electronicKeyDetailChangeDate = '/ElectronicKeyDetailChangeDate';// 修改有效期
+ static const sendElectronicKeyManagePage = '/SendElectronicKeyManagePage';// 发送电子钥匙
+ static const massSendElectronicKeyManagePage = '/MassSendElectronicKeyManagePage';// 群发钥匙
+ static const electronicKeyPeriodValidityPage = '/ElectronicKeyPeriodValidityPage';// 电子钥匙有效期
+ static const sendEmailNotificationPage = '/SendEmailNotificationPage';// 邮件通知
+ static const passwordKeyListPage = '/PasswordKeyListPage';// 密码钥匙列表
+ static const passwordKeyManagePage = '/PasswordKeyManagePage';// 密码钥匙
+ static const passwordKeyDetailPage = '/PasswordKeyDetailPage';// 密码钥匙详情
+ static const otherTypeKeyListPage = '/OtherTypeKeyListPage';// 卡、指纹、遥控钥匙列表
+ static const otherTypeKeyDetailPage = '/OtherTypeKeyDetailPage';// 卡、指纹、遥控钥匙详情
+ static const otherTypeKeyManagePage = '/OtherTypeKeyManagePage';// 卡、指纹、遥控钥匙添加
+ static const authorizedAdminListPage = '/AuthorizedAdminListPage';// 授权管理员列表
+ static const authorizedAdminDetailPage = '/AuthorizedAdminDetailPage';// 授权管理员详情
+ static const authorizedAdminManagePage = '/AuthorizedAdminManagePage';// 授权管理员
+ static const volumeAuthorizationLockManagePage = '/VolumeAuthorizationLockManagePage';// 批量授权锁
+ static const lockOperatingRecordPage = '/LockOperatingRecordPage';// 操作记录
+ static const lockSetPage = '/LockSetPage';// 锁设置
+ static const basicInformationPage = '/BasicInformationPage';// 基本信息
+ static const uploadElectricQuantityPage = '/UploadElectricQuantityPage';// 更新锁电量
+ static const editLockNamePage = '/EditLockNamePage';// 修改锁名字
+ static const lockSeletGroupingPage = '/LockSeletGroupingPage';// 锁选择分组
+ static const adminOpenLockPasswordPage = '/AdminOpenLockPasswordPage';// 管理员开锁密码
+ static const wirelessKeyboardPage = '/WirelessKeyboardPage';// 蓝牙键盘
+ static const addWirelessKeyboardPage = '/AddWirelessKeyboardPage';// 添加蓝牙键盘
+ static const addWirelessKeyboardScreenNotLightOnPage = '/AddWirelessKeyboardScreenNotLightOnPage';// 添加蓝牙键盘屏幕不亮时提示
+ static const seletWirelessKeyboardPage = '/SeletWirelessKeyboardPage';// 选择蓝牙键盘
+ static const doorMagneticPage = '/DoorMagneticPage';// 门磁列表
+ static const addDoorMagneticPage = '/AddDoorMagneticPage';// 添加门磁
+ static const nearbyDoorMagneticPage = '/NearbyDoorMagneticPage';// 附近的门磁
+ static const remoteUnlockingPage = '/RemoteUnlockingPage';// 远程开锁
+ static const automaticBlockingPage = '/AutomaticBlockingPage';// 自动闭锁
+ static const normallyOpenModePage = '/NormallyOpenModePage';// 常开模式
+ static const lockSoundSetPage = '/LockSoundSetPage';// 锁声音
+ static const burglarAlarmPage = '/BurglarAlarmPage';// 防撬警报
+ static const resetButtonPage = '/ResetButtonPage';// 锁重置键
+ static const unlockQRCodePage = '/UnlockQRCodePage';// 开锁二维码
+ static const lockTimePage = '/LockTimePage';// 锁时间
+ static const diagnosePage = '/DiagnosePage';// 诊断
+ static const uploadDataPage = '/UploadDataPage';// 上传数据
+ static const importOtherLockDataPage = '/ImportOtherLockDataPage';// 导入其他锁数据
+ static const lockEscalationPage = '/LockEscalationPage';// 锁升级
+ static const markedHouseStatePage = '/MarkedHouseStatePage';// 标记房态
+
+ static const mineSetPage = '/MineSetPage';// 我的设置
+ static const mineMultiLanguagePage = '/MineMultiLanguagePage';// 我的设置
+
+ static const starLockLoginPage = '/StarLockLoginPage';// 登录
+ static const starLockRegisterPage = '/StarLockRegisterPage';// 注册
+ static const starLockForgetPasswordPage = '/StarLockForgetPasswordPage';// 忘记密码
+ static const seletCountryRegionPage = '/SeletCountryRegionPage';// 选择国家和地区
+}
+
+abstract class AppRouters {
+ static final routePages = [
+ GetPage(
+ name: Routers.initial,
+ page: () => const StarLockApplication(),
+ ),
+ GetPage(
+ name: Routers.starLockMain,
+ page: () => const StarLockMain(),
+ ),
+ GetPage(
+ name: Routers.starLockMinePage,
+ page: () => const StarLockMinePage(),
+ ),
+ GetPage(
+ name: Routers.seletLockTypePage,
+ page: () => const SeletLockTypePage(),
+ ),
+ GetPage(
+ name: Routers.addLockPage,
+ page: () => const AddLockPage(),
+ ),
+ GetPage(
+ name: Routers.nearbyLockPage,
+ page: () => const NearbyLockPage(),
+ ),
+ GetPage(
+ name: Routers.saveLockPage,
+ page: () => const SaveLockPage(),
+ ),
+ GetPage(
+ name: Routers.lockDetailPage,
+ page: () => const LockDetailPage(),
+ ),
+ GetPage(
+ name: Routers.electronicKeyListPage,
+ page: () => const ElectronicKeyListPage(),
+ ),
+ GetPage(
+ name: Routers.electronicKeyDetailPage,
+ page: () => const ElectronicKeyDetailPage(),
+ ),
+ GetPage(
+ name: Routers.electronicKeyDetailChangeDate,
+ page: () => const ElectronicKeyDetailChangeDate(),
+ ),
+ GetPage(
+ name: Routers.sendElectronicKeyManagePage,
+ page: () => const SendElectronicKeyManagePage(),
+ ),
+ GetPage(
+ name: Routers.massSendElectronicKeyManagePage,
+ page: () => const MassSendElectronicKeyManagePage(),
+ ),
+ GetPage(
+ name: Routers.electronicKeyPeriodValidityPage,
+ page: () => const ElectronicKeyPeriodValidityPage(),
+ ),
+ GetPage(
+ name: Routers.sendEmailNotificationPage,
+ page: () => const SendEmailNotificationPage(),
+ ),
+ GetPage(
+ name: Routers.passwordKeyListPage,
+ page: () => const PasswordKeyListPage(),
+ ),
+ GetPage(
+ name: Routers.passwordKeyManagePage,
+ page: () => const PasswordKeyManagePage(),
+ ),
+ GetPage(
+ name: Routers.passwordKeyDetailPage,
+ page: () => const PasswordKeyDetailPage(),
+ ),
+ GetPage(
+ name: Routers.otherTypeKeyListPage,
+ page: () => const OtherTypeKeyListPage(),
+ ),
+ GetPage(
+ name: Routers.otherTypeKeyDetailPage,
+ page: () => const OtherTypeKeyDetailPage(),
+ ),
+ GetPage(
+ name: Routers.otherTypeKeyManagePage,
+ page: () => const OtherTypeKeyManagePage(),
+ ),
+ GetPage(
+ name: Routers.authorizedAdminListPage,
+ page: () => const AuthorizedAdminListPage(),
+ ),
+ GetPage(
+ name: Routers.authorizedAdminDetailPage,
+ page: () => const AuthorizedAdminDetailPage(),
+ ),
+ GetPage(
+ name: Routers.authorizedAdminManagePage,
+ page: () => const AuthorizedAdminManagePage(),
+ ),
+ GetPage(
+ name: Routers.lockOperatingRecordPage,
+ page: () => const LockOperatingRecordPage(),
+ ),
+ GetPage(
+ name: Routers.mineSetPage,
+ page: () => const MineSetPage(),
+ ),
+ GetPage(
+ name: Routers.volumeAuthorizationLockManagePage,
+ page: () => const VolumeAuthorizationLockManagePage(),
+ ),
+ GetPage(
+ name: Routers.mineMultiLanguagePage,
+ page: () => const MineMultiLanguagePage(),
+ ),
+ GetPage(
+ name: Routers.starLockLoginPage,
+ page: () => const StarLockLoginPage(),
+ ),
+ GetPage(
+ name: Routers.starLockRegisterPage,
+ page: () => const StarLockRegisterPage(),
+ ),
+ GetPage(
+ name: Routers.starLockForgetPasswordPage,
+ page: () => const StarLockForgetPasswordPage(),
+ ),
+ GetPage(
+ name: Routers.seletCountryRegionPage,
+ page: () => const SeletCountryRegionPage(),
+ ),
+ GetPage(
+ name: Routers.lockSetPage,
+ page: () => const LockSetPage(),
+ ),
+ GetPage(
+ name: Routers.basicInformationPage,
+ page: () => const BasicInformationPage(),
+ ),
+ GetPage(
+ name: Routers.uploadElectricQuantityPage,
+ page: () => const UploadElectricQuantityPage(),
+ ),
+ GetPage(
+ name: Routers.editLockNamePage,
+ page: () => const EditLockNamePage(),
+ ),
+ GetPage(
+ name: Routers.lockSeletGroupingPage,
+ page: () => const LockSeletGroupingPage(),
+ ),
+ GetPage(
+ name: Routers.adminOpenLockPasswordPage,
+ page: () => const AdminOpenLockPasswordPage(),
+ ),
+ GetPage(
+ name: Routers.wirelessKeyboardPage,
+ page: () => const WirelessKeyboardPage(),
+ ),
+ GetPage(
+ name: Routers.addWirelessKeyboardPage,
+ page: () => const AddWirelessKeyboardPage(),
+ ),
+ GetPage(
+ name: Routers.addWirelessKeyboardScreenNotLightOnPage,
+ page: () => const AddWirelessKeyboardScreenNotLightOnPage(),
+ ),
+ GetPage(
+ name: Routers.seletWirelessKeyboardPage,
+ page: () => const SeletWirelessKeyboardPage(),
+ ),
+ GetPage(
+ name: Routers.doorMagneticPage,
+ page: () => const DoorMagneticPage(),
+ ),
+ GetPage(
+ name: Routers.addDoorMagneticPage,
+ page: () => const AddDoorMagneticPage(),
+ ),
+ GetPage(
+ name: Routers.nearbyDoorMagneticPage,
+ page: () => const NearbyDoorMagneticPage(),
+ ),
+ GetPage(
+ name: Routers.lockAddressPage,
+ page: () => const LockAddressPage(),
+ ),
+ GetPage(
+ name: Routers.remoteUnlockingPage,
+ page: () => const RemoteUnlockingPage(),
+ ),
+ GetPage(
+ name: Routers.automaticBlockingPage,
+ page: () => const AutomaticBlockingPage(),
+ ),
+ GetPage(
+ name: Routers.normallyOpenModePage,
+ page: () => const NormallyOpenModePage(),
+ ),
+ GetPage(
+ name: Routers.lockSoundSetPage,
+ page: () => const LockSoundSetPage(),
+ ),
+ GetPage(
+ name: Routers.burglarAlarmPage,
+ page: () => const BurglarAlarmPage(),
+ ),
+ GetPage(
+ name: Routers.resetButtonPage,
+ page: () => const ResetButtonPage(),
+ ),
+ GetPage(
+ name: Routers.unlockQRCodePage,
+ page: () => const UnlockQRCodePage(),
+ ),
+ GetPage(
+ name: Routers.lockTimePage,
+ page: () => const LockTimePage(),
+ ),// 诊断
+ GetPage(
+ name: Routers.diagnosePage,
+ page: () => const DiagnosePage(),
+ ),
+ GetPage(
+ name: Routers.uploadDataPage,
+ page: () => const UploadDataPage(),
+ ),
+ GetPage(
+ name: Routers.importOtherLockDataPage,
+ page: () => const ImportOtherLockDataPage(),
+ ),
+ GetPage(
+ name: Routers.lockEscalationPage,
+ page: () => const LockEscalationPage(),
+ ),
+ GetPage(
+ name: Routers.markedHouseStatePage,
+ page: () => const MarkedHouseStatePage(),
+ ),
+ ];
+}
\ No newline at end of file
diff --git a/star_lock/lib/app_settings/app_colors.dart b/star_lock/lib/app_settings/app_colors.dart
new file mode 100644
index 00000000..c505b278
--- /dev/null
+++ b/star_lock/lib/app_settings/app_colors.dart
@@ -0,0 +1,122 @@
+
+import 'dart:ui';
+
+import 'package:flutter/material.dart';
+
+class AppColors {
+
+ // static Color mainColor = const Color(0xFF385DEA);
+ static Color mainColor = const Color(0xFF4777EE);
+ static Color mainBackgroundColor = const Color(0xFFF5F5F5);
+
+ static Color primaryTopColor = const Color(0xFF021B38);
+ static Color primaryBottomColor = const Color(0xFF021229);
+
+ static Color itemBgColor = const Color(0xFF063F71);
+ static Color itemDividerColor = const Color(0xFF042F58);
+ static Color appBarIconColor = const Color(0xFFFFFFFF);
+
+ //button color
+ static Color buttonEnableColor = const Color(0xFF0093E5);
+ static Color buttonDisableColor = buttonEnableColor.withOpacity(0.4);
+ static Color buttonEnableTextColor = const Color(0xFFFFFFFF);
+ static Color buttonDisableTextColor = buttonEnableTextColor.withOpacity(0.6);
+
+
+ static Color deleteBtnBgColor = const Color(0xFFFF495C).withOpacity(0.7);
+ static Color touristColor = const Color(0xFFF58A22);
+
+ //check box color
+ static Color checkBoxSelectedColor = touristColor;
+ static Color get checkBoxUnselectedColor => const Color(0xFFFFFFFF);
+ static Color checkBoxOverlayColor = checkBoxUnselectedColor.withOpacity(0.3);
+
+ //dialog
+ static Color dialogBgColor = const Color(0xFFFFFFFF);
+ static Color dialogTextColor = const Color(0xFF000000);
+ static Color dialogInputBgColor = pickerItemSelectedBgColor;
+ static Color introduceDialogBgColor = const Color(0xFF112B4C);
+
+
+ static Color pickerTitleTextColor = const Color(0xFF000000);
+ static Color pickerInfoTextColor = pickerTitleTextColor.withOpacity(0.5);
+ static Color pickerItemSelectedTextColor = const Color(0xFF0093E5);
+ static Color pickerItemSelectedBgColor = const Color(0xFFE4E4E4);
+ static Color pickerItemUnselectTextColor = pickerTitleTextColor.withOpacity(0.5);
+
+ static Color normalTextColor = const Color(0xFFFFFFFF);
+ static Color inputErrorTextColor = const Color(0xFFFF6666);
+ static Color errorImageColor = const Color(0xFFFF495C );
+
+ static Color inputTitleTextColor = const Color(0xFFFFFFFF).withOpacity(0.6);
+ static Color settingItemInfoTextColor = const Color(0xFFFFFFFF).withOpacity(0.6);
+ static Color dividerColor = const Color(0xFFFFFFFF).withOpacity(0.6);
+
+ static Color textFieldEnableBorderColor = normalTextColor.withOpacity(0.2);
+ static Color textFieldFocusBorderColor = normalTextColor.withOpacity(0.2);
+ static Color textFieldHintTextColor = normalTextColor.withOpacity(0.4);
+ static Color textFieldTextColor = normalTextColor;
+
+ static Color protocolTextColor = touristColor;
+
+
+ static Color topTabBarSelectedBgColor = buttonEnableColor;
+ static Color topTabBarUnselectedBgColor = buttonEnableTextColor;
+ static Color tapTabBarSelectedTextColor = buttonEnableTextColor;
+ static Color tapTabBarUnselectedTextColor = const Color(0xFF000000);
+
+ static Color recordChartChargeColor = const Color(0xFF24DB6C);
+ static Color recordChartWorkingColor = const Color(0xFF0093E5);
+ static Color recordChartBgColor = const Color(0xFFFFFFFF).withOpacity(0.4);
+
+ static Color wifiDisableColor = const Color(0xFFA8A8A8);
+
+
+ static Color get paginationColor => const Color(0xFF01295C).withOpacity(45);
+ static Color get paginationActiveColor => const Color(0xFFFFFFFF).withOpacity(65);
+
+ static Color scanPointerLineColor = Colors.blue;
+
+ static Color scanColor0 = const Color(0xFF0093E5).withOpacity(0.05);
+ static Color scanColor1 = const Color(0xFF0093E5).withOpacity(0.1);
+ static Color scanColor2 = const Color(0xFF0093E5).withOpacity(0.3);
+ static Color scanColor3 = const Color(0xFF0093E5).withOpacity(0.5);
+ static Color scanColor4 = const Color(0xFF0093E5).withOpacity(0.9);
+
+ static Color scanCircleCenterColor0 = Colors.blue.withOpacity(0.9);
+ static Color scanCircleCenterColor1 = const Color(0xffE9F3FF).withOpacity(0.8);
+
+ static Color starCenterColor = const Color(0xFF0093E5);
+ static Color starMiddleColor = const Color.fromRGBO(255, 255, 255,1);
+ static Color starBorderColor = const Color.fromRGBO(255, 255, 255,0.2);
+ static Color starOutsideColor = const Color.fromRGBO(255, 255, 255,0.01);
+
+
+ static Color workingStateInfoBgColor = const Color(0xFF20354E);
+
+ static Color color_level_0 = const Color(0xFFFA6400);
+ static Color color_level_1 = const Color(0xFFFFFFFF);
+ static Color color_level_2 = const Color(0xFFF7B500);
+
+
+ static Color switchTrackSelectedColor = const Color(0xFF0093E5);
+ static Color switchTrackUnselectedColor = const Color(0xFF5A6676).withOpacity(0.5);
+ static Color switchThumbColor = const Color(0xFFFFFFFF);
+
+ static Color popMenuItemUnselectedBg = const Color(0xFF112B4C);
+ static Color popMenuItemSelectedColor = const Color(0xFF063F71);
+
+ static Color blackColor = const Color(0xFF000000);
+
+
+ static Color dateSelectedBgColor = const Color(0xFF0093E5);
+ static Color dateSelectedTextColor = const Color(0xFFFFFFFF);
+ static Color dateUnselectedTextColor = blackColor;
+ static Color dateUnselectedDialogBgColor = const Color(0xFFC9C9C9).withOpacity(0.5);
+ static Color dateUnselectedBgColor = const Color(0xFFFFFFFF);
+
+
+ static Color progressBgColor = const Color(0xFF022345);
+ static Color progressValueColor = const Color(0xFF0093E5);
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/app_settings/app_settings.dart b/star_lock/lib/app_settings/app_settings.dart
new file mode 100644
index 00000000..c43555c5
--- /dev/null
+++ b/star_lock/lib/app_settings/app_settings.dart
@@ -0,0 +1,119 @@
+import 'package:flutter/foundation.dart';
+import 'dart:io';
+
+class AppLog {
+ static bool _printLog = false;
+ static bool _onlyError = false;
+
+ static showLog({@required bool printLog, bool onlyError}){
+ _printLog = printLog ?? false;
+ _onlyError = onlyError ?? false;
+ }
+ static log(String msg,{bool error}){
+ if(!kDebugMode)return;
+ error = error ?? false;
+ if(!_printLog)return;
+ if(_onlyError && !error) return;
+ if(error){
+ msg = '----->>> $msg';
+ }
+ print(msg);
+ }
+}
+
+class AppPlatform {
+ static bool isIOS = Platform.isIOS;
+ static bool isAndroid = Platform.isAndroid;
+ static String platformString(){
+ String name = 'unknown';
+ if(isIOS){
+ name = 'iOS';
+ }
+ if(isAndroid){
+ name = 'Android';
+ }
+ return name;
+ }
+
+ static String _brand = 'unknown';
+ static int _sdkInt = 23;
+
+ static void setBrandString(String brand){
+ _brand = brand;
+ }
+ static String getBrandString()=>_brand;
+ static void setSDKInt(int sdkInt){
+ _sdkInt = sdkInt;
+ }
+ static bool isSamsung()=>_brand.toLowerCase().contains('samsung');
+ static int getSdkIntValue()=>_sdkInt;
+ static bool onlyCanNetUpgrade()=>isSamsung() && (getSdkIntValue() >= 29);
+
+}
+
+class AppMowerCodes {
+ static int idCodeLength(){
+ int len = 19;
+ return len;
+ }
+ static int fenceNameLength = 8;
+ static int registerCodeLength = 4;
+}
+
+class AppDate {
+ static String dateString() {
+ return '${year()}-${month().toString().padLeft(2,'0')}-${day().toString()
+ .padLeft(2,'0')}';
+ }
+
+ static String calendarString() {
+ String temp = '${year()}${month().toString().padLeft(2,'0')}${day().toString()
+ .padLeft(2,'0')}${hour().toString().padLeft(2,'0')}${second()
+ .toString().padLeft(2,'0')}';
+ return temp;
+ }
+
+ static int year()=>DateTime.now().year;
+ static int month()=>DateTime.now().month;
+ static int day()=>DateTime.now().day;
+ static int hour()=>DateTime.now().hour;
+ static int minute()=>DateTime.now().minute;
+ static int second()=>DateTime.now().second;
+ static int weekDay()=>DateTime.now().weekday;
+ static int timeZeroOffset()=>DateTime.now().timeZoneOffset.inHours;
+
+}
+
+//TODO:错误类型
+enum ErrorType {
+ modeNotMatch,
+ notConnected,
+ mqttNotConnect,
+ timeOut,
+}
+
+class AppErrorCode {
+ static int errorCode(ErrorType type){
+ int code = 0;
+ switch(type){
+ case ErrorType.modeNotMatch:
+ code = 1;
+ break;
+ case ErrorType.notConnected:
+ code = 2;
+ break;
+ case ErrorType.mqttNotConnect:
+ code = 3;
+ break;
+ case ErrorType.timeOut:
+ code = 4;
+ break;
+ }
+ return code;
+ }
+}
+
+
+
+
+
diff --git a/star_lock/lib/app_settings/app_style.dart b/star_lock/lib/app_settings/app_style.dart
new file mode 100644
index 00000000..b76482e9
--- /dev/null
+++ b/star_lock/lib/app_settings/app_style.dart
@@ -0,0 +1,226 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'app_colors.dart';
+
+class AppStyle {
+
+ static RoundedRectangleBorder get buttonShape_16 => RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(16.0.h),
+ );
+
+ static RoundedRectangleBorder get buttonShape_11 => RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(11.0.h),
+ );
+
+ static Size get btnMinSize => Size(100.w, 60.h);
+ static Size get btnMinSize2 => Size(60.w, 44.h);
+ static Size get btnMinSize3 => Size(60.w, 53.h);
+
+ static TextStyle textStyle({Color textColor,double fontSize,FontWeight fontWeight}) => TextStyle(
+ fontSize: fontSize ?? 18.sp,
+ color: textColor ?? AppColors.buttonEnableTextColor,
+ fontWeight: fontWeight ?? FontWeight.normal,
+ );
+
+ ///textButtonStyle
+ static ButtonStyle get textButtonStyle => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(textColor: AppColors.buttonDisableColor);
+ return textStyle();
+ })
+ );
+
+ ///textButtonDeleteStyle
+ static ButtonStyle get textButtonDeleteStyle => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.deleteBtnBgColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(textColor: AppColors.buttonDisableColor);
+ return textStyle();
+ })
+ );
+
+ //textButtonStyle2
+ static ButtonStyle get textButtonStyle2 => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize2),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_11),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(textColor: AppColors.buttonDisableColor,fontSize: 11.sp);
+ return textStyle(fontSize: 11.sp);
+ })
+ );
+
+ static ButtonStyle get textButtonStyleOthers => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(textColor: AppColors.buttonDisableColor);
+ return textStyle(textColor: AppColors.buttonEnableColor);
+ })
+ );
+
+ static ButtonStyle get specialButtonStyle => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize3),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.deleteBtnBgColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(textColor: AppColors.buttonDisableColor);
+ return textStyle(textColor: AppColors.buttonEnableColor);
+ })
+ );
+
+ static ButtonStyle clearTextButtonStyle({Color textColor,Color bgColor,double fontSize,FontWeight fontWeight}) => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ bgColor ??= AppColors.normalTextColor;
+ if(states.contains(MaterialState.disabled)) return bgColor.withOpacity(0.6);
+ return bgColor;
+ }),
+ overlayColor: MaterialStateProperty.resolveWith((states){
+ textColor ??= AppColors.buttonEnableColor;
+ if(states.contains(MaterialState.pressed)) return textColor.withOpacity(0.1);
+ return textColor.withOpacity(0.1);
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ textColor ??= AppColors.buttonEnableColor;
+ if(states.contains(MaterialState.disabled)) return textColor.withOpacity(0.4);
+ return textColor;
+ }),
+ textStyle: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return textStyle(fontSize: fontSize,fontWeight: fontWeight);
+ return textStyle(fontSize: fontSize,fontWeight: fontWeight);
+ }),
+ );
+
+ ///elevatedButtonButtonStyle
+ static ButtonStyle get elevatedButtonButtonStyle => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ );
+
+ ///outlinedButtonButtonStyle
+ static ButtonStyle get outlinedButtonButtonStyle => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ );
+
+
+ ///outlinedButtonButtonStyle2
+ static ButtonStyle get outlinedButtonButtonStyle2_Selected => ButtonStyle(
+ minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_11),
+ backgroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableColor;
+ return AppColors.buttonEnableColor;
+ }),
+ foregroundColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.disabled)) return AppColors.buttonDisableTextColor;
+ return AppColors.buttonEnableTextColor;
+ }),
+ );
+
+ ///outlinedButtonButtonStyle2_Selected
+ static ButtonStyle get outlinedButtonButtonStyle2 => ButtonStyle(
+ shape: MaterialStateProperty.resolveWith((states) => buttonShape_11),
+ side: MaterialStateProperty.all(BorderSide(
+ width: 1.w,
+ color: AppColors.buttonEnableColor.withOpacity(0.5),
+ style: BorderStyle.solid,
+ )),
+ backgroundColor: MaterialStateProperty.all(Colors.transparent),
+ );
+
+ static TextStyle appTextStyle({
+ Color textColor,
+ double fontSize,
+ }) => AppStyle.textStyle(
+ textColor: textColor,
+ fontSize: fontSize,
+ );
+
+ static InputBorder get textFieldEnableBorder => UnderlineInputBorder(
+ borderSide: BorderSide(
+ color: AppColors.textFieldEnableBorderColor,
+ width: 1.w,
+ style: BorderStyle.solid
+ ),
+ );
+
+ static TextStyle get textFieldTextStyle => appTextStyle(
+ textColor: AppColors.textFieldTextColor,
+ fontSize: 16.sp,
+ );
+
+ static TextStyle get textFieldHintTextStyle => appTextStyle(
+ textColor: AppColors.textFieldHintTextColor,
+ fontSize: 12.sp,
+ );
+
+ static InputBorder get textFieldFocusBorder => UnderlineInputBorder(
+ borderSide: BorderSide(
+ color: AppColors.textFieldFocusBorderColor,
+ width: 1.w,
+ style: BorderStyle.solid
+ ),
+ );
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/app_settings/app_theme.dart b/star_lock/lib/app_settings/app_theme.dart
new file mode 100644
index 00000000..7e6c662b
--- /dev/null
+++ b/star_lock/lib/app_settings/app_theme.dart
@@ -0,0 +1,132 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'app_colors.dart';
+import 'app_style.dart';
+
+class AppTheme {
+
+ static bool get isDarkMode => Get.isDarkMode;
+
+ static ThemeData get appThemeData => ThemeData(
+ // fontFamily: ,
+ primaryColor: AppColors.primaryTopColor,
+ navigationBarTheme: navigationBarThemeData,
+ checkboxTheme: checkBoxThemeData,
+ textButtonTheme: textButtonThemeData,
+ outlinedButtonTheme: outlinedButtonThemeData,
+ buttonTheme: buttonThemeData,
+ elevatedButtonTheme: elevatedButtonThemeData,
+ scaffoldBackgroundColor: Colors.transparent,
+ dialogBackgroundColor: AppColors.dialogBgColor,
+ // inputDecorationTheme: inputDecorationTheme,
+ dividerTheme: dividerTheme,
+ bottomNavigationBarTheme: bottomNavigationBarThemeData,
+ switchTheme: switchThemeData,
+ );
+
+ static SwitchThemeData get switchThemeData => SwitchThemeData(
+ trackColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.selected)){
+ return AppColors.switchTrackSelectedColor;
+ }
+ return AppColors.switchTrackUnselectedColor;
+ }),
+ thumbColor: MaterialStateProperty.resolveWith((states){
+ if(states.contains(MaterialState.selected)){
+ return AppColors.switchThumbColor;
+ }
+ return AppColors.switchThumbColor;
+ }),
+ );
+
+ static NavigationBarThemeData get navigationBarThemeData => const NavigationBarThemeData(
+ backgroundColor: Colors.transparent,
+ );
+
+ static BottomNavigationBarThemeData get bottomNavigationBarThemeData => BottomNavigationBarThemeData(
+ elevation: 0,
+ backgroundColor: Colors.transparent,
+ selectedItemColor: AppColors.buttonEnableColor,
+ unselectedItemColor: AppColors.buttonEnableTextColor,
+ selectedLabelStyle: AppStyle.textStyle(
+ fontSize: 10,
+ ),
+ unselectedLabelStyle: AppStyle.textStyle(
+ fontSize: 11,
+ ),
+ selectedIconTheme: bottomBarSelectedIconTheme,
+ unselectedIconTheme: bottomBarUnselectedIconTheme,
+ landscapeLayout: BottomNavigationBarLandscapeLayout.centered,
+ );
+
+ static IconThemeData get bottomBarSelectedIconTheme => const IconThemeData(
+ size: 20,
+ );
+
+ static IconThemeData get bottomBarUnselectedIconTheme => const IconThemeData(
+ size: 21,
+ );
+
+ static DividerThemeData get dividerTheme => DividerThemeData(
+ color: AppColors.dividerColor,
+ );
+
+ static InputDecorationTheme get inputDecorationTheme => InputDecorationTheme(
+ hintStyle: AppStyle.textFieldHintTextStyle,
+ enabledBorder: AppStyle.textFieldEnableBorder,
+ focusedBorder: AppStyle.textFieldFocusBorder,
+ border: AppStyle.textFieldEnableBorder,
+ );
+
+ static AppBarTheme get appBarTheme => AppBarTheme(
+ backgroundColor: Colors.transparent,
+ iconTheme: IconThemeData(
+ color: AppColors.appBarIconColor,
+ ),
+ elevation: 0.0,
+ );
+
+ static CheckboxThemeData get checkBoxThemeData => CheckboxThemeData(
+ fillColor: MaterialStateProperty.resolveWith((states) {
+ if(states.contains(MaterialState.selected)){
+ return AppColors.checkBoxSelectedColor;
+ }
+ return AppColors.checkBoxUnselectedColor;
+ }),
+ overlayColor: MaterialStateProperty.resolveWith((states) => AppColors.checkBoxOverlayColor),
+ );
+
+ static ElevatedButtonThemeData get elevatedButtonThemeData => ElevatedButtonThemeData(
+ style: AppStyle.elevatedButtonButtonStyle,
+ );
+
+ static TextButtonThemeData get textButtonThemeData => TextButtonThemeData(
+ style: AppStyle.textButtonStyle,
+ );
+
+ static OutlinedButtonThemeData get outlinedButtonThemeData => OutlinedButtonThemeData(
+ style: AppStyle.outlinedButtonButtonStyle,
+ );
+
+ static ButtonThemeData get buttonThemeData => const ButtonThemeData(
+ textTheme: ButtonTextTheme.primary,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(Radius.circular(16.0))
+ ),
+ height: 90,
+ );
+
+
+}
+
+
+class NoShadowScrollBehavior extends ScrollBehavior {
+
+ final AxisDirection axisDirection;
+ const NoShadowScrollBehavior({this.axisDirection = AxisDirection.up}):super();
+ @override
+ Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) {
+ return GlowingOverscrollIndicator(axisDirection: axisDirection, color: Colors.red,showTrailing: false,showLeading: false,child: child,);
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/baseWidget.dart b/star_lock/lib/baseWidget.dart
new file mode 100644
index 00000000..36640388
--- /dev/null
+++ b/star_lock/lib/baseWidget.dart
@@ -0,0 +1,47 @@
+
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/translations/trans_lib.dart';
+
+mixin BaseWidget{
+ double fs(double value) => value.sp;
+ double w(double width) => width.w;
+ double h(double height) => height.h;
+
+ initUI(Widget widget) => ScreenUtilInit(
+ // designSize: const Size(750, 1334),
+ designSize: const Size(375, 812),
+ minTextAdapt: true,
+ splitScreenMode: true,
+ builder: (context , child) {
+ return widget;
+ },
+ );
+
+ ///数据为空的视图
+ Widget emptyView() {
+ return Container(
+ width: double.infinity,
+ height: double.infinity,
+ color: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'images/icon_unHaveData.png',
+ height: 200.w,
+ width: 200.w,
+ ),
+ Padding(
+ padding: const EdgeInsets.only(top: 10),
+ child: Text(TranslationLoader.lanKeys.noData.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)),
+ )
+ ],
+ ),
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart
new file mode 100644
index 00000000..798d0d0f
--- /dev/null
+++ b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart
@@ -0,0 +1,101 @@
+
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../appRouters.dart';
+import '../../app_settings/app_colors.dart';
+import '../../tools/forgetPwdInput.dart';
+import '../../tools/loginInput.dart';
+import '../../tools/submitBtn.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class StarLockForgetPasswordPage extends StatefulWidget {
+ const StarLockForgetPasswordPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockForgetPasswordPageState();
+}
+
+class _StarLockForgetPasswordPageState extends State {
+ final TextEditingController _phoneController = TextEditingController();
+ final TextEditingController _pwdController = TextEditingController();
+ final TextEditingController _codeController = TextEditingController();
+
+ Timer _timer;
+
+ int _seconds = 60;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: const Color(0xFFFFFFFF),
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ padding: EdgeInsets.only(
+ top: 40.h,
+ left: 40.w,
+ right: 40.w
+ ),
+ children: [
+ LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 10.w),
+ LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 15.w),
+ Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
+ SizedBox(height: 10.w),
+ LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 10.w),
+ ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ LengthLimitingTextInputFormatter(6),
+ ],rightSlot: Container(
+ // margin: EdgeInsets.only(right: 30.w),
+ child: GestureDetector(
+ child: Container(
+ width: 180.w,
+ height: 60.h,
+ padding: EdgeInsets.all(5.h),
+ decoration: BoxDecoration(
+ color: AppColors.mainColor,
+ borderRadius: BorderRadius.circular(5)
+ ),
+ child: Center(
+ child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle(
+ color: Colors.white,
+ fontSize: 26.sp,
+ )),
+ ),
+ ),
+ onTap: (){
+ if(_seconds==60){
+ // _setVerify();
+ }else{
+ // Toast.show(msg: '正在获取验证码');
+ }
+ },
+ ),
+ )),
+ SizedBox(height: 50.w),
+ SubmitBtn(btnName: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ )
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart
new file mode 100644
index 00000000..985af277
--- /dev/null
+++ b/star_lock/lib/login/login/starLock_login_page.dart
@@ -0,0 +1,139 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../appRouters.dart';
+import '../../app_settings/app_colors.dart';
+import '../../tools/loginInput.dart';
+import '../../tools/submitBtn.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class StarLockLoginPage extends StatefulWidget {
+ const StarLockLoginPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockLoginPageState();
+}
+
+class _StarLockLoginPageState extends State {
+ final TextEditingController _phoneController = TextEditingController();
+ final TextEditingController _pwdController = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: const Color(0xFFFFFFFF),
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.login.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.register.tr, style: TextStyle(color: Colors.white),),
+ onPressed: (){
+ Navigator.pushNamed(context, Routers.starLockRegisterPage);
+ },),
+ ],),
+ body:ListView(
+ padding: EdgeInsets.only(
+ top: 120.h,
+ left: 40.w,
+ right: 40.w
+ ),
+ children: [
+ Container(
+ padding: EdgeInsets.all(10.w),
+ child: Center(
+ child: Image.asset('images/icon_main_1024.png', width: 150.w, height: 150.w)
+ )
+ ),
+ SizedBox(height: 50.w),
+ LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 50.w),
+ LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 20.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SizedBox(
+ height: 20.h,
+ width: 26.w,
+ child: Checkbox(value: false, onChanged: (value){
+
+ })
+ ),
+ SizedBox(width: 15.w,),
+ Flexible(
+ child: RichText(
+ text: TextSpan(
+ text: TranslationLoader.lanKeys.readAndAgree.tr,
+ style: TextStyle(
+ color: const Color(0xff333333),
+ fontSize: 26.sp
+ ),
+ children: [
+ WidgetSpan(
+ alignment: PlaceholderAlignment.middle,
+ child: GestureDetector(
+ child: Text('《${TranslationLoader.lanKeys.userAgreement.tr}》',style: TextStyle(
+ color: AppColors.mainColor,
+ fontSize: 26.sp
+ )),
+ onTap: (){
+
+ },
+ )
+ ),
+ WidgetSpan(
+ alignment: PlaceholderAlignment.middle,
+ child: GestureDetector(
+ child: Text('《${TranslationLoader.lanKeys.privacyPolicy.tr}》',style: TextStyle(
+ color: AppColors.mainColor,
+ fontSize: 26.sp
+ )),
+ onTap: (){
+
+ },
+ )
+ ),
+ ],
+ )
+ ),
+ )
+ ],
+ ),
+ SizedBox(height: 50.w),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.login.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SizedBox(height: 50.w),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ GestureDetector(
+ child: SizedBox(
+ // width: 150.w,
+ height: 50.h,
+ // color: Colors.red,
+ child: Center(
+ child: Text('${TranslationLoader.lanKeys.forgetPassword.tr}?',style: TextStyle(fontSize: 24.sp)),
+ ),
+ ),
+ onTap: (){
+ Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
+ },
+ )
+ ],
+ ),
+ ],
+ )
+ );
+ }
+
+
+}
diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart
new file mode 100644
index 00000000..572c19a4
--- /dev/null
+++ b/star_lock/lib/login/register/starLock_register_page.dart
@@ -0,0 +1,209 @@
+
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../appRouters.dart';
+import '../../app_settings/app_colors.dart';
+import '../../tools/forgetPwdInput.dart';
+import '../../tools/loginInput.dart';
+import '../../tools/submitBtn.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class StarLockRegisterPage extends StatefulWidget {
+ const StarLockRegisterPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockRegisterPageState();
+}
+
+class _StarLockRegisterPageState extends State {
+ final TextEditingController _phoneController = TextEditingController();
+ final TextEditingController _pwdController = TextEditingController();
+ final TextEditingController _codeController = TextEditingController();
+
+ Timer _timer;
+
+ int _seconds = 60;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: const Color(0xFFFFFFFF),
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.register.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ padding: EdgeInsets.only(
+ top: 40.h,
+ left: 40.w,
+ right: 40.w
+ ),
+ children: [
+ topSeletCountryAndRegionWidget (),
+ middleTFWidget (),
+ SubmitBtn(btnName: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ )
+ );
+ }
+
+ Widget topSeletCountryAndRegionWidget (){
+ return Column(
+ children: [
+ SizedBox(height:50.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 420.w,
+ height: 60.h,
+ // color: Colors.red,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.all(Radius.circular(30.h)),
+ border: const Border(
+ top: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ left: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ right: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ )
+ ),
+ child: Row(
+ children: [
+ GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ width: 210.w,
+ height: 60.h,
+ // color: Colors.red,
+ decoration: BoxDecoration(
+ color: AppColors.mainColor,
+ borderRadius: BorderRadius.all(Radius.circular(30.h)),
+ border: const Border(
+ top: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ left: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ right: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ )
+ ),
+ child: Center(child: Text(TranslationLoader.lanKeys.iphone.tr, style: TextStyle(color: Colors.white),))
+ ),
+ ),
+ Expanded(
+ child: GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ height: 60.h,
+ // color: Colors.red,
+ // decoration: BoxDecoration(
+ // borderRadius: BorderRadius.all(Radius.circular(30.h)),
+ // border: const Border(
+ // top: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ // left: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ // right: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ // bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
+ // )
+ // ),
+ child: Center(child: Text(TranslationLoader.lanKeys.email.tr, style: const TextStyle(color: Colors.black),))
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ ],
+ ),
+ SizedBox(height:60.h),
+ GestureDetector(
+ onTap: (){
+ Navigator.pushNamed(context, Routers.seletCountryRegionPage);
+ },
+ child: Container(
+ height: 70.h,
+ // color: Colors.red,
+ // padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:5.w),
+ Expanded(child: Text(TranslationLoader.lanKeys.countryAndRegion.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))),
+ SizedBox(width:20.w),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Text("中国+86", textAlign: TextAlign.end, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ SizedBox(width:5.w),
+ Image.asset('images/icon_right.png', width: 50.w, height: 50.w,),
+ ],
+ ),
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ );
+ }
+
+ Widget middleTFWidget (){
+ return Column(
+ children: [
+ LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 10.w),
+ LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 15.w),
+ Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
+ SizedBox(height: 10.w),
+ LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ SizedBox(height: 10.w),
+ ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ LengthLimitingTextInputFormatter(6),
+ ],rightSlot: Container(
+ // margin: EdgeInsets.only(right: 30.w),
+ child: GestureDetector(
+ child: Container(
+ width: 180.w,
+ height: 60.h,
+ padding: EdgeInsets.all(5.h),
+ decoration: BoxDecoration(
+ color: AppColors.mainColor,
+ borderRadius: BorderRadius.circular(5)
+ ),
+ child: Center(
+ child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle(
+ color: Colors.white,
+ fontSize: 26.sp
+ )),
+ ),
+ ),
+ onTap: (){
+ if(_seconds==60){
+ // _setVerify();
+ }else{
+ // Toast.show(msg: '正在获取验证码');
+ }
+ },
+ ),
+ )),
+ SizedBox(height: 50.w),
+ ],
+ );
+ }
+}
diff --git a/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart b/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart
new file mode 100644
index 00000000..0054b485
--- /dev/null
+++ b/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../app_settings/app_colors.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class SeletCountryRegionPage extends StatefulWidget {
+ const SeletCountryRegionPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SeletCountryRegionPageState();
+}
+
+class _SeletCountryRegionPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: const Color(0xFFFFFFFF),
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.countryAndRegion.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
+ children: [
+
+ ],
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main.dart b/star_lock/lib/main.dart
new file mode 100644
index 00000000..b0f37178
--- /dev/null
+++ b/star_lock/lib/main.dart
@@ -0,0 +1,136 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:get/get_core/src/get_main.dart';
+import 'package:star_lock/tools/app_manager.dart';
+import 'package:star_lock/tools/device_info_service.dart';
+import 'package:star_lock/tools/platform_info_services.dart';
+import 'package:star_lock/tools/store_service.dart';
+import 'package:star_lock/translations/app_dept.dart';
+import 'package:star_lock/translations/trans_lib.dart';
+
+import 'appRouters.dart';
+import 'baseWidget.dart';
+
+void main() async {
+ _setCommonServices();
+
+ // 设置国际化信息
+ await _initTranslation();
+
+ runApp(MyApp());
+}
+
+class MyApp extends StatefulWidget {
+ const MyApp({GlobalKey key}):super(key: key);
+
+ @override
+ State createState() => _MyAppState();
+}
+
+class _MyAppState extends State with WidgetsBindingObserver, BaseWidget {
+
+ @override
+ Widget build(BuildContext context) {
+ return ScreenUtilInit(
+ designSize: const Size(750, 1334),
+ builder: (w, a) => _initMaterialApp());
+ }
+
+ GetMaterialApp _initMaterialApp() => GetMaterialApp(
+ title: 'Star Lock',
+ translations: TranslationMessage(),
+ supportedLocales: appDept.deptSupportedLocales,
+ localizationsDelegates: const [
+ GlobalMaterialLocalizations.delegate,
+ GlobalCupertinoLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ ],
+ localeResolutionCallback: (locale,supportedLocales){
+ if(!supportedLocales.contains(locale)) {
+ int idx = appSupportedLocales.indexWhere((element) => element.languageCode == locale.languageCode);
+ if(idx != -1) {
+ locale = appSupportedLocales[idx];
+ }else {
+ locale = const Locale('zh', 'CN');
+ }
+ }
+ // print("localelocalelocalelocalelocale locale:${locale} locale.languageCode:${locale.languageCode} locale.countryCode:${locale.countryCode} supportedLocales:${supportedLocales}");
+ AppManager().setLanCode(code: '${locale.languageCode}_${locale.countryCode}');
+ return locale;
+ },
+ // locale: StoreService.to.getLanguageCode().isNotEmpty ? appDept.deptSupportedLocales.where((element) => element.languageCode == StoreService.to.getLanguageCode()).first : Get.deviceLocale,
+ locale: Get.deviceLocale,
+ fallbackLocale: const Locale('zh', 'CN'),
+ theme: ThemeData(
+ scaffoldBackgroundColor: const Color(0xFFF6F6F6),
+ backgroundColor: const Color(0xFFF6F6F6),
+ primaryColor: const Color(0xFFFFFFFF),
+ textTheme: TextTheme(
+ //用在非Material组件上的文字显示,
+ bodyText1: TextStyle(
+ fontSize: 28.sp, color: const Color(0xff2E2B2B)),
+ //Material组件上的文字显示
+ bodyText2: TextStyle(
+ fontSize: 28.sp, color: const Color(0xff2E2B2B)),
+ button: TextStyle(fontSize: 28.sp)),
+ iconTheme:
+ IconThemeData(size: 28.sp, color: const Color(0xff2E2B2B)),
+ appBarTheme: AppBarTheme(
+ backgroundColor: const Color(0xFFFFFFFF),
+ elevation: 0,
+ centerTitle: true,
+ iconTheme:
+ IconThemeData(color: const Color(0xff333333), size: 36.sp),
+ titleTextStyle: TextStyle(
+ color: const Color(0xff333333),
+ fontWeight: FontWeight.w400,
+ fontSize: 36.sp),
+ ),
+ splashColor: Colors.transparent, // 点击时的高亮效果设置为透明
+ highlightColor: Colors.transparent,
+ ),
+ debugShowCheckedModeBanner: false,
+ getPages: AppRouters.routePages,
+ initialRoute: '/'
+ );
+
+ @override
+ void initState() {
+ super.initState();
+ WidgetsBinding.instance?.addObserver(this);
+ }
+
+ @override
+ void dispose() {
+ WidgetsBinding.instance?.removeObserver(this);
+ super.dispose();
+ }
+
+ void didChangeAppLifecycleState(AppLifecycleState state) {
+ if (state == AppLifecycleState.resumed) {
+ // 应用进入前台
+ print("应用进入前台");
+ } else if (state == AppLifecycleState.paused) {
+ // 应用进入后台
+ print("应用进入后台");
+ }
+ }
+
+}
+
+// 设置国际化信息
+Future _initTranslation() async => TranslationLoader.loadTranslation(
+ zhSource: "images/lan/lan_zh.json",
+ enSource: "images/lan/lan_en.json",
+ keySource: "images/lan/lan_keys.json",
+);
+
+// 设置包名服务设备信息
+Future _setCommonServices() async {
+ await Get.putAsync(() => StoreService().init());
+ await Get.putAsync(() => PlatformInfoService().init());
+ await Get.putAsync(() => DeviceInfoService().init());
+ Get.log(PlatformInfoService.to.info.version);
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart
new file mode 100644
index 00000000..5d46c307
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart
@@ -0,0 +1,32 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+import 'authorizedAdminManage_tabbar.dart';
+
+class AuthorizedAdminManagePage extends StatefulWidget {
+ const AuthorizedAdminManagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AuthorizedAdminManagePageState();
+}
+
+class _AuthorizedAdminManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ AuthorizedAdminManageTabbar(initialIndex: index,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart
new file mode 100644
index 00000000..08394bd9
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart
@@ -0,0 +1,89 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../../translations/trans_lib.dart';
+import '../../../electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart';
+import '../authorizedAdmin_page.dart';
+
+class AuthorizedAdminManageTabbar extends StatefulWidget {
+ var initialIndex=1;
+
+ AuthorizedAdminManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
+
+ @override
+ State createState() => _AuthorizedAdminManageTabbarState();
+}
+
+class _AuthorizedAdminManageTabbarState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs= [
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(
+ // text: item.title,
+ child: Container(
+ width: 1.sw/4,
+ margin: EdgeInsets.all(10.w),
+ // color: Colors.red,
+ child: Text(item.title, textAlign: TextAlign.center,),
+ ),
+ );
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => AuthorizedAdminPage(type: item.type,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.type});
+
+ final String title;
+ final String type;
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart
new file mode 100644
index 00000000..8e0d16d7
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart
@@ -0,0 +1,242 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../translations/trans_lib.dart';
+
+class AuthorizedAdminPage extends StatefulWidget {
+ final String type;
+ AuthorizedAdminPage({Key key, @required this.type}) : super(key: key);
+
+ @override
+ State createState() => _AuthorizedAdminPageState();
+}
+
+class _AuthorizedAdminPageState extends State {
+ final FlutterContactPicker _contactPicker = FlutterContactPicker();
+ Contact _contact;
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.type)) {
+ case 0:
+ {
+ // 限时
+ // return sendElectronicKeySucceed();
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyTimeWidget(),
+ keyRealNameWidget(),
+ keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr)
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 永久
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyRealNameWidget(),
+ keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr)
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 顶部钥匙信息widget
+ Widget keyInfoWidget(){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.pleaseEnter.tr)),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 生效失效时间
+ Widget keyTimeWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 实名认证
+ Widget keyRealNameWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(String tipStr){
+ return Column(
+ children: [
+ Container(
+ padding: EdgeInsets.all(20.w),
+ child: Row(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(child: Text(tipStr, textAlign: TextAlign.start,)),
+ ],
+ ),
+ ),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.sender.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ Container(
+ padding: EdgeInsets.only(right:30.w),
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ TextButton(onPressed: (){
+ Navigator.pushNamed(context, Routers.volumeAuthorizationLockManagePage);
+ }, child: Text(TranslationLoader.lanKeys.volumeAuthorizationLock.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+
+ // 发送电子钥匙成功
+ Widget sendElectronicKeySucceed(){
+ return Column(
+ children: [
+ Container(
+ height: 250.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ children: [
+ SizedBox(height: 30.h,),
+ Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text("发送成功",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 20.h,),
+ SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '邮件通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+ Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
+ }),
+ SubmitBtn(btnName: '微信通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '标记为已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ );
+ }
+
+ // 接受者信息输入框
+ Widget getTFWidget(bool isHaveBtn, String tfStr){
+ return Container(
+ height: 50.h,
+ width: 500.w,
+ child: Row(
+ children: [
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ textAlign:TextAlign.end,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
+ hintText: tfStr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ SizedBox(width: 10.w,),
+ isHaveBtn?Container(
+ width: 50.w,
+ height: 50.w,
+ decoration: const BoxDecoration(
+ color: Colors.white,
+ image: DecorationImage(
+ image: AssetImage('images/icon_lock.png'),
+ fit: BoxFit.fill
+ ),
+ ),
+ alignment: Alignment.center,
+ child: InkWell(
+ onTap: () async {
+ Contact contact = await _contactPicker.selectContact();
+ setState(() {
+ _contact = contact;
+ // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
+ });
+ },
+ ),
+ ):Container()
+ ],
+ ),
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart
new file mode 100644
index 00000000..bb170c8f
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart
@@ -0,0 +1,176 @@
+
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class AuthorizedAdminDetailPage extends StatefulWidget {
+ const AuthorizedAdminDetailPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AuthorizedAdminDetailPageState();
+}
+
+class _AuthorizedAdminDetailPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.authorizedAdmin.tr}${TranslationLoader.lanKeys.detail.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.share.tr, style: TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 40.h),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.delete.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // height: 80.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ ),
+ SizedBox(width:5.w),
+ isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
+ // SizedBox(width:10.w),
+ ],
+ ),
+ ),
+ isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
+ ],
+ ),
+ );
+ }
+
+ void showCupertinoAlertDialog(BuildContext context) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return Card(
+ color: const Color(0x00FFFFFF),
+ child: CupertinoAlertDialog(
+ title: const Text("修改密码"),
+ content: Column(
+ children: [
+ const SizedBox(height: 10,),
+ Container(
+ height: 80.h,
+ // color: Colors.white,
+ margin: EdgeInsets.all(10.w),
+ child: const TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ // contentPadding: const EdgeInsets.only(
+ // top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: "请输入要修改的名字",
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ // icon: Padding(
+ // padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ // child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ // ),
+ // //右边图标设置
+ // suffixIcon: GestureDetector(
+ // onTap: () {
+ // //addPostFrameCallback是 StatefulWidge 渲染结束的回调,只会被调用一次
+ // // SchedulerBinding.instance.addPostFrameCallback((_) {
+ // // _controller.text = "";
+ // // });
+ // },
+ // child: Padding(
+ // padding: EdgeInsets.all(8),
+ // child: Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ // ),
+ // )
+ ),
+ ),
+ )
+ ],
+ ),
+ actions: [
+ CupertinoDialogAction(
+ child: const Text("取消"),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("取消");
+ },
+ ),
+ CupertinoDialogAction(
+ child: const Text("确定"),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("确定");
+ },
+ ),
+ ],
+ ),
+ );
+ });
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart
new file mode 100644
index 00000000..5f9c7f97
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart
@@ -0,0 +1,133 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class AuthorizedAdminListPage extends StatefulWidget {
+ const AuthorizedAdminListPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AuthorizedAdminListPageState();
+}
+
+class _AuthorizedAdminListPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ _searchWidget(),
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.authorizedAdmin.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 80.h,
+ margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ SizedBox(height:5.h),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart
new file mode 100644
index 00000000..625033a0
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class VolumeAuthorizationLockManagePage extends StatefulWidget {
+ const VolumeAuthorizationLockManagePage({Key key}):super(key:key);
+
+ @override
+ State createState() => _VolumeAuthorizationLockManagePageState();
+}
+
+class _VolumeAuthorizationLockManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.authorizedAdmin.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ VolumeAuthorizationLockManageTabbar(initialIndex: index,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart
new file mode 100644
index 00000000..1dca45ca
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart
@@ -0,0 +1,88 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../../translations/trans_lib.dart';
+import '../volumeAuthorizationLock_page.dart';
+
+class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
+ var initialIndex=1;
+
+ VolumeAuthorizationLockManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
+
+ @override
+ State createState() => _VolumeAuthorizationLockManageTabbarState();
+}
+
+class _VolumeAuthorizationLockManageTabbarState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs= [
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"),
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(
+ // text: item.title,
+ child: Container(
+ width: 1.sw/4,
+ margin: EdgeInsets.all(10.w),
+ // color: Colors.red,
+ child: Text(item.title, textAlign: TextAlign.center,),
+ ),
+ );
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => VolumeAuthorizationLockPage(type: item.type,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.type});
+
+ final String title;
+ final String type;
+}
diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart
new file mode 100644
index 00000000..47ec6af3
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart
@@ -0,0 +1,186 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../translations/trans_lib.dart';
+
+class VolumeAuthorizationLockPage extends StatefulWidget {
+ final String type;
+
+ const VolumeAuthorizationLockPage({Key key, @required this.type}):super(key:key);
+
+ @override
+ State createState() => _VolumeAuthorizationLockPageState();
+}
+
+class _VolumeAuthorizationLockPageState extends State {
+ final FlutterContactPicker _contactPicker = FlutterContactPicker();
+ Contact _contact;
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.type)) {
+ case 0:
+ {
+ // 永久
+ return Column(
+ children: [
+ keyInfoWidget(),
+ remoteUnlockingWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 限时
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyTimeWidget(),
+ remoteUnlockingWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 顶部钥匙信息widget
+ Widget keyInfoWidget(){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.number.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.pleaseEnter.tr)),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 生效失效时间
+ Widget keyTimeWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", ),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 远程开锁
+ Widget remoteUnlockingWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lock.tr, rightTitle:TranslationLoader.lanKeys.pleaseSelet.tr, isHaveDirection: true, action: (){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlockingAllowed.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(){
+ return Column(
+ children: [
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ );
+ }
+
+ // 接受者信息输入框
+ Widget getTFWidget(bool isHaveBtn, String tfStr){
+ return Container(
+ height: 50.h,
+ width: 500.w,
+ child: Row(
+ children: [
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ textAlign:TextAlign.end,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
+ hintText: tfStr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ SizedBox(width: 10.w,),
+ isHaveBtn?Container(
+ width: 50.w,
+ height: 50.w,
+ decoration: const BoxDecoration(
+ color: Colors.white,
+ image: DecorationImage(
+ image: AssetImage('images/icon_lock.png'),
+ fit: BoxFit.fill
+ ),
+ ),
+ alignment: Alignment.center,
+ child: InkWell(
+ onTap: () async {
+ Contact contact = await _contactPicker.selectContact();
+ setState(() {
+ _contact = contact;
+ // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
+ });
+ },
+ ),
+ ):Container()
+ ],
+ ),
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart
new file mode 100644
index 00000000..7db1eb95
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart
@@ -0,0 +1,191 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class ElectronicKeyDetailPage extends StatefulWidget {
+ const ElectronicKeyDetailPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ElectronicKeyDetailPageState();
+}
+
+class _ElectronicKeyDetailPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.keyDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"786612630@qq.com",action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 40.h),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.delete,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // height: 80.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ ),
+ SizedBox(width:5.w),
+ isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
+ // SizedBox(width:10.w),
+ ],
+ ),
+ ),
+ isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
+ ],
+ ),
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+ void showCupertinoAlertDialog(BuildContext context) {
+
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return Card(
+ color: const Color(0x00FFFFFF),
+ child: CupertinoAlertDialog(
+ title: const Text("修改密码"),
+ content: Column(
+ children: [
+ const SizedBox(height: 10,),
+ Container(
+ height: 50.h,
+ // color: Colors.white,
+ // padding: EdgeInsets.only(left:20.w, right: 110.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15.w)
+ ),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: EdgeInsets.only(top: 20.h, left: 15.0, bottom: 13.h),
+ hintText: "请输入要修改的名字",
+ hintStyle:TextStyle(fontSize: 28.sp),
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ // icon: Padding(
+ // padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ // child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ // ),
+ // //右边图标设置
+ // suffixIcon: GestureDetector(
+ // onTap: () {
+ // //addPostFrameCallback是 StatefulWidge 渲染结束的回调,只会被调用一次
+ // // SchedulerBinding.instance.addPostFrameCallback((_) {
+ // // _controller.text = "";
+ // // });
+ // },
+ // child: Padding(
+ // padding: EdgeInsets.all(8),
+ // child: Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ // ),
+ // )
+ ),
+ ),
+ )
+ ],
+ ),
+ actions: [
+ CupertinoDialogAction(
+ child: Text("取消"),
+ onPressed: () {
+ Navigator.pop(context);
+ print("取消");
+ },
+ ),
+ CupertinoDialogAction(
+ child: Text("确定"),
+ onPressed: () {
+ Navigator.pop(context);
+ print("确定");
+ },
+ ),
+ ],
+ ),
+ );
+ });
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart
new file mode 100644
index 00000000..7bcfcd49
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart
@@ -0,0 +1,107 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_cupertino_datetime_picker/flutter_cupertino_datetime_picker.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class ElectronicKeyDetailChangeDate extends StatefulWidget {
+ const ElectronicKeyDetailChangeDate({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ElectronicKeyDetailChangeDateState();
+}
+
+class _ElectronicKeyDetailChangeDateState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.periodValidity.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(child: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.white),), onPressed: (){
+
+ },),
+ ],),
+ body: buildMainUI(),
+ );
+ }
+
+ Widget buildMainUI(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, isHaveLine: true, action:(){
+ _showDatePicker();
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
+ _showDatePicker();
+ }),
+ ],
+ );
+ }
+
+ void _showDatePicker() {
+ String MIN_DATETIME = '1900-01-01 00:00';
+ String MAX_DATETIME = '2100-01-01 00:00';
+ String INIT_DATETIME = getNowDate();
+ DateTime _dateTime = DateTime.parse(INIT_DATETIME);
+ DateTimePickerLocale _locale = DateTimePickerLocale.zh_cn;
+ String _format = 'yyyy-MMMM-dd HH:mm';
+
+ DatePicker.showDatePicker(
+ context,
+ onMonthChangeStartWithFirstDate: true,
+ pickerTheme:const DateTimePickerTheme(
+ cancel: Text('取消', style: TextStyle(color: Colors.black)),
+ showTitle: true,
+ confirm: Text('确认', style: TextStyle(color: Colors.black)),
+ ),
+ minDateTime: DateTime.parse(MIN_DATETIME),
+ maxDateTime: DateTime.parse(MAX_DATETIME),
+ initialDateTime: _dateTime,
+ dateFormat: _format,
+ locale: _locale,
+ onClose: () {
+
+ },
+ onCancel: () {
+
+ },
+ onChange: (dateTime, List index) {
+ setState(() {
+ _dateTime = dateTime;
+ });
+ },
+ onConfirm: (dateTime, List index) {
+ setState(() {
+ _dateTime = dateTime;
+ });
+ },
+ );
+ }
+
+ String getNowDate(){
+ // 获取当前时间对象
+ DateTime today = DateTime.now();
+ String dateSlug ="${today.year.toString()}-${today.month.toString().padLeft(2,'0')}-${today.day.toString().padLeft(2,'0')} ${today.hour.toString().padLeft(2,'0')}:${today.minute.toString().padLeft(2,'0')}";
+
+ // //获取当前时间的年
+ // int year = now.year;
+ // //获取当前时间的月
+ // int month = now.month;
+ // //获取当前时间的日
+ // int day = now.day;
+ // //获取当前时间的时
+ // int hour = now.hour;
+ // //获取当前时间的分
+ // int minute = now.minute;
+ // //获取当前时间的秒
+ // int millisecond = now.millisecond;
+
+ // print("组合 $year-$month-$day $hour:$minute:$millisecond");
+ return dateSlug;
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart
new file mode 100644
index 00000000..5314256b
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart
@@ -0,0 +1,137 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class ElectronicKeyListPage extends StatefulWidget {
+ const ElectronicKeyListPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ElectronicKeyListPageState();
+}
+
+class _ElectronicKeyListPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electronicKey.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ _searchWidget(),
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.sendKey.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 80.h,
+ margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart
new file mode 100644
index 00000000..2b37b35d
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart
@@ -0,0 +1,140 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class ElectronicKeyPeriodValidityPage extends StatefulWidget {
+ const ElectronicKeyPeriodValidityPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ElectronicKeyPeriodValidityPageState();
+}
+
+class _ElectronicKeyPeriodValidityPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.periodValidity.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ topWidget(),
+ SizedBox(height: 10.h,),
+ bottomWidget()
+ ],
+ )
+ );
+ }
+
+ Widget topWidget(){
+ return Container(
+ height: 150.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ height: 60.h,
+ // color: Colors.red,
+ padding: EdgeInsets.only(left:15.h, top: 15.h),
+ child: Text(TranslationLoader.lanKeys.periodValidity.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
+ ),
+ Container(
+ height: 90.h,
+ child: GridView.builder(
+ gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 7,
+ childAspectRatio: 1.0
+ ),
+ itemCount: 7,
+ physics: const NeverScrollableScrollPhysics(),
+ itemBuilder: (context,index){
+ return btnItem(index);
+ })
+ )
+ ],
+ ),
+ );
+ }
+
+ Widget btnItem(int index){
+ String dateStr;
+ switch (index) {
+ case 0:
+ dateStr = TranslationLoader.lanKeys.Sunday.tr;
+ break;
+ case 1:
+ dateStr = TranslationLoader.lanKeys.Monday.tr;
+ break;
+ case 2:
+ dateStr = TranslationLoader.lanKeys.Tuesday.tr;
+ break;
+ case 3:
+ dateStr = TranslationLoader.lanKeys.Wednesday.tr;
+ break;
+ case 4:
+ dateStr = TranslationLoader.lanKeys.Thursday.tr;
+ break;
+ case 5:
+ dateStr = TranslationLoader.lanKeys.Friday.tr;
+ break;
+ case 6:
+ dateStr = TranslationLoader.lanKeys.Saturday.tr;
+ break;
+ default:
+ break;
+ }
+ return GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ width: 70.h,
+ height: 70.h,
+ margin: EdgeInsets.all(10.h),
+ decoration: BoxDecoration(
+ // color: Colors.blue,
+ border: Border.all(width: 1, color: Colors.grey),
+ borderRadius: BorderRadius.circular(60.w),
+ ),
+ child: Center(child: Text(dateStr)),
+ ),
+ );
+ }
+
+ Widget bottomWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveDate.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureDate.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 40.h),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart
new file mode 100644
index 00000000..5ec0d561
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart
@@ -0,0 +1,162 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/app_settings/app_colors.dart';
+import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
+
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../appRouters.dart';
+import '../../../../translations/trans_lib.dart';
+
+class MassSendElectronicKeyPage extends StatefulWidget {
+ final String type;
+
+ const MassSendElectronicKeyPage({Key key, @required this.type}) : super(key: key);
+
+ @override
+ State createState() => _MassSendElectronicKeyPageState();
+}
+
+class _MassSendElectronicKeyPageState extends State {
+ final FlutterContactPicker _contactPicker = FlutterContactPicker();
+ Contact _contact;
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.type)) {
+ case 0:
+ {
+ // 限时
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyTimeWidget(),
+ remoteUnlockingWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 永久
+ return Column(
+ children: [
+ keyInfoWidget(),
+ remoteUnlockingWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 2:
+ {
+ // 单次
+ return Column(
+ children: [
+ keyInfoWidget(),
+ periodValidityWidget(),
+ remoteUnlockingWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 顶部钥匙信息widget
+ Widget keyInfoWidget(){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:TranslationLoader.lanKeys.pleaseAdd.tr, isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lock.tr, rightTitle:TranslationLoader.lanKeys.pleaseSelet.tr, isHaveDirection: true, action: (){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 生效失效时间
+ Widget keyTimeWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", ),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 远程开锁
+ Widget remoteUnlockingWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlockingAllowed.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 有效期
+ Widget periodValidityWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(){
+ return Column(
+ children: [
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.send.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart
new file mode 100644
index 00000000..e69fcc33
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+import 'massSendElectronicKeyManage_tabbar.dart';
+
+class MassSendElectronicKeyManagePage extends StatefulWidget {
+ const MassSendElectronicKeyManagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _MassSendElectronicKeyManagePageState();
+}
+
+class _MassSendElectronicKeyManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.sendGroupKey.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ MassSendElectronicKeyManageTabbar(initialIndex: index,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart
new file mode 100644
index 00000000..34488c75
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart
@@ -0,0 +1,89 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../../translations/trans_lib.dart';
+import '../massSendElectronicKey_page.dart';
+
+class MassSendElectronicKeyManageTabbar extends StatefulWidget {
+ var initialIndex=1;
+
+ MassSendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
+
+ @override
+ State createState() => _MassSendElectronicKeyManageTabbarState();
+}
+
+class _MassSendElectronicKeyManageTabbarState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs = [
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
+ ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "2"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(
+ // text: item.title,
+ child: Container(
+ width: 1.sw/8,
+ margin: EdgeInsets.all(10.w),
+ // color: Colors.red,
+ child: Text(item.title, textAlign: TextAlign.center,),
+ ),
+ );
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => MassSendElectronicKeyPage(type: item.type,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.type});
+
+ final String title;
+ final String type;
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart
new file mode 100644
index 00000000..f960f527
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart
@@ -0,0 +1,280 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/app_settings/app_colors.dart';
+import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class SendElectronicKeyPage extends StatefulWidget {
+ final String type;
+
+ SendElectronicKeyPage({Key key, @required this.type}) : super(key: key);
+
+ @override
+ State createState() => _SendElectronicKeyPageState();
+}
+
+class _SendElectronicKeyPageState extends State {
+ final FlutterContactPicker _contactPicker = FlutterContactPicker();
+ Contact _contact;
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.type)) {
+ case 0:
+ {
+ // 限时
+ // return sendElectronicKeySucceed();
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyTimeWidget(),
+ keyRealNameWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 永久
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyRealNameWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 2:
+ {
+ // 单次
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyRealNameWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 3:
+ {
+ // 循环
+ return Column(
+ children: [
+ keyInfoWidget(),
+ keyRealNameWidget(),
+ keyPeriodValidityWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 顶部钥匙信息widget
+ Widget keyInfoWidget(){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.enterYourName.tr)),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 生效失效时间
+ Widget keyTimeWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 实名认证
+ Widget keyRealNameWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 有效期
+ Widget keyPeriodValidityWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
+ }),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(){
+ return Column(
+ children: [
+ Container(
+ padding: EdgeInsets.all(20.w),
+ child: Row(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.sendKeyBottomTip.tr, textAlign: TextAlign.start,)),
+ ],
+ ),
+ ),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.send.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ Container(
+ padding: EdgeInsets.only(right:30.w),
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ TextButton(onPressed: (){
+ Navigator.pushNamed(context, Routers.massSendElectronicKeyManagePage);
+ }, child: Text(TranslationLoader.lanKeys.sendGroupKey.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+
+ // 发送电子钥匙成功
+ Widget sendElectronicKeySucceed(){
+ return Column(
+ children: [
+ Container(
+ height: 250.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ children: [
+ SizedBox(height: 30.h,),
+ Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text("发送成功",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 20.h,),
+ SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '邮件通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+ Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
+ }),
+ SubmitBtn(btnName: '微信通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '标记为已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ );
+ }
+
+ // 接受者信息输入框
+ Widget getTFWidget(bool isHaveBtn, String tfStr){
+ return Container(
+ height: 50.h,
+ width: 500.w,
+ child: Row(
+ children: [
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ textAlign:TextAlign.end,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
+ hintText: tfStr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ SizedBox(width: 10.w,),
+ isHaveBtn?Container(
+ width: 50.w,
+ height: 50.w,
+ decoration: const BoxDecoration(
+ color: Colors.white,
+ image: DecorationImage(
+ image: AssetImage('images/icon_lock.png'),
+ fit: BoxFit.fill
+ ),
+ ),
+ alignment: Alignment.center,
+ child: InkWell(
+ onTap: () async {
+ Contact contact = await _contactPicker.selectContact();
+ setState(() {
+ _contact = contact;
+ // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
+ });
+ },
+ ),
+ ):Container()
+ ],
+ ),
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart
new file mode 100644
index 00000000..8a924585
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+import 'sendElectronicKeyManage_tabbar.dart';
+
+class SendElectronicKeyManagePage extends StatefulWidget {
+ const SendElectronicKeyManagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SendElectronicKeyManagePageState();
+}
+
+class _SendElectronicKeyManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.sendKey.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ SendElectronicKeyManageTabbar(initialIndex: index,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart
new file mode 100644
index 00000000..68a96392
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart
@@ -0,0 +1,90 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../../translations/trans_lib.dart';
+import '../sendElectronicKey/sendElectronicKey_page.dart';
+
+class SendElectronicKeyManageTabbar extends StatefulWidget {
+ var initialIndex=1;
+
+ SendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
+
+ @override
+ State createState() => _SendElectronicKeyManageTabbarState();
+}
+
+class _SendElectronicKeyManageTabbarState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs = [
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
+ ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"),
+ ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "3"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(
+ // text: item.title,
+ child: Container(
+ width: 1.sw/8,
+ margin: EdgeInsets.all(10.w),
+ // color: Colors.red,
+ child: Text(item.title, textAlign: TextAlign.center,),
+ ),
+ );
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => SendElectronicKeyPage(type: item.type,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.type});
+
+ final String title;
+ final String type;
+}
diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart
new file mode 100644
index 00000000..d7b67bba
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart
@@ -0,0 +1,76 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+
+class SendEmailNotificationPage extends StatefulWidget {
+ const SendEmailNotificationPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SendEmailNotificationPageState();
+}
+
+class _SendEmailNotificationPageState extends State {
+ final TextEditingController _emailController = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ _emailController.text = "请爱的用户 \n\n你收到电子钥匙,请试用APP(www.baidu.com)或小程序开锁 \n\n星锁";
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "邮件通知", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ CommonItem(leftTitel:"接收者", rightTitle:"786612630@qq.com", isHaveLine: true,),
+ CommonItem(leftTitel:"类型", rightTitle:"个人邮件", isHaveDirection: true,),
+ Container(height: 10.h),
+ CommonItem(leftTitel:"模板", rightTitle:"默认模板", isHaveDirection: true, isHaveLine:true),
+ Container(
+ height: 360.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 20.w, top: 20.h),
+ child:TextField(
+ maxLines:8,
+ maxLength:1000,
+ textAlign: TextAlign.start,
+ controller: _emailController,
+ style: TextStyle(color: Colors.black,fontSize: 28.sp,),
+ decoration: InputDecoration(
+ border: OutlineInputBorder(
+ ///设置边框四个角的弧度
+ borderRadius: BorderRadius.all(Radius.circular(20.h)),
+ ///用来配置边框的样式
+ borderSide: const BorderSide(
+ ///设置边框的颜色
+ color: Color(0xffB2B2B2),
+ ///设置边框的粗细
+ width: 0.5,
+ ),
+ ),
+ ///用来配置输入框获取焦点时的颜色
+ focusedBorder: OutlineInputBorder(
+ ///设置边框四个角的弧度
+ borderRadius: BorderRadius.all(Radius.circular(20.h)),
+ ///用来配置边框的样式
+ borderSide: const BorderSide(
+ ///设置边框的颜色
+ color: Color(0xffB2B2B2),
+ ///设置边框的粗细
+ width: 1,
+ ),
+ ),
+ ),
+ ),
+ ),
+ Container(height: 40.h),
+ SubmitBtn(btnName: '发送', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart
new file mode 100644
index 00000000..4f7dd08f
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart
@@ -0,0 +1,113 @@
+
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/showBottomSheetTool.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class AutomaticBlockingPage extends StatefulWidget {
+ const AutomaticBlockingPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AutomaticBlockingPageState();
+}
+
+class _AutomaticBlockingPageState extends State {
+ final TextEditingController _timeController = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.automaticBlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ Container(height: 10.h,),
+ Builder(
+ builder: (context) {
+ return CommonItem(leftTitel:TranslationLoader.lanKeys.delayTime.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){
+ var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys.custom.tr];
+ ShowBottomSheetTool().showSingleRowPicker(
+ //上下文
+ context,
+ //默认的索引
+ normalIndex: 2,
+ title: TranslationLoader.lanKeys.time.tr,
+ cancelTitle: TranslationLoader.lanKeys.cancel.tr,
+ sureTitle: TranslationLoader.lanKeys.sure.tr,
+ //要显示的列表
+ //可自定义数据适配器
+ //adapter: PickerAdapter(),
+ data: list,
+ //选择事件的回调
+ clickCallBack: (int index, var str) {
+
+ });
+ });
+ }
+ ),
+ Container(height: 10.h,),
+ Visibility(
+ visible: true,
+ child: Container(
+ color: Colors.white,
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ children: [Text("${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)"),],
+ ),
+ TextField(
+ //输入框一行
+ maxLines: 1,
+ controller: _timeController,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, bottom: 8.0),
+ hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)",
+ hintStyle: TextStyle(fontSize: 30.sp),
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,),
+ ],
+ ),
+ )
+ ),
+ Container(
+ padding: EdgeInsets.all(30.w),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.automaticBlockingTip.tr)),
+ ],
+ ),
+ )
+ ],
+ )
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart
new file mode 100644
index 00000000..9048d5f3
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart
@@ -0,0 +1,59 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class AdminOpenLockPasswordPage extends StatefulWidget {
+ const AdminOpenLockPasswordPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AdminOpenLockPasswordPageState();
+}
+
+class _AdminOpenLockPasswordPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.adminOpenLockPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){
+
+ }),
+ Container(
+ margin: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.adminOpenLockPasswordTip.tr)),
+ ],
+ ),
+ SizedBox(height:10.h,),
+ GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.updateLockAdminPassword.tr, style: TextStyle(color: AppColors.mainColor),)),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ ],
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart
new file mode 100644
index 00000000..623ddfc7
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart
@@ -0,0 +1,55 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class BasicInformationPage extends StatefulWidget {
+ const BasicInformationPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _BasicInformationPageState();
+}
+
+class _BasicInformationPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ Expanded(
+ child: ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockNumber.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false),
+ CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.electricQuantity.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.uploadElectricQuantityPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockName.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.editLockNamePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockGrouping.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.lockSeletGroupingPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.adminOpenLockPassword.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage);
+ }),
+ ],
+ ),
+ ),
+ ],
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart
new file mode 100644
index 00000000..27ac0aad
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart
@@ -0,0 +1,45 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/loginInput.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class EditLockNamePage extends StatefulWidget {
+ const EditLockNamePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _EditLockNamePageState();
+}
+
+class _EditLockNamePageState extends State {
+ final TextEditingController _changeLockNameController = TextEditingController();
+
+ @override
+ void initState() {
+ super.initState();
+ _changeLockNameController.text = "MCBN0c_8f3106";
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body:Container(
+ child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, inputFormatters: [
+ LengthLimitingTextInputFormatter(20),
+ ]),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart
new file mode 100644
index 00000000..6d3aeb78
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart
@@ -0,0 +1,53 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/commonItem.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class LockSeletGroupingPage extends StatefulWidget {
+ const LockSeletGroupingPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockSeletGroupingPageState();
+}
+
+class _LockSeletGroupingPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:2,
+ itemBuilder: (c, index){
+ return CommonItem(leftTitel:"202307", rightTitle:"", allHeight: 70.h, isHaveLine: true, isHaveDirection:false, isHaveRightWidget: true, rightWidget: Image(image: const AssetImage("images/icon_item_checked.png"),width:30.w,height:30.w, fit: BoxFit.contain,), action: (){
+ // logic.changeLanguage(e);
+ });
+ }
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart
new file mode 100644
index 00000000..0e259402
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart
@@ -0,0 +1,55 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class UploadElectricQuantityPage extends StatefulWidget {
+ const UploadElectricQuantityPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _UploadElectricQuantityPageState();
+}
+
+class _UploadElectricQuantityPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electricQuantity.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.updateElectricQuantityTip.tr)),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text("${TranslationLoader.lanKeys.electricQuantity.tr} 100%")),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.update.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart
new file mode 100644
index 00000000..84a517f2
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart
@@ -0,0 +1,55 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class BurglarAlarmPage extends StatefulWidget {
+ const BurglarAlarmPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _BurglarAlarmPageState();
+}
+
+class _BurglarAlarmPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.burglarAlarmTip.tr)),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart
new file mode 100644
index 00000000..a919c81a
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class DiagnosePage extends StatefulWidget {
+ const DiagnosePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _DiagnosePageState();
+}
+
+class _DiagnosePageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.diagnose.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.diagnoseTip.tr)),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.uploading.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart
new file mode 100644
index 00000000..37361ffe
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart
@@ -0,0 +1,73 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class AddDoorMagneticPage extends StatefulWidget {
+ const AddDoorMagneticPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AddDoorMagneticPageState();
+}
+
+class _AddDoorMagneticPageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView(
+ children: [
+ SizedBox(height: 100.h,),
+ Container(
+ // color: Colors.red,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.pressAndHoldTheResetButtonTwoSeconds.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)),
+ ],
+ ),
+ ),
+ SizedBox(height: 90.h,),
+ Image.asset('images/main/icon_addDoorMagnetic_tip.png', width: 300.w, height: 300.w,),
+ SizedBox(height: 90.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 90.h,),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.next.tr,
+ borderRadius: 10.w,
+ fontSize: 28.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.nearbyDoorMagneticPage);
+ }
+ )
+ ],
+ ),
+ );
+ }
+
+
+ void onShow(){
+
+ }
+
+ void onHide(){
+
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart
new file mode 100644
index 00000000..f821de90
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart
@@ -0,0 +1,114 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../baseWidget.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class DoorMagneticPage extends StatefulWidget {
+ const DoorMagneticPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _DoorMagneticPageState();
+}
+
+class _DoorMagneticPageState extends State with BaseWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.doorMagnetic.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ Container(
+ // color: Colors.red,
+ margin: EdgeInsets.all(20.w),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.doorMagneticListTopTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)),
+ ],
+ ),
+ ),
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}",
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.addDoorMagneticPage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ // return ListView.builder(
+ // itemCount:10,
+ // itemBuilder: (c, index){
+ // return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ // // Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
+ // });
+ // }
+ // );
+ return emptyView();
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ // SizedBox(width:20.w),
+ // Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart
new file mode 100644
index 00000000..9f5c5e2c
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart
@@ -0,0 +1,74 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class NearbyDoorMagneticPage extends StatefulWidget {
+ const NearbyDoorMagneticPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _NearbyDoorMagneticPageState();
+}
+
+class _NearbyDoorMagneticPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyEquipment.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView.builder(
+ itemCount:20,
+ itemBuilder: (c, index){
+ return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
+ // Navigator.pushNamed(context, Routers.saveLockPage);
+ });
+ }
+ ),
+ );
+ }
+
+ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ height: 80.h,
+ color: Colors.white,
+ child: Row(
+ children: [
+ // SizedBox(width:20.w),
+ // Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
+ SizedBox(width:30.w),
+ ],
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ ),
+ );
+ }
+
+ void onShow(){
+ }
+
+ void onHide(){
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart
new file mode 100644
index 00000000..3acf470a
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart
@@ -0,0 +1,143 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class ImportOtherLockDataPage extends StatefulWidget {
+ const ImportOtherLockDataPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ImportOtherLockDataPageState();
+}
+
+class _ImportOtherLockDataPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.importOtherLockData.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.importOtherLockDataTip.tr)),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ _searchWidget(),
+ SizedBox(height: 10.h,),
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 70.h,
+ // margin: EdgeInsets.only(top:20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: EdgeInsets.only(
+ top: 8.h, left: -25.0.h, right: -15.0.h, bottom: 8.0.h),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:20,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ // Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(top: 15.h),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart
new file mode 100644
index 00000000..17f9d435
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart
@@ -0,0 +1,56 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class LockEscalationPage extends StatefulWidget {
+ const LockEscalationPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockEscalationPageState();
+}
+
+class _LockEscalationPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockEscalation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ SizedBox(height: 60.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,),
+ SizedBox(width: 10.w,),
+ Text(TranslationLoader.lanKeys.haveNewVersion.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),)
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ Text("${TranslationLoader.lanKeys.currentVersion.tr}:1.0.0"),
+ SizedBox(height: 10.h,),
+ Text("${TranslationLoader.lanKeys.newVersion.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.upgrade.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart
new file mode 100644
index 00000000..2ab120f2
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart
@@ -0,0 +1,121 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class LockSetPage extends StatefulWidget {
+ const LockSetPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockSetPageState();
+}
+
+class _LockSetPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.set.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ Expanded(
+ child: ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.basicInformation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.basicInformationPage);
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.wirelessKeyboard.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.wirelessKeyboardPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.doorMagnetic.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.doorMagneticPage);
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlocking.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.remoteUnlockingPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.automaticBlockingPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.normallyOpenModePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.lockSoundSetPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.burglarAlarm.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.burglarAlarmPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.resetButton.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.resetButtonPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.unlockQRCode.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.unlockQRCodePage);
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockTime.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.lockTimePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.diagnose.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.diagnosePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.uploadData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.uploadDataPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.importOtherLockData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.importOtherLockDataPage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockEscalation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.lockEscalationPage);
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:"Amazon Alexa", rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:"Google Home", rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.markedHouseState.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.markedHouseStatePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.unlockReminder.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.delete.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ ),
+ ],
+ )
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart
new file mode 100644
index 00000000..3df0bf74
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart
@@ -0,0 +1,113 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class LockSoundSetPage extends StatefulWidget {
+ const LockSoundSetPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockSoundSetPageState();
+}
+
+class _LockSoundSetPageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockSound.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ Container(height: 10.h,),
+ Container(
+ padding: EdgeInsets.all(30.w),
+ color: Colors.white,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.lockSoundTip.tr)),
+ ],
+ ),
+ ),
+ SizedBox(height: 10.h,),
+ Visibility(
+ visible: true,
+ child: Container(
+ color: Colors.white,
+ child: Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.pleaseSeletLockVolume.tr, rightTitle:"", isHaveLine: true),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.low.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lower.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.medium.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.higher.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.high.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ ],
+ ),
+ )
+ ),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.save.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ )
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart
new file mode 100644
index 00000000..b992af54
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart
@@ -0,0 +1,60 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class LockTimePage extends StatefulWidget {
+ const LockTimePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockTimePageState();
+}
+
+class _LockTimePageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockTime.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ SizedBox(height: 50.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text("2023.07.10 11.47.33", style: TextStyle(fontSize: 36.sp)),
+ ],
+ ),
+ SizedBox(height: 60.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.calibrationTime.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ SizedBox(height: 40.h,),
+ GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ child: Text(TranslationLoader.lanKeys.setTheDSTMode.tr, style: TextStyle(fontSize: 30.sp, color: AppColors.mainColor))
+ ),
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart
new file mode 100644
index 00000000..9015519d
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart
@@ -0,0 +1,57 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class MarkedHouseStatePage extends StatefulWidget {
+ const MarkedHouseStatePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _MarkedHouseStatePageState();
+}
+
+class _MarkedHouseStatePageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.markedHouseState.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ child: Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.leisure.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
+ ),
+ SizedBox(height: 60.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart
new file mode 100644
index 00000000..fcccf500
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart
@@ -0,0 +1,197 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class NormallyOpenModePage extends StatefulWidget {
+ const NormallyOpenModePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _NormallyOpenModePageState();
+}
+
+class _NormallyOpenModePageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.normallyOpenMode.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ Container(height: 10.h,),
+ Container(
+ padding: EdgeInsets.all(30.w),
+ color: Colors.white,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.normallyOpenModeTip.tr)),
+ ],
+ ),
+ ),
+ SizedBox(height: 10.h,),
+ Visibility(
+ visible: true,
+ child: Container(
+ color: Colors.white,
+ child: Column(
+ children: [
+ topWidget(),
+ SizedBox(height: 10.h,),
+ bottomWidget()
+ ],
+ ),
+ )
+ ),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.save.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ // Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ )
+ );
+ }
+
+ Widget topWidget(){
+ return Container(
+ height: 150.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ height: 60.h,
+ // color: Colors.red,
+ padding: EdgeInsets.only(left:20.h, top: 15.h),
+ child: Text("${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.date.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
+ ),
+ Container(
+ height: 90.h,
+ padding: EdgeInsets.only(left:10.w, right: 10.w),
+ child: GridView.builder(
+ gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 7,
+ childAspectRatio: 1.0
+ ),
+ itemCount: 7,
+ physics: const NeverScrollableScrollPhysics(),
+ itemBuilder: (context,index){
+ return btnItem(index);
+ })
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget btnItem(int index){
+ String dateStr;
+ switch (index) {
+ case 0:
+ dateStr = TranslationLoader.lanKeys.Sunday.tr;
+ break;
+ case 1:
+ dateStr = TranslationLoader.lanKeys.Monday.tr;
+ break;
+ case 2:
+ dateStr = TranslationLoader.lanKeys.Tuesday.tr;
+ break;
+ case 3:
+ dateStr = TranslationLoader.lanKeys.Wednesday.tr;
+ break;
+ case 4:
+ dateStr = TranslationLoader.lanKeys.Thursday.tr;
+ break;
+ case 5:
+ dateStr = TranslationLoader.lanKeys.Friday.tr;
+ break;
+ case 6:
+ dateStr = TranslationLoader.lanKeys.Saturday.tr;
+ break;
+ default:
+ break;
+ }
+ return GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ width: 70.h,
+ height: 70.h,
+ margin: EdgeInsets.all(10.h),
+ decoration: BoxDecoration(
+ // color: Colors.blue,
+ border: Border.all(width: 1, color: Colors.grey),
+ borderRadius: BorderRadius.circular(60.w),
+ ),
+ child: Center(child: Text(dateStr)),
+ ),
+ );
+ }
+
+ Widget bottomWidget(){
+ return Column(
+ children: [
+ Container(color: AppColors.mainBackgroundColor, height: 10.h,),
+ CommonItem(leftTitel:"${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
+ rightWidget: GestureDetector(
+ onTap: (){
+
+ },
+ child: Row(
+ children: [
+ Text(TranslationLoader.lanKeys.allDay.tr),
+ SizedBox(width: 5.w,),
+ Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
+ ],
+ ),
+ )),
+ Visibility(
+ visible: true,
+ child: Container(
+ color: Colors.white,
+ child: Column(
+ children: [
+ CommonItem(leftTitel:"${TranslationLoader.lanKeys.begin.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
+
+ }),
+ CommonItem(leftTitel:"${TranslationLoader.lanKeys.end.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ ),
+ )
+ ),
+
+ ],
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart
new file mode 100644
index 00000000..31c206c1
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart
@@ -0,0 +1,56 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class RemoteUnlockingPage extends StatefulWidget {
+ const RemoteUnlockingPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _RemoteUnlockingPageState();
+}
+
+class _RemoteUnlockingPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.remoteUnlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.remoteUnlockingPageTip.tr)),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart
new file mode 100644
index 00000000..53bb0a8e
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart
@@ -0,0 +1,57 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class ResetButtonPage extends StatefulWidget {
+ const ResetButtonPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _ResetButtonPageState();
+}
+
+class _ResetButtonPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.resetButton.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.resetButtonTip.tr)),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
+
diff --git a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart
new file mode 100644
index 00000000..71454639
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart
@@ -0,0 +1,70 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+import 'package:qr_flutter/qr_flutter.dart';
+
+class UnlockQRCodePage extends StatefulWidget {
+ const UnlockQRCodePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _UnlockQRCodePageState();
+}
+
+class _UnlockQRCodePageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ Container(
+ padding: EdgeInsets.all(25.w),
+ margin: EdgeInsets.all(25.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(10.h)),
+ ),
+ child: Text("拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边")
+ ),
+ Container(
+ width: 1.sw,
+ padding: EdgeInsets.only(top:50.w),
+ margin: EdgeInsets.only(left: 25.w, right: 25.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(10.h)),
+ ),
+ child: Column(
+ children: [
+ // Image.asset('images/main/icon_addDoorMagnetic_tip.png', width: 300.w, height: 300.w,),
+ // QrImageView(
+ // data:'二维码',
+ // size:300,
+ // ),
+ QrImage(data: 'www.baidu.com', size: 300.w),
+ SizedBox(height: 50.w,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.share.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ width: 250.w,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ SizedBox(height: 60.w,)
+ ],
+ )
+ ),
+ ],
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart b/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart
new file mode 100644
index 00000000..4b9a277f
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class UploadDataPage extends StatefulWidget {
+ const UploadDataPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _UploadDataPageState();
+}
+
+class _UploadDataPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.uploadData.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Container(
+ padding: EdgeInsets.all(30.w),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(child: Text(TranslationLoader.lanKeys.uploadDataTip.tr)),
+ ],
+ ),
+ SizedBox(height: 30.h,),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.begin.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart
new file mode 100644
index 00000000..6d59ff5c
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart
@@ -0,0 +1,81 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class AddWirelessKeyboardPage extends StatefulWidget {
+ const AddWirelessKeyboardPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AddWirelessKeyboardPageState();
+}
+
+class _AddWirelessKeyboardPageState extends State {
+
+@override
+Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 100.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 90.h,),
+ Image.asset('images/main/icon_addWirelessKeyboardTip.png', width: 300.w, height: 300.w,),
+ SizedBox(height: 90.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 90.h,),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.next.tr,
+ borderRadius: 10.w,
+ fontSize: 28.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage);
+ }
+ ),
+ // SizedBox(height: 20.h,),
+ SubmitBtn(
+ btnName:TranslationLoader.lanKeys.theScreenNeverFlickered.tr,
+ borderRadius: 10.w,
+ fontSize: 28.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w),
+ padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.addWirelessKeyboardScreenNotLightOnPage);
+ }
+ ),
+ ],
+ ),
+ );
+}
+
+
+void onShow(){
+
+}
+
+void onHide(){
+
+}
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart
new file mode 100644
index 00000000..359e7795
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart
@@ -0,0 +1,76 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget {
+ const AddWirelessKeyboardScreenNotLightOnPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AddWirelessKeyboardScreenNotLightOnPageState();
+}
+
+class _AddWirelessKeyboardScreenNotLightOnPageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 100.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.enterNumberOrPressSet.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text("(${TranslationLoader.lanKeys.theLocationOfTheSetKeyWillBeDifferent.tr})", style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 90.h,),
+ Image.asset('images/main/icon_addWirelessKeyboardUnLightOnTip.png', width: 300.w, height: 300.w,),
+ SizedBox(height: 90.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 90.h,),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.next.tr,
+ borderRadius: 10.w,
+ fontSize: 28.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ void onShow(){
+
+ }
+
+ void onHide(){
+
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart
new file mode 100644
index 00000000..319ddf56
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart
@@ -0,0 +1,74 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class SeletWirelessKeyboardPage extends StatefulWidget {
+ const SeletWirelessKeyboardPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SeletWirelessKeyboardPageState();
+}
+
+class _SeletWirelessKeyboardPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView.builder(
+ itemCount:20,
+ itemBuilder: (c, index){
+ return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
+ // Navigator.pushNamed(context, Routers.saveLockPage);
+ });
+ }
+ ),
+ );
+ }
+
+ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ height: 80.h,
+ color: Colors.white,
+ child: Row(
+ children: [
+ // SizedBox(width:20.w),
+ // Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
+ SizedBox(width:30.w),
+ ],
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ ),
+ );
+ }
+
+ void onShow(){
+ }
+
+ void onHide(){
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart
new file mode 100644
index 00000000..af5f56a4
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart
@@ -0,0 +1,108 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../../appRouters.dart';
+import '../../../../../app_settings/app_colors.dart';
+import '../../../../../tools/submitBtn.dart';
+import '../../../../../tools/titleAppBar.dart';
+import '../../../../../translations/trans_lib.dart';
+
+class WirelessKeyboardPage extends StatefulWidget {
+ const WirelessKeyboardPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _WirelessKeyboardPageState();
+}
+
+class _WirelessKeyboardPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.wirelessKeyboard.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}",
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.addWirelessKeyboardPage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ // Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ // SizedBox(width:20.w),
+ // Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart
new file mode 100644
index 00000000..eed584dc
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart
@@ -0,0 +1,150 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../appRouters.dart';
+import '../../../app_settings/app_colors.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class LockDetailPage extends StatefulWidget {
+ const LockDetailPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockDetailPageState();
+}
+
+class _LockDetailPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ topWidget(),
+ Expanded(child: bottomWidget())
+ ],
+ ),
+ );
+ }
+
+ Widget topWidget(){
+ return Column(
+ children: [
+ SizedBox(height:40.h),
+ Stack(
+ alignment: Alignment.centerRight,
+ children: [
+ Align(
+ alignment:Alignment.center,
+ child: Text("MCBN01-ea9240", style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),)
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:5.w),
+ Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ SizedBox(width:30.w),
+ ],
+ ),
+ ],
+ ),
+ SizedBox(height: 40.h),
+ Container(
+ width: 1.sw,
+ height: 280.w,
+ child: Stack(
+ children: [
+ Center(child: Image.asset('images/main/icon_main_openLockBtn.png', width: 280.w, height: 280.w)),
+ Align(
+ alignment: const Alignment(0.5, 1),
+ child: Image.asset('images/main/icon_main_remoteUnlocking.png', width: 90.w, height: 90.w,)
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 40.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.clickUnlockAndHoldDownClose.tr,style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 40.h,),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ );
+ }
+
+ Widget bottomWidget(){
+ return Container(
+ margin: EdgeInsets.only(left:10.w, right:10.w, top: 25.h),
+ // color: Colors.blue,
+ child: SizedBox(
+ child:GridView.count(
+ crossAxisCount: 4,
+ // childAspectRatio: 3,
+ crossAxisSpacing: 20.w,
+ mainAxisSpacing: 10.h,
+ physics: const NeverScrollableScrollPhysics(),
+ children: [
+ bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys.checkingIn.tr, (){
+
+ }),
+ bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys.electronicKey.tr, (){
+ Navigator.pushNamed(context, Routers.electronicKeyListPage);
+ }),
+ bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys.password.tr, (){
+ Navigator.pushNamed(context, Routers.passwordKeyListPage);
+ }),
+ bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys.card.tr, (){
+ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 0);
+ }),
+ bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys.fingerprint.tr, (){
+ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 1);
+ }),
+ bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys.remoteControl.tr, (){
+ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 2);
+ }),
+ bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys.authorizedAdmin.tr, (){
+ Navigator.pushNamed(context, Routers.authorizedAdminListPage);
+ }),
+ bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys.operatingRecord.tr, (){
+ Navigator.pushNamed(context, Routers.lockOperatingRecordPage);
+ }),
+ bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys.set.tr, (){
+ Navigator.pushNamed(context, Routers.lockSetPage);
+ }),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget bottomItem(String iconUrl,String name, Function onClick){
+ var width = 65.w;
+ var height = 70.h;
+ return GestureDetector(
+ onTap:onClick,
+ child: Container(
+ // height: 300.h,
+ color: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(
+ width: width,
+ height: height,
+ child: Image.asset(iconUrl, width: width,height: height,fit: BoxFit.fitWidth),
+ ),
+ SizedBox(height: 15.w),
+ Expanded(child: Text(name,style: TextStyle(fontSize: 25.sp, color:const Color(0xff333333)),textAlign: TextAlign.center))
+ ],
+ )
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart
new file mode 100644
index 00000000..8521bd2a
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart
@@ -0,0 +1,156 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../app_settings/app_colors.dart';
+import '../../../tools/jh_pop_menus.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class LockOperatingRecordPage extends StatefulWidget {
+ const LockOperatingRecordPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockOperatingRecordPageState();
+}
+
+class _LockOperatingRecordPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.operatingRecord.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: const Text("操作", style: TextStyle(color: Colors.white),),
+ onPressed: (){
+ JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
+ print('选中index: $index');
+ print('选中text: $selText');
+
+ if (selText == '添加朋友') {
+ // JhNavUtils.pushNamed(context, 'WxAddFriendPage');
+ }
+ if (selText == '扫一扫') {
+ // _scan();
+ }
+ });
+ },),
+ ],),
+ body: Column(
+ children: [
+ Container(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ padding: EdgeInsets.all(20.h),
+ child: Text(TranslationLoader.lanKeys.lockOperatingRecordTip.tr, textAlign: TextAlign.start,),
+ ),
+ _searchWidget(),
+ Expanded(child: _buildMainUI()),
+ ],
+ ),
+ );
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 60.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -22.0, right: -15.0, bottom: 10.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ hintStyle: TextStyle(fontSize: 28.sp),
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:20,
+ itemBuilder: (c, index){
+ if(index%2 == 0){
+ return _dateItem("2023-06-29");
+ }else{
+ return _operatingRecordItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ // Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
+ });
+ }
+ }
+ );
+ }
+
+ Widget _dateItem(String lockDate){
+ return Container(
+ height: 70.h,
+ // color: Colors.red,
+ padding: EdgeInsets.only(left:20.h, right: 20.h),
+ child: Row(
+ children: [
+ Text(lockDate, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ );
+ }
+
+ Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 110.h,
+ padding: EdgeInsets.only(left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ SizedBox(height:10.h),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart
new file mode 100644
index 00000000..f63c8e33
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart
@@ -0,0 +1,200 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../translations/trans_lib.dart';
+
+class OtherTypeAddKeyPage extends StatefulWidget {
+ final String seletType;
+ final int lockType;
+ const OtherTypeAddKeyPage({Key key, @required this.seletType, @required this.lockType}) : super(key: key);
+
+ @override
+ State createState() => _OtherTypeAddKeyPageState();
+}
+
+class _OtherTypeAddKeyPageState extends State {
+
+ final TextEditingController _controller = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.seletType)) {
+ case 0:
+ {
+ // 永久
+ // return sendElectronicKeySucceed();
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 限时
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
+ keyTimeLimitWidget(),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ case 2:
+ {
+ // 循环
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ keyBottomWidget()
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 密码命名输入框
+ Widget perpetualKeyWidget(String titleStr, String rightTitle, TextEditingController controller){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:titleStr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(rightTitle)),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 限时顶部选择日期
+ Widget keyTimeLimitWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(){
+ return Column(
+ children: [
+ // Container(
+ // padding: EdgeInsets.all(20.w),
+ // child: Row(
+ // // crossAxisAlignment: CrossAxisAlignment.start,
+ // children: [
+ // Expanded(child: Text(tipStr, textAlign: TextAlign.start,)),
+ // ],
+ // ),
+ // ),
+ SubmitBtn(btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(widget.lockType)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ );
+ }
+
+ // 发送电子钥匙成功
+ Widget sendElectronicKeySucceed(){
+ return Column(
+ children: [
+ Container(
+ height: 300.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ children: [
+ SizedBox(height: 30.h,),
+ Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
+ SizedBox(height: 20.h,),
+ Text("操作成功,密码为",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ SizedBox(height: 10.h,),
+ Text("62689876",style: TextStyle(fontSize: 60.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ ),
+ SizedBox(height: 20.h,),
+ SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '分享', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '标记为:已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ );
+ }
+
+ String getAppBarTitle(int type){
+ String title;
+ switch (type) {
+ case 0:
+ title = TranslationLoader.lanKeys.card.tr;
+ break;
+ case 1:
+ title = TranslationLoader.lanKeys.fingerprint.tr;
+ break;
+ case 2:
+ title = TranslationLoader.lanKeys.remoteControl.tr;
+ break;
+ default:
+ break;
+ }
+ return title;
+ }
+
+ // 接受者信息输入框
+ Widget getTFWidget(String tfStr){
+ return Container(
+ height: 50.h,
+ width: 500.w,
+ child: Row(
+ children: [
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ textAlign:TextAlign.end,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
+ hintText: tfStr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ SizedBox(width: 10.w,),
+ ],
+ ),
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart
new file mode 100644
index 00000000..43b5f48c
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart
@@ -0,0 +1,195 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class OtherTypeKeyDetailPage extends StatefulWidget {
+ const OtherTypeKeyDetailPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _OtherTypeKeyDetailPageState();
+}
+
+class _OtherTypeKeyDetailPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ var type = ModalRoute.of(context)?.settings?.arguments;
+
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.share.tr, style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.additive.tr, rightTitle:"15080825640", action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.addTime.tr, rightTitle:"2020.06.21 11:49", action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 40.h),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.delete.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ String getAppBarTitle(int type){
+ String title;
+ switch (type) {
+ case 0:
+ title = TranslationLoader.lanKeys.card.tr;
+ break;
+ case 1:
+ title = TranslationLoader.lanKeys.fingerprint.tr;
+ break;
+ case 2:
+ title = TranslationLoader.lanKeys.remoteControl.tr;
+ break;
+ default:
+ break;
+ }
+ return title;
+ }
+
+ Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // height: 80.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ ),
+ SizedBox(width:5.w),
+ isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
+ // SizedBox(width:10.w),
+ ],
+ ),
+ ),
+ isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
+ ],
+ ),
+ );
+ }
+
+ void showCupertinoAlertDialog(BuildContext context) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return Card(
+ color: const Color(0x00FFFFFF),
+ child: CupertinoAlertDialog(
+ title: const Text("修改密码"),
+ content: Column(
+ children: [
+ const SizedBox(height: 10,),
+ Container(
+ height: 80.h,
+ // color: Colors.white,
+ margin: EdgeInsets.all(10.w),
+ child: const TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ // contentPadding: const EdgeInsets.only(
+ // top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: "请输入要修改的名字",
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ // icon: Padding(
+ // padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ // child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ // ),
+ // //右边图标设置
+ // suffixIcon: GestureDetector(
+ // onTap: () {
+ // //addPostFrameCallback是 StatefulWidge 渲染结束的回调,只会被调用一次
+ // // SchedulerBinding.instance.addPostFrameCallback((_) {
+ // // _controller.text = "";
+ // // });
+ // },
+ // child: Padding(
+ // padding: EdgeInsets.all(8),
+ // child: Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ // ),
+ // )
+ ),
+ ),
+ )
+ ],
+ ),
+ actions: [
+ CupertinoDialogAction(
+ child: const Text("取消"),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("取消");
+ },
+ ),
+ CupertinoDialogAction(
+ child: const Text("确定"),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("确定");
+ },
+ ),
+ ],
+ ),
+ );
+ });
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart
new file mode 100644
index 00000000..25767677
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart
@@ -0,0 +1,153 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class OtherTypeKeyListPage extends StatefulWidget {
+ const OtherTypeKeyListPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _OtherTypeKeyListPageState();
+}
+
+class _OtherTypeKeyListPageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ var type = ModalRoute.of(context)?.settings?.arguments;
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ _searchWidget(),
+ Expanded(child: _buildMainUI(type)),
+ SubmitBtn(
+ btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(type)}',
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, arguments: type);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ String getAppBarTitle(int type){
+ String title;
+ switch (type) {
+ case 0:
+ title = TranslationLoader.lanKeys.card.tr;
+ break;
+ case 1:
+ title = TranslationLoader.lanKeys.fingerprint.tr;
+ break;
+ case 2:
+ title = TranslationLoader.lanKeys.remoteControl.tr;
+ break;
+ default:
+ break;
+ }
+ return title;
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 80.h,
+ margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(int type){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage, arguments: type);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ SizedBox(height:5.h),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart
new file mode 100644
index 00000000..1c9fccde
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart
@@ -0,0 +1,51 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+import 'otherTypeKeyManage_tabbar.dart';
+
+class OtherTypeKeyManagePage extends StatefulWidget {
+ const OtherTypeKeyManagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _OtherTypeKeyManagePageState();
+}
+
+class _OtherTypeKeyManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ var lockType = ModalRoute.of(context)?.settings?.arguments;
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.addTip.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType),
+ ],
+ ),
+ );
+ }
+
+ String getAppBarTitle(int type){
+ String title;
+ switch (type) {
+ case 0:
+ title = TranslationLoader.lanKeys.card.tr;
+ break;
+ case 1:
+ title = TranslationLoader.lanKeys.fingerprint.tr;
+ break;
+ case 2:
+ title = TranslationLoader.lanKeys.remoteControl.tr;
+ break;
+ default:
+ break;
+ }
+ return title;
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart
new file mode 100644
index 00000000..1dbcc2ec
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart
@@ -0,0 +1,81 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../translations/trans_lib.dart';
+import '../otherTypeAddKey/otherTypeAddKey_page.dart';
+
+class OtherTypeKeyManageTabbar extends StatefulWidget {
+ var initialIndex=1;
+ var lockType=0;
+ OtherTypeKeyManageTabbar({Key key, @required this.initialIndex, @required this.lockType}) : super(key: key);
+
+ @override
+ State createState() => _OtherTypeKeyManageTabbarState();
+}
+
+class _OtherTypeKeyManageTabbarState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs = [
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, seletType: "0"),
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, seletType: "1"),
+ ItemView(title: TranslationLoader.lanKeys.circulation.tr, seletType: "2"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(child: SizedBox(width: 1.sw/5, child: Text(item.title, textAlign: TextAlign.center)));
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => OtherTypeAddKeyPage(seletType: item.seletType, lockType: widget.lockType,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.seletType});
+
+ final String title;
+ final String seletType;
+}
diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart
new file mode 100644
index 00000000..511edd58
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart
@@ -0,0 +1,175 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class PasswordKeyDetailPage extends StatefulWidget {
+ const PasswordKeyDetailPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _PasswordKeyDetailPageState();
+}
+
+class _PasswordKeyDetailPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.passwordDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: const Text("分享", style: TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
+ showCupertinoAlertDialog(context);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){
+ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
+
+ }),
+ Container(height: 10.h),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
+
+ }),
+ Container(height: 40.h),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.delete.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ // height: 80.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ ),
+ SizedBox(width:5.w),
+ isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
+ // SizedBox(width:10.w),
+ ],
+ ),
+ ),
+ isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
+ ],
+ ),
+ );
+ }
+
+ void showCupertinoAlertDialog(BuildContext context) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return Card(
+ color: const Color(0x00FFFFFF),
+ child: CupertinoAlertDialog(
+ title: Text("${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.password.tr}"),
+ content: Column(
+ children: [
+ const SizedBox(height: 10,),
+ Container(
+ height: 80.h,
+ // color: Colors.white,
+ margin: EdgeInsets.all(10.w),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ // contentPadding: const EdgeInsets.only(
+ // top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ // icon: Padding(
+ // padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ // child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ // ),
+ // //右边图标设置
+ // suffixIcon: GestureDetector(
+ // onTap: () {
+ // //addPostFrameCallback是 StatefulWidge 渲染结束的回调,只会被调用一次
+ // // SchedulerBinding.instance.addPostFrameCallback((_) {
+ // // _controller.text = "";
+ // // });
+ // },
+ // child: Padding(
+ // padding: EdgeInsets.all(8),
+ // child: Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ // ),
+ // )
+ ),
+ ),
+ )
+ ],
+ ),
+ actions: [
+ CupertinoDialogAction(
+ child: Text(TranslationLoader.lanKeys.cancel.tr),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("取消");
+ },
+ ),
+ CupertinoDialogAction(
+ child: Text(TranslationLoader.lanKeys.sure.tr),
+ onPressed: () {
+ Navigator.pop(context);
+ // print("确定");
+ },
+ ),
+ ],
+ ),
+ );
+ });
+ }
+
+}
diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart
new file mode 100644
index 00000000..bac698bc
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart
@@ -0,0 +1,132 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class PasswordKeyListPage extends StatefulWidget {
+ const PasswordKeyListPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _PasswordKeyListPageState();
+}
+
+class _PasswordKeyListPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.password.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),),
+ onPressed: (){
+
+ },),
+ ],),
+ body: Column(
+ children: [
+ _searchWidget(),
+ Expanded(child: _buildMainUI()),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.getPassword.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.passwordKeyManagePage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _searchWidget(){
+ return Container(
+ height: 80.h,
+ margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(5)),
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
+ child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildMainUI(){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
+ Navigator.pushNamed(context, Routers.passwordKeyDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 100.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10.w),
+ ),
+ child: Row(
+ children: [
+ SizedBox(width: 30.w,),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width: 30.w,),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ SizedBox(height:5.h),
+ Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ SizedBox(width:20.h),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart
new file mode 100644
index 00000000..59c56bfc
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart
@@ -0,0 +1,32 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/titleAppBar.dart';
+import '../../../../translations/trans_lib.dart';
+
+class PasswordKeyManagePage extends StatefulWidget {
+ const PasswordKeyManagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _PasswordKeyManagePageState();
+}
+
+class _PasswordKeyManagePageState extends State {
+ var index=0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.getPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ PasswordKeyManageTabbarPage(initialIndex: index,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart
new file mode 100644
index 00000000..1741aa6b
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart
@@ -0,0 +1,91 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/CustomUnderlineTabIndicator.dart';
+import '../../../../translations/trans_lib.dart';
+import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart';
+
+class PasswordKeyManageTabbarPage extends StatefulWidget {
+ var initialIndex=1;
+
+ PasswordKeyManageTabbarPage({Key key, @required this.initialIndex}) : super(key: key);
+ @override
+ State createState() => _PasswordKeyManageTabbarPageState();
+}
+
+class _PasswordKeyManageTabbarPageState extends State with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ final List _itemTabs = [
+ ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"),
+ ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"),
+ ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"),
+ ItemView(title: TranslationLoader.lanKeys.custom.tr, type: "3"),
+ ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "4"),
+ ItemView(title: TranslationLoader.lanKeys.clearAll.tr, type: "5"),
+ ];
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: Column(
+ children: [
+ _tabBar(),
+ _pageWidget(),
+ ],
+ )
+ );
+ }
+
+ TabBar _tabBar(){
+ return TabBar(
+ controller: _tabController,
+ tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
+ isScrollable: true,
+ indicatorColor: Colors.red,
+ unselectedLabelColor: Colors.black,
+ unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
+ automaticIndicatorColorAdjustment:true,
+ labelColor: AppColors.mainColor,
+ labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600),
+ indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
+ );
+ }
+
+ Tab _tab(ItemView item) {
+ return Tab(
+ // text: item.title,
+ child: Container(
+ width: 1.sw/8,
+ // margin: EdgeInsets.all(10.w),
+ // color: Colors.red,
+ child: Text(item.title, textAlign: TextAlign.center,),
+ ),
+ );
+ }
+
+ Widget _pageWidget(){
+ return Expanded(
+ child: TabBarView(
+ controller: _tabController,
+ children: _itemTabs.map((ItemView item) => PasswordKeyPerpetualPage(type: item.type,)).toList(),
+ ),
+ );
+ }
+}
+
+class ItemView {
+ const ItemView({@required this.title, @required this.type});
+
+ final String title;
+ final String type;
+}
diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart
new file mode 100644
index 00000000..0e6d9168
--- /dev/null
+++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart
@@ -0,0 +1,263 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../../appRouters.dart';
+import '../../../../app_settings/app_colors.dart';
+import '../../../../tools/commonItem.dart';
+import '../../../../tools/submitBtn.dart';
+import '../../../../translations/trans_lib.dart';
+
+class PasswordKeyPerpetualPage extends StatefulWidget {
+ final String type;
+
+ const PasswordKeyPerpetualPage({Key key, @required this.type}) : super(key: key);
+ @override
+ State createState() => _PasswordKeyPerpetualPageState();
+}
+
+class _PasswordKeyPerpetualPageState extends State {
+
+ final TextEditingController _controller = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return indexChangeWidget();
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+
+ }
+
+ Widget indexChangeWidget(){
+ switch (int.parse(widget.type)) {
+ case 0:
+ {
+ // 永久
+ // return sendElectronicKeySucceed();
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip1.tr)
+ ],
+ );
+ }
+ break;
+ case 1:
+ {
+ // 限时
+ return Column(
+ children: [
+ keyTimeLimitWidget(),
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip2.tr)
+ ],
+ );
+ }
+ break;
+ case 2:
+ {
+ // 单次
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip3.tr)
+ ],
+ );
+ }
+ break;
+ case 3:
+ {
+ // 自定义
+ return Column(
+ children: [
+ keyIfPerpetualWidget(),
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ perpetualKeyWidget(TranslationLoader.lanKeys.password.tr, "请输入6-9位数字", _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip4.tr)
+ ],
+ );
+ }
+ break;
+ case 4:
+ {
+ // 循环
+ return Column(
+ children: [
+ keyCirculationWidget(),
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip5.tr)
+ ],
+ );
+ }
+ break;
+ case 5:
+ {
+ // 清空
+ return Column(
+ children: [
+ perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
+ keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip6.tr)
+ ],
+ );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // 密码命名输入框
+ Widget perpetualKeyWidget(String titleStr, String rightTitle, TextEditingController controller){
+ return Column(
+ children: [
+ Container(height: 10.h),
+ CommonItem(leftTitel:titleStr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(rightTitle)),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 限时顶部选择日期
+ Widget keyTimeLimitWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
+ // _showDatePicker();
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 自定义是否永久
+ Widget keyIfPerpetualWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.permanent.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
+
+ }),
+ Container(height: 10.h),
+ ],
+ );
+ }
+
+ // 循环
+ Widget keyCirculationWidget(){
+ return Column(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.recursiveDevice.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"11:00", isHaveDirection: true, action:(){
+
+ }),
+ ],
+ );
+ }
+
+ Widget keyBottomWidget(String tipStr){
+ return Column(
+ children: [
+ Container(
+ padding: EdgeInsets.all(20.w),
+ child: Row(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(child: Text(tipStr, textAlign: TextAlign.start,)),
+ ],
+ ),
+ ),
+ SubmitBtn(btnName: TranslationLoader.lanKeys.getPassword.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+
+ }
+ ),
+ ],
+ );
+ }
+
+ // 发送电子钥匙成功
+ Widget sendElectronicKeySucceed(){
+ return Column(
+ children: [
+ Container(
+ height: 300.h,
+ width: 1.sw,
+ color: Colors.white,
+ child: Column(
+ children: [
+ SizedBox(height: 30.h,),
+ Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
+ SizedBox(height: 20.h,),
+ Text("操作成功,密码为",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ SizedBox(height: 10.h,),
+ Text("62689876",style: TextStyle(fontSize: 60.sp, color: Colors.black, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ ),
+ SizedBox(height: 20.h,),
+ SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ SubmitBtn(btnName: '分享', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+ Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
+ }),
+ SubmitBtn(btnName: '标记为:已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
+
+ }),
+ ],
+ );
+ }
+
+ // 接受者信息输入框
+ Widget getTFWidget(String tfStr){
+ return Container(
+ height: 50.h,
+ width: 500.w,
+ child: Row(
+ children: [
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ textAlign:TextAlign.end,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
+ hintText: tfStr,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ SizedBox(width: 10.w,),
+ ],
+ ),
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+
+}
diff --git a/star_lock/lib/main/lockMian/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain_page.dart
new file mode 100644
index 00000000..658eb44b
--- /dev/null
+++ b/star_lock/lib/main/lockMian/lockMain_page.dart
@@ -0,0 +1,147 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/app_settings/app_colors.dart';
+import 'package:star_lock/mine/mineSet/mineSet_page.dart';
+
+import '../../appRouters.dart';
+import '../../baseWidget.dart';
+import '../../mine/mine_page.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class StarLockMain extends StatefulWidget {
+ const StarLockMain({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockMainState();
+}
+
+class _StarLockMainState extends State with BaseWidget{
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xFFF5F5F5),
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder(
+ builder: (context) => IconButton(
+ icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,),
+ onPressed: () {
+ Scaffold.of(context).openDrawer();
+ },
+ )
+ ),backgroundColor: AppColors.mainColor),
+ drawer: Drawer(
+ width:1.sw/3*2,
+ child: StarLockMinePage(),
+ ),
+ body: getLockList(),
+ // body: unHaveData(),
+ );
+ }
+
+ Widget getLockList(){
+ return ListView.builder(
+ itemCount:10,
+ itemBuilder: (c, index){
+ return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
+ Navigator.pushNamed(context, Routers.lockDetailPage);
+ });
+ }
+ );
+ }
+
+ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 150.h,
+ margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20.w),
+ ),
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(height: 30.h,),
+ Row(
+ children: [
+ SizedBox(width:20.w),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
+ SizedBox(width:5.w),
+ Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
+ SizedBox(width:30.w),
+ ],
+ ),
+ SizedBox(height: 20.h,),
+ Row(
+ children: [
+ SizedBox(width:30.w),
+ Text("永久/管理员", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget unHaveData(){
+ return Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ border: Border.all(width: 4, color: AppColors.mainColor),
+ borderRadius: BorderRadius.circular(75),
+ ),
+ child:InkWell(
+ child: Padding(
+ padding: const EdgeInsets.all(30.0),
+ child: Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w,),
+ ),
+ onTap: () {
+ //实现回调函数
+ Navigator.pushNamed(context, Routers.seletLockTypePage,
+ // arguments: {
+ // "url": ConstConfig.privacAgreementUrl,
+ // "title": '隐私政策'
+ // }
+ );
+ },
+ )
+ ),
+ ],
+ ),
+ SizedBox(height: h(50.h),),
+ Container(
+ padding: EdgeInsets.all(30.w),
+ child: Text(TranslationLoader.lanKeys.whenAddingLockThePhoneMustBeNextToTheLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),)
+ )
+ ],
+ );
+ }
+
+ void onShow(){
+
+ }
+
+ void onHide(){
+
+ }
+}
diff --git a/star_lock/lib/mine/addLock/addLock/addLock_page.dart b/star_lock/lib/mine/addLock/addLock/addLock_page.dart
new file mode 100644
index 00000000..3f6385f6
--- /dev/null
+++ b/star_lock/lib/mine/addLock/addLock/addLock_page.dart
@@ -0,0 +1,69 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../appRouters.dart';
+import '../../../app_settings/app_colors.dart';
+import '../../../baseWidget.dart';
+import '../../../tools/submitBtn.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class AddLockPage extends StatefulWidget {
+ const AddLockPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _AddLockPageState();
+}
+
+class _AddLockPageState extends State with BaseWidget{
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 100.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 120.h,),
+ Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w,),
+ SizedBox(height: 120.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.lightTouchScreenTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 120.h,),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.next.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
+ padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
+ onClick: (){
+ Navigator.pushNamed(context, Routers.nearbyLockPage);
+ }
+ ),
+ ],
+ ),
+ );
+ }
+
+
+ void onShow(){
+
+ }
+
+ void onHide(){
+
+ }
+}
diff --git a/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart
new file mode 100644
index 00000000..c638ed5d
--- /dev/null
+++ b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart
@@ -0,0 +1,32 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../../../appRouters.dart';
+import '../../../app_settings/app_colors.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class LockAddressPage extends StatefulWidget {
+ const LockAddressPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _LockAddressPageState();
+}
+
+class _LockAddressPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: "锁地址", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
+ TextButton(
+ child: Text("保存", style: const TextStyle(color: Colors.white),),
+ onPressed: (){
+ Navigator.pushNamed(context, Routers.saveLockPage);
+ },),
+ ],),
+ body:Container()
+ );
+ }
+}
diff --git a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart
new file mode 100644
index 00000000..97a9f179
--- /dev/null
+++ b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart
@@ -0,0 +1,73 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import '../../../appRouters.dart';
+import '../../../app_settings/app_colors.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class NearbyLockPage extends StatefulWidget {
+ const NearbyLockPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _NearbyLockPageState();
+}
+
+class _NearbyLockPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: ListView.builder(
+ itemCount:20,
+ itemBuilder: (c, index){
+ return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
+ Navigator.pushNamed(context, Routers.lockAddressPage);
+ });
+ }
+ ),
+ );
+ }
+
+ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ height: 80.h,
+ color: Colors.white,
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
+ SizedBox(width:30.w),
+ ],
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ ),
+ );
+ }
+
+ void onShow(){
+ }
+
+ void onHide(){
+ }
+}
diff --git a/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart
new file mode 100644
index 00000000..4160b52c
--- /dev/null
+++ b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart
@@ -0,0 +1,100 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../app_settings/app_colors.dart';
+import '../../../tools/submitBtn.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class SaveLockPage extends StatefulWidget {
+ const SaveLockPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SaveLockPageState();
+}
+
+class _SaveLockPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 80.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(TranslationLoader.lanKeys.addSuccessfullyPleaseRename.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
+ ],
+ ),
+ SizedBox(height: 80.h,),
+ Container(
+ height: 80.h,
+ // color: Colors.red,
+ padding: EdgeInsets.only(left: 50.w, right: 50.w),
+ child: TextField(
+ textAlign:TextAlign.center,
+ // style:TextStyle(height: 1.1, fontSize: 36.sp, fontWeight: FontWeight.w400, color:AppColors.mainColor),
+ decoration: InputDecoration(
+ hintText: '请填写信息',
+ hintStyle: TextStyle(
+ // height: 1.1,
+ fontSize: 30.sp,
+ fontWeight: FontWeight.w400,
+ color: const Color(0xFF999999)
+ ),
+ border: OutlineInputBorder(
+ ///设置边框四个角的弧度
+ borderRadius: BorderRadius.all(Radius.circular(50.h)),
+ ///用来配置边框的样式
+ borderSide: BorderSide(
+ ///设置边框的颜色
+ color: AppColors.mainColor,
+ ///设置边框的粗细
+ width: 1,
+ ),
+ ),
+ ///用来配置输入框获取焦点时的颜色
+ focusedBorder: OutlineInputBorder(
+ ///设置边框四个角的弧度
+ borderRadius: BorderRadius.all(Radius.circular(50.h)),
+ ///用来配置边框的样式
+ borderSide: BorderSide(
+ ///设置边框的颜色
+ color: AppColors.mainColor,
+ ///设置边框的粗细
+ width: 1,
+ ),
+ ),
+ )
+ ),
+ ),
+ SizedBox(height: 120.h,),
+ SubmitBtn(
+ btnName: TranslationLoader.lanKeys.sure.tr,
+ borderRadius: 20.w,
+ margin: EdgeInsets.only(
+ left: 50.w,
+ right: 50.w,
+ top: 30.w,
+ bottom: 30.w
+ ),
+ padding: EdgeInsets.only(
+ top: 25.w,
+ bottom: 25.w
+ ),
+ onClick: (){
+ Navigator.pop(context);
+ }
+ ),
+ ],
+ )
+ );
+ }
+
+
+}
diff --git a/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart b/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart
new file mode 100644
index 00000000..005445e2
--- /dev/null
+++ b/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart
@@ -0,0 +1,135 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../../appRouters.dart';
+import '../../../app_settings/app_colors.dart';
+import '../../../baseWidget.dart';
+import '../../../tools/titleAppBar.dart';
+import '../../../translations/trans_lib.dart';
+
+class SeletLockTypePage extends StatefulWidget {
+ const SeletLockTypePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _SeletLockTypePageState();
+}
+
+class _SeletLockTypePageState extends State with BaseWidget{
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ allLock(),
+ Expanded(
+ child: Container(
+ padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
+ child: GridView.count(
+ crossAxisCount: 2,
+ childAspectRatio: 3,
+ crossAxisSpacing: 10,
+ mainAxisSpacing: 10,
+ children: [
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.doorLock.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.padlock.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.safeLock.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.intelligentLockCore.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.parkingLock.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.bicycleLock.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.longRangeControl.tr, (){
+ Navigator.pushNamed(context, Routers.addLockPage);
+ }),
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ );
+ }
+
+
+ Widget allLock(){
+ return GestureDetector(
+ onTap: (){
+
+ },
+ child: Container(
+ height: 150.h,
+ color: Colors.white,
+ margin: EdgeInsets.all(10),
+ child: Row(
+ children: [
+ SizedBox(width:40.w),
+ Image.asset('images/icon_lock.png', width: 80.w, height: 100.w,),
+ SizedBox(width:40.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(TranslationLoader.lanKeys.allLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
+ Text(TranslationLoader.lanKeys.searchAllLockType.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
+ ],
+ ),
+ ),
+ SizedBox(width:40.w),
+ Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
+ SizedBox(width:40.w),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Container(
+ height: 120.h,
+ color: Colors.white,
+ // margin: EdgeInsets.all(10),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Image.asset(lockTypeIcon, width: 40.w, height: 50.w,),
+ SizedBox(width:20.w),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(lockTypeTitle, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
+ ],
+ ),
+ ),
+ SizedBox(width:20.w),
+ Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
+ SizedBox(width:20.w),
+ ],
+ ),
+ ),
+ );
+ }
+
+ void onShow(){
+ }
+
+ void onHide(){
+ }
+}
diff --git a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_logic.dart b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_logic.dart
new file mode 100644
index 00000000..6d011497
--- /dev/null
+++ b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_logic.dart
@@ -0,0 +1,14 @@
+
+import 'dart:ui';
+import 'package:get/get.dart';
+import 'mineMultiLanguage_state.dart';
+
+class MineMultiLanguageLogic extends GetxController {
+ final MineMultiLanguageState state = MineMultiLanguageState();
+
+ void changeLanguage(Locale l) {
+ if(l == Get.locale)return;
+ Get.updateLocale(l);
+ state.resetLan();
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart
new file mode 100644
index 00000000..f1c8fb61
--- /dev/null
+++ b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../app_settings/app_colors.dart';
+import '../../tools/commonItem.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/app_dept.dart';
+import '../../translations/trans_lib.dart';
+import 'mineMultiLanguage_logic.dart';
+
+class MineMultiLanguagePage extends StatefulWidget {
+ const MineMultiLanguagePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _MineMultiLanguagePageState();
+}
+
+class _MineMultiLanguagePageState extends State {
+
+ final logic = Get.put(MineMultiLanguageLogic());
+ final state = Get.find().state;
+
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.multilingual.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: _children(),
+ )
+ );
+ }
+
+ List _children(){
+ List l = [];
+ for(int i = 0; i < state.languages.length; i++){
+ var e = state.languages[i];
+ var lanType = ExtensionLanguageType.fromLanguageCode(e.languageCode);
+ l.add(CommonItem(leftTitel:lanType.lanTitle, rightTitle:"", allHeight: 70.h, isHaveLine: true, isHaveDirection:false, isHaveRightWidget: true, rightWidget: Obx(() => state.currentLanguageType.value == lanType ? Image(image: const AssetImage("images/icon_item_checked.png"),width:30.w,height:30.w, fit: BoxFit.contain,): Container()), action: (){
+ logic.changeLanguage(e);
+ }),);
+ }
+ return l;
+ }
+}
diff --git a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart
new file mode 100644
index 00000000..2b8d5737
--- /dev/null
+++ b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart
@@ -0,0 +1,24 @@
+
+import 'dart:ui';
+import 'package:get/get.dart';
+
+import '../../tools/store_service.dart';
+import '../../translations/app_dept.dart';
+
+class MineMultiLanguageState {
+
+ List get languages {
+ return appDept.deptSupportedLocales;
+ }
+
+ var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode).obs;
+
+ AppLanuageConfigState() {
+ resetLan();
+ }
+
+ void resetLan() {
+ currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode);
+ StoreService.to.saveLanguageCode(Get.locale.languageCode);
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/mine/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet_page.dart
new file mode 100644
index 00000000..3acd0c4d
--- /dev/null
+++ b/star_lock/lib/mine/mineSet/mineSet_page.dart
@@ -0,0 +1,137 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../../appRouters.dart';
+import '../../app_settings/app_colors.dart';
+import '../../tools/commonItem.dart';
+import '../../tools/submitBtn.dart';
+import '../../tools/titleAppBar.dart';
+import '../../translations/trans_lib.dart';
+
+class MineSetPage extends StatefulWidget {
+ const MineSetPage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _MineSetPageState();
+}
+
+class _MineSetPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.mainBackgroundColor,
+ appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.moreSet.tr, haveBack:true, backgroundColor: AppColors.mainColor),
+ body:Column(
+ children: [
+ Expanded(
+ child: ListView(
+ children: [
+ CommonItem(leftTitel:TranslationLoader.lanKeys.prompTone.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.touchUnlock.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.pushNotification.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockUserManagement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.authorizedAdmin.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockGroup.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.transferSmartLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.transferGateway.tr, rightTitle:"", isHaveDirection: true, action: (){
+
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.multiLanguage.tr, rightTitle:"简体中文", isHaveLine: true, isHaveDirection: true, action: (){
+ Navigator.pushNamed(context, Routers.mineMultiLanguagePage);
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.lockScreen.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.hideInvalidUnlockPermissions.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.appUnlockRequiresMobilePhoneAccessToTheLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.valueAddedServices.tr, rightTitle:"", isHaveDirection: true, action: (){
+
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.about.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ SizedBox(height: 10.h,),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.userAgreement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.privacyPolicy.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.personalInformationCollectionList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.applicationPermissionDescription.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ CommonItem(leftTitel:TranslationLoader.lanKeys.thirdPartyInformationSharingList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
+
+ }),
+ ],
+ ),
+ ),
+ keyBottomWidget()
+ ],
+ )
+ );
+ }
+
+ Widget keyBottomWidget() {
+ return Column(
+ children: [
+ SubmitBtn(btnName: TranslationLoader.lanKeys.logout.tr,
+ borderRadius: 20.w,
+ fontSize: 32.sp,
+ margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
+ padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
+ onClick: () {
+
+ }
+ ),
+ Container(
+ padding: EdgeInsets.only(right: 30.w),
+ // color: Colors.red,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ TextButton(
+ child: Text( TranslationLoader.lanKeys.deleteAccount.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
+ onPressed: () {
+
+ },
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 30.h,)
+ ],
+ );
+ }
+
+ Switch _switch(){
+ return Switch(
+ value: false,
+ onChanged: (value){
+ // switchValue = !switchValue;
+ setState(() {
+
+ });
+ }
+ );
+ }
+}
diff --git a/star_lock/lib/mine/mine_page.dart b/star_lock/lib/mine/mine_page.dart
new file mode 100644
index 00000000..20691d1a
--- /dev/null
+++ b/star_lock/lib/mine/mine_page.dart
@@ -0,0 +1,130 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import '../appRouters.dart';
+import '../app_settings/app_colors.dart';
+import '../baseWidget.dart';
+import '../tools/titleAppBar.dart';
+import '../translations/trans_lib.dart';
+
+class StarLockMinePage extends StatefulWidget {
+ const StarLockMinePage({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockMinePageState();
+}
+
+GlobalKey<_StarLockMinePageState> starLockMineKey = GlobalKey();
+class _StarLockMinePageState extends State with BaseWidget{
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xFFFFFFFF),
+ // appBar: TitleAppBar(barTitle: "", haveBack:false, backgroundColor: AppColors.mainColor),
+ body: Column(
+ children: [
+ topWidget(),
+ bottomListWidget()
+ ],
+ ),
+ );
+ }
+
+ Widget topWidget(){
+ return Container(
+ height: 450.h,
+ width: 1.sw,
+ color: AppColors.mainColor,
+ // color: Colors.red,
+ child: Column(
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 120.h,),
+ GestureDetector(
+ onTap: (){
+ Navigator.pushNamed(context, Routers.starLockLoginPage);
+ },
+ child: Container(
+ width: 150.w, height: 150.w,
+ decoration: BoxDecoration(
+ border: Border.all(width: 2, color: Colors.white),
+ borderRadius: BorderRadius.circular(60.h),
+ ),
+ padding: EdgeInsets.all(20.w),
+ child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 100.w, height: 100.w)
+ ),
+ ),
+ SizedBox(height: 20.h,),
+ Text("15080825640", style: TextStyle(fontSize: 30.sp, color: Colors.white, fontWeight: FontWeight.w500)),
+ SizedBox(height: 10.h,),
+ Text("账号:15080825640", style: TextStyle(fontSize: 22.sp, color: Colors.white, fontWeight: FontWeight.w500)),
+ ],
+ ),
+ );
+ }
+
+ Widget bottomListWidget(){
+ return Expanded(
+ child: ListView(
+ padding: EdgeInsets.only(left: 110.w, top: 80.h, right: 10.w),
+ children: [
+ mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys.addLock.tr, (){
+ Navigator.pushNamed(context, Routers.seletLockTypePage);
+ }),
+ mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys.gateway.tr, (){
+
+ }),
+ mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys.message.tr, (){
+
+ }),
+ mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys.supportStaff.tr, (){
+
+ }),
+ mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys.set.tr, (){
+ Navigator.pushNamed(context, Routers.mineSetPage);
+ }),
+ mineItem('images/mine/icon_mine_main_moreServices.png', TranslationLoader.lanKeys.moreServices.tr, (){
+
+ }),
+ ],
+ ),
+ );
+ }
+
+ Widget mineItem(String lockTypeIcon, String lockTypeTitle, Function action){
+ return GestureDetector(
+ onTap: action,
+ child: Row(
+ children: [
+ Center(
+ child: Container(
+ height: 80.h,
+ width: 300.w,
+ color: Colors.white,
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
+ SizedBox(width:10.w),
+ Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
+ ],
+ ),
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,)
+ ],
+ ),
+ );
+ }
+
+ void onShow(){
+
+ }
+
+ void onHide(){
+
+ }
+}
+
diff --git a/star_lock/lib/navPages.dart b/star_lock/lib/navPages.dart
new file mode 100644
index 00000000..4a3477f2
--- /dev/null
+++ b/star_lock/lib/navPages.dart
@@ -0,0 +1,83 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:star_lock/mine/mine_page.dart';
+
+import 'app_settings/app_colors.dart';
+import 'main/lockMian/lockMain_page.dart';
+
+class NavPages extends StatefulWidget {
+ const NavPages({Key key}) : super(key: key);
+
+ @override
+ State createState() => _NavPagesState();
+}
+
+class _NavPagesState extends State {
+ int _currentIndex = 0;
+ final List _listPage = [
+ StarLockMain(),
+ // StarLockMinePage(key: starLockMineKey),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ var sp;
+ return Scaffold(
+ body: IndexedStack(
+ /// 在这里修改
+ // index: _currentIndex,
+ children: _listPage,
+ ),
+ // bottomNavigationBar: BottomNavigationBar(
+ // elevation: 0.0,
+ // selectedFontSize: 24.sp,
+ // unselectedFontSize: 24.sp,
+ // type: BottomNavigationBarType.fixed,
+ // selectedItemColor: AppColors.mainColor,
+ // backgroundColor: Colors.white,
+ // currentIndex: _currentIndex, //对应点击/显示哪个底部导航栏按钮
+ // onTap: (index) {
+ // //bottomNavigationBar的点击事件
+ // if (_currentIndex == index) {
+ // return;
+ // }
+ // setState(() {
+ // _currentIndex = index; //将选中的下标进行替换
+ // });
+ // if (_currentIndex == 0) {
+ // starLockMainKey.currentState?.onShow();
+ // starLockMineKey.currentState?.onHide();
+ // } else if (_currentIndex == 1) {
+ // starLockMainKey.currentState?.onHide();
+ // starLockMineKey.currentState?.onShow();
+ // }
+ // },
+ // items: [
+ // BottomNavigationBarItem(
+ // icon: SizedBox(
+ // width: 56.w,
+ // height: 56.w,
+ // child: Image.asset(
+ // _currentIndex == 0
+ // ? 'images/tabbar/icon_tab_main_selet.png'
+ // : 'images/tabbar/icon_tab_main_unselet.png',
+ // fit: BoxFit.cover),
+ // ),
+ // label: '首页'),
+ // BottomNavigationBarItem(
+ // icon: SizedBox(
+ // width: 56.w,
+ // height: 56.w,
+ // child: Image.asset(
+ // _currentIndex == 1
+ // ? 'images/tabbar/icon_tab_my_selet.png'
+ // : 'images/tabbar/icon_tab_my_unselet.png',
+ // fit: BoxFit.cover),
+ // ),
+ // label: '我的'),
+ // ],
+ // ),
+ );
+ }
+}
diff --git a/star_lock/lib/starLockApplication.dart b/star_lock/lib/starLockApplication.dart
new file mode 100644
index 00000000..200b87ac
--- /dev/null
+++ b/star_lock/lib/starLockApplication.dart
@@ -0,0 +1,20 @@
+
+import 'package:flutter/material.dart';
+
+import 'navPages.dart';
+
+class StarLockApplication extends StatefulWidget {
+ const StarLockApplication({Key key}) : super(key: key);
+
+ @override
+ State createState() => _StarLockApplicationState();
+}
+
+class _StarLockApplicationState extends State {
+
+
+ @override
+ Widget build(BuildContext context) {
+ return NavPages();
+ }
+}
diff --git a/star_lock/lib/tools/CustomUnderlineTabIndicator.dart b/star_lock/lib/tools/CustomUnderlineTabIndicator.dart
new file mode 100644
index 00000000..aa0fa653
--- /dev/null
+++ b/star_lock/lib/tools/CustomUnderlineTabIndicator.dart
@@ -0,0 +1,92 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+
+// ------------------------------------------------------
+// author:AllenSu
+// date :2021/4/18 11:23 AM
+// usage :自定义 UnderlineTabIndicator
+// CSDN :https://blog.csdn.net/qq_42351033
+// ------------------------------------------------------
+
+class CustomUnderlineTabIndicator extends Decoration {
+ final BorderSide borderSide;
+ final EdgeInsetsGeometry insets;
+ final StrokeCap strokeCap; // 控制器的边角形状
+ final double width; // 控制器的宽度
+
+ const CustomUnderlineTabIndicator({
+ this.borderSide = const BorderSide(width: 2, color: Colors.white),
+ this.insets = EdgeInsets.zero,
+ this.strokeCap: StrokeCap.square,
+ this.width: 20,
+ }) : assert(borderSide != null),
+ assert(insets != null);
+
+ @override
+ Decoration lerpFrom(Decoration a, double t) {
+ if (a is CustomUnderlineTabIndicator) {
+ return CustomUnderlineTabIndicator(
+ borderSide: BorderSide.lerp(a.borderSide, borderSide, t),
+ insets: EdgeInsetsGeometry.lerp(a.insets, insets, t),
+ );
+ }
+ return super.lerpFrom(a, t);
+ }
+
+ @override
+ Decoration lerpTo(Decoration b, double t) {
+ if (b is CustomUnderlineTabIndicator) {
+ return CustomUnderlineTabIndicator(
+ borderSide: BorderSide.lerp(borderSide, b.borderSide, t),
+ insets: EdgeInsetsGeometry.lerp(insets, b.insets, t),
+ );
+ }
+ return super.lerpTo(b, t);
+ }
+
+ @override
+ _UnderlinePainter createBoxPainter([VoidCallback onChanged]) {
+ return _UnderlinePainter(this, onChanged);
+ }
+
+ @override
+ Path getClipPath(Rect rect, TextDirection textDirection) {
+ return Path()..addRect(_indicatorRectFor(rect, textDirection));
+ }
+
+ Rect _indicatorRectFor(Rect rect, TextDirection textDirection) {
+ assert(rect != null);
+ assert(textDirection != null);
+ final Rect indicator = insets.resolve(textDirection).deflateRect(rect);
+
+ // 希望的宽度
+ double wantWidth = this.width;
+ // 取中间坐标
+ double cw = (indicator.left + indicator.right) / 2;
+ // 这里是核心代码
+ return Rect.fromLTWH(cw - wantWidth / 2,
+ indicator.bottom - borderSide.width, wantWidth, borderSide.width);
+ }
+}
+
+class _UnderlinePainter extends BoxPainter {
+ _UnderlinePainter(this.decoration, VoidCallback onChanged)
+ : assert(decoration != null),
+ super(onChanged);
+
+ final CustomUnderlineTabIndicator decoration;
+
+ @override
+ void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
+ assert(configuration != null);
+ assert(configuration.size != null);
+ final Rect rect = offset & configuration.size;
+ final TextDirection textDirection = configuration.textDirection;
+ final Rect indicator = decoration
+ ._indicatorRectFor(rect, textDirection)
+ .deflate(decoration.borderSide.width / 2);
+ final Paint paint = decoration.borderSide.toPaint()
+ ..strokeCap = decoration.strokeCap; // 这里修改控制器边角的形状
+ canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint);
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/tools/app_manager.dart b/star_lock/lib/tools/app_manager.dart
new file mode 100644
index 00000000..7a5474a0
--- /dev/null
+++ b/star_lock/lib/tools/app_manager.dart
@@ -0,0 +1,45 @@
+
+import 'package:package_info_plus/package_info_plus.dart';
+
+class AppManager {
+
+ String appName = '';
+ String packageName = '';
+ String version = '';
+ String buildNumber = '';
+ String platformName = '';
+ String get showVersion =>'$version.$buildNumber';
+
+ static AppManager _manager;
+ AppManager._init();
+
+ static AppManager shareManager(){
+ _manager ??= AppManager._init();
+ return _manager;
+ }
+
+ factory AppManager() => shareManager();
+ AppManager get manager => shareManager();
+
+ //当前应用的语言
+ String _languageCode = 'en-US';
+ void setLanCode({String code})=>_languageCode = code;
+ String get languageCode => _languageCode;
+
+ //设备唯一标识
+ String _deviceID = '';
+ void saveDeviceID(String id){
+ _deviceID = id;
+ }
+
+ Future initPackageInfo() async {
+ PackageInfo packageInfo = await PackageInfo.fromPlatform();
+ AppManager().appName = packageInfo.appName;
+ AppManager().packageName = packageInfo.packageName;
+ AppManager().version = packageInfo.version;
+ AppManager().buildNumber = packageInfo.buildNumber;
+ }
+
+ String get deviceId =>_deviceID;
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/tools/commonItem.dart b/star_lock/lib/tools/commonItem.dart
new file mode 100644
index 00000000..f0285f84
--- /dev/null
+++ b/star_lock/lib/tools/commonItem.dart
@@ -0,0 +1,50 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+class CommonItem extends StatelessWidget {
+ String leftTitel;
+ String rightTitle;
+ bool isHaveDirection;
+ bool isHaveLine;
+ bool isHaveRightWidget;
+ Widget rightWidget;
+ Function action;
+ double allHeight;
+
+ CommonItem({Key key,@required this.leftTitel, this.rightTitle, this.allHeight, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: action,
+ child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ height: allHeight??70.h,
+ color: Colors.white,
+ padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
+ child: Row(
+ children: [
+ SizedBox(width:20.w),
+ Expanded(child: Text(leftTitel, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
+ SizedBox(width:20.w),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
+ ],
+ ),
+ SizedBox(width:5.w),
+ isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
+ // SizedBox(width:10.w),
+ ],
+ ),
+ ),
+ isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/tools/device_info_service.dart b/star_lock/lib/tools/device_info_service.dart
new file mode 100644
index 00000000..0ceaafdb
--- /dev/null
+++ b/star_lock/lib/tools/device_info_service.dart
@@ -0,0 +1,42 @@
+
+import 'dart:io';
+import 'package:device_info_plus/device_info_plus.dart';
+import 'package:get/get.dart';
+import '../../app_settings/app_settings.dart';
+import 'app_manager.dart';
+import 'store_service.dart';
+import 'package:uuid/uuid.dart';
+
+class DeviceInfoService extends GetxService {
+ static DeviceInfoService get to => Get.find();
+
+ String _deviceID = '';
+ String get deviceID => _deviceID;
+
+ Future init() async {
+ DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
+ var dId = StoreService.to.getDeviceId();
+ if(dId.isEmpty){
+ dId = const Uuid().v1();
+ print('初始化设备ID:$dId');
+ StoreService.to.saveDeviceId(dId);
+ }
+ _deviceID = dId;
+
+ if(Platform.isAndroid){
+ AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
+ AppPlatform.setBrandString(androidInfo.brand);
+ AndroidBuildVersion buildVersion = androidInfo.version;
+ AppPlatform.setSDKInt(buildVersion.sdkInt);
+ }
+
+ if(Platform.isIOS){
+ IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
+ }
+ AppManager().saveDeviceID(deviceID);
+ print(AppManager().deviceId);
+ return this;
+ }
+
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/tools/forgetPwdInput.dart b/star_lock/lib/tools/forgetPwdInput.dart
new file mode 100644
index 00000000..928f5df4
--- /dev/null
+++ b/star_lock/lib/tools/forgetPwdInput.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+class ForgetPwdInput extends StatelessWidget {
+ TextEditingController controller;
+ List inputFormatters;
+ TextInputType keyboardType;
+ String hintText;
+ String label;
+ Widget rightSlot;
+ bool isPwd;
+ ForgetPwdInput({Key key,this.rightSlot,this.isPwd,this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ child: Row(
+ children: [
+ SizedBox(width: 90.w, height: 40.w,),
+ Expanded(
+ child: TextField(
+ //输入框一行
+ maxLines: 1,
+ // controller: _controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ hintText: hintText,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ rightSlot??const SizedBox(width: 0,height: 0)
+ ],
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,),
+ ],
+ );
+ }
+}
diff --git a/star_lock/lib/tools/jh_pop_menus.dart b/star_lock/lib/tools/jh_pop_menus.dart
new file mode 100644
index 00000000..42f6fab7
--- /dev/null
+++ b/star_lock/lib/tools/jh_pop_menus.dart
@@ -0,0 +1,220 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'screen_utils.dart';
+
+List _listData = [
+ {'text': '读取记录'},
+ {'text': '清空记录'},
+ {'text': '导出记录'},
+];
+
+const Color _bgColor = Color(0xFF2D2D2D);
+const double _fontSize = 16.0;
+const double _cellHeight = 50.0;
+const double _imgWH = 22.0;
+
+class JhPopMenus {
+ /// 显示pop
+ static void show(
+ BuildContext context, {
+ Function(int selectIndex, String selectText) clickCallback,
+ }) {
+ // Cell
+ Widget buildMenuCell(dataArr) {
+ return ListView.builder(
+ itemCount: dataArr.length,
+ itemExtent: _cellHeight,
+ padding: const EdgeInsets.all(0.0),
+ physics: const NeverScrollableScrollPhysics(),
+ itemBuilder: (BuildContext context, int index) {
+ return Material(
+ color: _bgColor,
+ child: InkWell(
+ onTap: () {
+ clickCallback?.call(index, _listData[index]['text']);
+ Navigator.pop(context);
+ },
+ child: Row(
+ children: [
+ const SizedBox(width: 25),
+ // Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white),
+ // const SizedBox(width: 15),
+ Text("你好", style: const TextStyle(color: Colors.white, fontSize: _fontSize)),
+ ],
+ ),
+ ),
+ );
+ },
+ );
+ }
+
+ Widget menusView(dataArr) {
+ var cellH = dataArr.length * _cellHeight;
+ var navH = JhScreenUtils.navigationBarHeight;
+ return Positioned(
+ right: 10,
+ top: navH - 10,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5),
+ ClipRRect(
+ borderRadius: BorderRadius.circular(5),
+ child: Container(color: _bgColor, width: 160, height: cellH, child: buildMenuCell(dataArr)),
+ )
+ ],
+ ),
+ );
+ }
+
+ Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
+ }
+
+ /// 显示带线带背景 pop
+ static void showLinePop(BuildContext context, {bool isShowBg = false, Function(int selectIndex, String selectText) clickCallback,}) {
+ // 带线
+ Widget buildMenuLineCell(dataArr) {
+ return ListView.separated(
+ itemCount: dataArr.length,
+ padding: const EdgeInsets.all(0.0),
+ physics: const NeverScrollableScrollPhysics(),
+ itemBuilder: (BuildContext context, int index) {
+ return Material(
+ color: _bgColor,
+ child: InkWell(
+ onTap: () {
+ clickCallback?.call(index, _listData[index]['text']);
+ Navigator.pop(context);
+ },
+ child: Container(
+ height: _cellHeight,
+ padding: EdgeInsets.only(left: 20.h),
+ child: Row(
+ children: [
+ // const SizedBox(width: 25),
+ // Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white),
+ // const SizedBox(width: 12),
+ Center(child: Text(dataArr[index]['text'], style: const TextStyle(color: Colors.white, fontSize: _fontSize)))
+ ],
+ ),
+ ),
+ ),
+ );
+ },
+ separatorBuilder: (context, index) =>
+ const Divider(height: .1, indent: 50, endIndent: 0, color: Color(0xFFE6E6E6)),
+ );
+ }
+
+ Widget menusView(dataArr) {
+ var cellH = dataArr.length * _cellHeight;
+ var navH = JhScreenUtils.navigationBarHeight;
+ if (isShowBg == true) {
+ navH = navH - JhScreenUtils.topSafeHeight;
+ } else {
+ navH = navH - 10;
+ }
+ return Positioned(
+ right: 10,
+ top: navH,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5),
+ ClipRRect(
+ borderRadius: BorderRadius.circular(5),
+ child: Container(color: _bgColor, width: 180.w, height: cellH, child: buildMenuLineCell(dataArr)))
+ ],
+ ),
+ );
+ }
+
+ if (isShowBg == true) {
+ // 带背景
+ showDialog(
+ context: context,
+ barrierDismissible: false,
+ builder: (context) {
+ return _BasePopMenus(child: menusView(_listData));
+ },
+ );
+ } else {
+ Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
+ }
+ }
+}
+
+class _BasePopMenus extends Dialog {
+ final child;
+
+ const _BasePopMenus({
+ Key key,
+ this.child,
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Material(
+ type: MaterialType.transparency,
+ child: Stack(
+ fit: StackFit.expand,
+ children: [
+ GestureDetector(onTap: () => Navigator.pop(context)),
+ // 内容
+ child ?? Container()
+ ],
+ ),
+ );
+ }
+}
+
+class DialogRouter extends PageRouteBuilder {
+ final Widget page;
+
+ DialogRouter(this.page)
+ : super(
+ opaque: false,
+ // 自定义遮罩颜色
+ barrierColor: Colors.white10.withAlpha(1),
+ transitionDuration: const Duration(milliseconds: 150),
+ pageBuilder: (context, animation, secondaryAnimation) => page,
+ transitionsBuilder: (context, animation, secondaryAnimation, child) => child,
+ );
+}
+
+class CustomDialog extends Dialog {
+ final bool clickBgHidden;
+ final child;
+
+ const CustomDialog({
+ Key key,
+ this.child,
+ this.clickBgHidden = false, // 点击背景隐藏,默认不隐藏
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Material(
+ // 透明层
+ type: MaterialType.transparency,
+ child: Stack(
+ children: [
+ InkWell(
+ onTap: () {
+ if (clickBgHidden == true) {
+ Navigator.pop(context);
+ }
+ },
+ child: SizedBox(
+ width: MediaQuery.of(context).size.width,
+ height: MediaQuery.of(context).size.height,
+ ),
+ ),
+ // 内容
+ Center(child: child)
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/tools/loginInput.dart b/star_lock/lib/tools/loginInput.dart
new file mode 100644
index 00000000..9c6a39fd
--- /dev/null
+++ b/star_lock/lib/tools/loginInput.dart
@@ -0,0 +1,56 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+/*
+* 登录注册页面 input
+* */
+
+class LoginInput extends StatelessWidget {
+
+ TextEditingController controller;
+ List inputFormatters;
+ TextInputType keyboardType;
+ Color background;
+ String hintText;
+ String leftImg;
+ String label;
+ bool isPwd;
+ Widget rightSlot;
+ LoginInput({Key key, @required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.leftImg}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ // color: Colors.red,
+ // width: 1.sp,
+ // height: 200.h,
+ child: Column(
+ children: [
+ TextField(
+ //输入框一行
+ maxLines: 1,
+ controller: controller,
+ autofocus: false,
+ decoration: InputDecoration(
+ //输入里面输入文字内边距设置
+ contentPadding: const EdgeInsets.only(
+ top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
+ labelText: label,
+ hintText: hintText,
+ //不需要输入框下划线
+ border: InputBorder.none,
+ //左边图标设置
+ icon: (leftImg.isNotEmpty)?Padding(
+ padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w),
+ child: Image.asset(leftImg, width: 40.w, height: 40.w,),
+ ):SizedBox(width: 65.w, height: 40.w,),
+ ),
+ ),
+ Container(height: 0.5.h, color: Colors.grey,),
+ ],
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/tools/noData.dart b/star_lock/lib/tools/noData.dart
new file mode 100644
index 00000000..377d0d00
--- /dev/null
+++ b/star_lock/lib/tools/noData.dart
@@ -0,0 +1,17 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+class NoData extends StatelessWidget {
+ const NoData({Key key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return SizedBox(
+ width: 1.sw,
+ height: 1.sh - ScreenUtil().statusBarHeight,
+ child: Center(
+ child: Image.asset('images/noData.png',width: 300.w,height: 240.w),
+ ),
+ );
+ }
+}
diff --git a/star_lock/lib/tools/platform_info_services.dart b/star_lock/lib/tools/platform_info_services.dart
new file mode 100644
index 00000000..c01304fd
--- /dev/null
+++ b/star_lock/lib/tools/platform_info_services.dart
@@ -0,0 +1,14 @@
+
+import 'package:get/get.dart';
+import 'package:package_info_plus/package_info_plus.dart';
+
+class PlatformInfoService extends GetxService {
+ static PlatformInfoService get to => Get.find();
+ PackageInfo _packageInfo;
+ PackageInfo get info => _packageInfo;
+ Future init() async {
+ PackageInfo packageInfo = await PackageInfo.fromPlatform();
+ _packageInfo = packageInfo;
+ return this;
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/tools/screen_utils.dart b/star_lock/lib/tools/screen_utils.dart
new file mode 100644
index 00000000..09061acc
--- /dev/null
+++ b/star_lock/lib/tools/screen_utils.dart
@@ -0,0 +1,140 @@
+/// screen_utils.dart
+///
+/// Created by iotjin on 2020/07/04.
+/// description: 屏幕信息
+
+import 'dart:ui' as ui show window;
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+class JhScreenUtils {
+ static init(BuildContext context) {
+ // 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334)
+ ScreenUtil.init(context, designSize: const Size(750, 1334));
+ }
+
+ static setWidth(double width) {
+ ScreenUtil().setWidth(width);
+ }
+
+ static setHeight(double height) {
+ ScreenUtil().setHeight(height);
+ }
+
+ static setSp(num fontSize) {
+ ScreenUtil().setSp(fontSize);
+ }
+
+ // static double get screenWidth => ScreenUtil.screenWidth;
+ //
+ // static double get screenHeight => ScreenUtil.screenHeight;
+
+ // static double get screenWidthPx => ScreenUtil.screenWidthPx;
+ //
+ // static double get screenHeightPx => ScreenUtil.screenHeightPx;
+ //
+ // static double get statusBarHeight => ScreenUtil.statusBarHeight;
+ //
+ // static double get bottomBarHeight => ScreenUtil.bottomBarHeight;
+
+ // 系统方法获取
+
+ static double get screenWidth {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.size.width;
+ }
+
+ static double get screenHeight {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.size.height;
+ }
+
+ static double get scale {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.devicePixelRatio;
+ }
+
+ static double get textScaleFactor {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.textScaleFactor;
+ }
+
+ static double get navigationBarHeight {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.padding.top + kToolbarHeight;
+ }
+
+ static double get topSafeHeight {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.padding.top;
+ }
+
+ static double get bottomSafeHeight {
+ MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
+ return mediaQuery.padding.bottom;
+ }
+
+ static updateStatusBarStyle(SystemUiOverlayStyle style) {
+ SystemChrome.setSystemUIOverlayStyle(style);
+ }
+}
+
+/*
+
+ScreenUtil.pixelRatio // 设备的像素密度
+ScreenUtil.screenWidth // 设备宽度
+ScreenUtil.screenHeight // 设备高度
+ScreenUtil.bottomBarHeight // 底部安全区距离,适用于全面屏下面有按键的
+ScreenUtil.statusBarHeight // 状态栏高度 刘海屏会更高 单位px
+ScreenUtil.textScaleFactory // 系统字体缩放比例
+
+ScreenUtil.getInstance().scaleWidth // 实际宽度的dp与设计稿px的比例
+ScreenUtil.getInstance().scaleHeight // 实际高度的dp与设计稿px的比例
+
+
+width:ScreenUtil().setWidth(100)
+height:ScreenUtil().setHeight(80)
+
+Container(
+width: 50.w,
+height:200.h
+)
+
+fontSize: ScreenUtil().setSp(28)
+
+fontSize: ScreenUtil.getInstance().setSp(24),
+fontSize: ScreenUtil(allowFontScaling: true).setSp(24),
+
+
+print('设备宽度:${ScreenUtil.screenWidth}'); //Device width
+print('设备高度:${ScreenUtil.screenHeight}'); //Device height
+print('设备的像素密度:${ScreenUtil.pixelRatio}'); //Device pixel density
+print('底部安全区距离:${ScreenUtil.bottomBarHeight}'); //Bottom safe zone distance,suitable for buttons with full screen
+print('状态栏高度:${ScreenUtil.statusBarHeight}px');
+print('实际宽度的dp与设计稿px的比例:${ScreenUtil.getInstance().scaleWidth}');
+print('实际高度的dp与设计稿px的比例:${ScreenUtil.getInstance().scaleHeight}');
+print( '宽度和字体相对于设计稿放大的比例:${ScreenUtil.getInstance().scaleWidth * ScreenUtil.pixelRatio}');
+print( '高度相对于设计稿放大的比例:${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}');
+print('系统的字体缩放比例:${ScreenUtil.textScaleFactor}');
+
+*/
+
+/*
+ 屏幕宽度高度:MediaQuery.of(context).size.width
+ 屏幕宽度高度:MediaQuery.of(context).size.height
+ 屏幕状态栏高度:MediaQueryData.fromWindow(WidgetBinding.instance.window).padding.top。
+
+ MediaQueryData mq = MediaQuery.of(context);
+ // 屏幕密度
+ pixelRatio = mq.devicePixelRatio;
+ // 屏幕宽(注意是dp, 转换px 需要 screenWidth * pixelRatio)
+ screenWidth = mq.size.width;
+ // 屏幕高(注意是dp)
+ screenHeight = mq.size.height;
+ // 顶部状态栏, 随着刘海屏会增高
+ statusBarHeight = mq padding.top;
+ // 底部功能栏, 类似于iPhone XR 底部安全区域
+ bottomBarHeight = mq.padding.bottom;
+
+*/
diff --git a/star_lock/lib/tools/showBottomSheetTool.dart b/star_lock/lib/tools/showBottomSheetTool.dart
new file mode 100644
index 00000000..186492e4
--- /dev/null
+++ b/star_lock/lib/tools/showBottomSheetTool.dart
@@ -0,0 +1,107 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_picker/flutter_picker.dart';
+
+///2023/7/17
+///底部弹出选择器工具类
+typedef StringClickCallback = void Function(int selectIndex, Object selectStr);
+typedef ArrayClickCallback = void Function(List selecteds, List strData);
+typedef DateClickCallback = void Function(dynamic selectDateStr, dynamic selectDate);
+
+class ShowBottomSheetTool {
+ //选择器的高度
+ double pickerHeight;
+ //单行的高度
+ double itemHeight;
+ //按钮颜色
+ Color btnColor;
+ //文本颜色
+ Color titleColor;
+ //字体大小
+ double textFontSize;
+
+ ShowBottomSheetTool(
+ {this.pickerHeight = 200.0,
+ this.itemHeight = 45.0,
+ this.btnColor = Colors.black,
+ this.titleColor = const Color.fromRGBO(127, 127, 127, 1.0),
+ this.textFontSize = 16.0});
+
+ ///单列
+ void showSingleRowPicker(
+ BuildContext context, {
+ @required List data,
+ String title,
+ String cancelTitle,
+ String sureTitle,
+ int normalIndex,
+ PickerDataAdapter adapter,
+ @required StringClickCallback clickCallBack,
+ }) {
+ openPicker(context,
+ title: title,
+ cancelTitle: cancelTitle,
+ sureTitle: sureTitle,
+ selecteds: [normalIndex ?? 0],
+ adapter: adapter ?? PickerDataAdapter(pickerData: data, isArray: false),
+ clickCallBack: (Picker picker, List selecteds) {
+ clickCallBack(selecteds[0], data[selecteds[0]]);
+ });
+ }
+
+ ///多列
+ void showArrayPicker(
+ BuildContext context, {
+ @required List data,
+ String title,
+ List normalIndex,
+ PickerDataAdapter adapter,
+ @required ArrayClickCallback clickCallBack,
+ }) {
+ openPicker(context,
+ selecteds: normalIndex,
+ title: title,
+ adapter: adapter ?? PickerDataAdapter(pickerData: data, isArray: true),
+ clickCallBack: (Picker picker, List selecteds) {
+ clickCallBack(selecteds, picker.getSelectedValues());
+ });
+ }
+
+ void openPicker(
+ BuildContext context, {
+ @required PickerAdapter adapter,
+ String title,
+ String cancelTitle,
+ String sureTitle,
+ List selecteds,
+ @required PickerConfirmCallback clickCallBack,
+ }) {
+ Picker(
+ adapter: adapter,
+ title: Text(
+ title ?? "请选择",
+ style: TextStyle(
+ color: titleColor,
+ fontSize: textFontSize,
+ ),
+ ),
+ selecteds: selecteds,
+ confirmText: sureTitle??'确定',
+ cancelText: cancelTitle??'取消',
+ cancelTextStyle: TextStyle(
+ color: btnColor,
+ fontSize: textFontSize,
+ ),
+ confirmTextStyle: TextStyle(
+ color: btnColor,
+ fontSize: textFontSize,
+ ),
+ textAlign: TextAlign.right,
+ itemExtent: itemHeight,
+ height: pickerHeight,
+ selectedTextStyle: TextStyle(
+ color: Colors.black,
+ ),
+ onConfirm: clickCallBack,
+ ).showModal(context);
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/tools/store_service.dart b/star_lock/lib/tools/store_service.dart
new file mode 100644
index 00000000..1fd46669
--- /dev/null
+++ b/star_lock/lib/tools/store_service.dart
@@ -0,0 +1,57 @@
+import 'package:get/get.dart';
+import 'package:get_storage/get_storage.dart';
+
+final box = GetStorage();
+class StoreService extends GetxService {
+
+ static StoreService get to => Get.find();
+ Future> init() async {
+ await GetStorage.init();
+ // await resetUserInfo();
+ return this;
+ }
+
+ Future save(String key, dynamic value) => box.write(key, value);
+ T read(String key) => box.read(key);
+ Future remove(String key) => box.remove(key);
+ bool hasData(String key) => box.hasData(key);
+
+
+ final String _loginUserInfoKey = 'LOGIN_USER_INFO';
+ final String _deviceUUID = 'DEVICE_ID';
+ final String _languageCode = 'LANGUAGE_CODE';
+ final String _userAccount = 'USER_ACCOUNT';
+
+
+ // LoginEntity _loginEntity;
+ // LoginEntity get loginEntity => _loginEntity;
+ // Future resetUserInfo() async{
+ // if(hasData(_loginUserInfoKey)){
+ // _loginEntity = LoginEntity.fromJson(box.read(_loginUserInfoKey));
+ // }
+ // }
+ // Future removeUserInfo() => remove(_loginUserInfoKey);
+ //
+ // Future saveLogInInfo(LoginEntity entity) {
+ // _loginEntity = LoginEntity.fromJson(entity.toJson());
+ // save(_loginUserInfoKey, entity.toJson());
+ // if(_loginEntity != null && _loginEntity.data != null && _loginEntity.data.email != null && _loginEntity.data.email.isNotEmpty) {
+ // save(_userAccount, _loginEntity.data.email);
+ // }
+ // }
+
+ String getDeviceId() => hasData(_deviceUUID) ? read(_deviceUUID): "";
+ Future saveDeviceId(String uuid) => save(_deviceUUID, uuid);
+
+ String getLanguageCode() => hasData(_languageCode) ? read(_languageCode): "";
+ Future saveLanguageCode(String code) => save(_languageCode, code);
+
+ // bool get hadToken => loginEntity != null && loginEntity.data.token != null && loginEntity.data.token.isNotEmpty;
+ // String get userToken => hadToken ? loginEntity.data.token : "";
+
+ String getLastUserAccount() => hasData(_userAccount) ? read(_userAccount): "";
+ void removeLastUserAccount() => remove(_userAccount);
+
+ String get localUserAccount => getLastUserAccount();
+
+}
diff --git a/star_lock/lib/tools/submitBtn.dart b/star_lock/lib/tools/submitBtn.dart
new file mode 100644
index 00000000..44d7fef3
--- /dev/null
+++ b/star_lock/lib/tools/submitBtn.dart
@@ -0,0 +1,71 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+import '../app_settings/app_colors.dart';
+
+
+/*
+* 提交按钮 公用组件
+* */
+
+class SubmitBtn extends StatelessWidget {
+
+ String btnName;
+
+ Function onClick;
+
+ EdgeInsetsGeometry margin;
+
+ EdgeInsetsGeometry padding;
+
+ double width;
+
+ double fontSize;
+
+ Color color;
+
+ List backgroundColorList;
+
+ double borderRadius;
+
+ SubmitBtn({Key key,@required this.btnName,this.borderRadius,this.color,this.padding,this.onClick,this.margin,this.width,this.backgroundColorList,this.fontSize}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ child: Container(
+ width: width??690.w,
+ padding: padding??EdgeInsets.only(
+ top: 20.w,
+ bottom: 20.w
+ ),
+ margin: margin??EdgeInsets.only(top: 30.w),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(borderRadius??30.w),
+ gradient: LinearGradient(
+ begin: Alignment.centerLeft,
+ end: Alignment.centerRight,
+ colors: backgroundColorList??[
+ AppColors.mainColor,AppColors.mainColor,
+ ],
+ )
+ ),
+ child: Center(
+ child: Text(btnName,style: TextStyle(
+ fontSize: fontSize??36.sp,
+ height: 1.3,
+ decoration: TextDecoration.none,
+ fontWeight: FontWeight.w500,
+ color: color??Colors.white
+ )),
+ ),
+ ),
+ onTap: (){
+ if(onClick!=null){
+ onClick();
+ }
+ },
+ );
+ }
+}
diff --git a/star_lock/lib/tools/titleAppBar.dart b/star_lock/lib/tools/titleAppBar.dart
new file mode 100644
index 00000000..9d5b302c
--- /dev/null
+++ b/star_lock/lib/tools/titleAppBar.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+
+class TitleAppBar extends AppBar {
+
+ @override
+ final Color backgroundColor;
+ final String barTitle;
+ final Color titleColor;
+ final Color iconColor;
+ final bool haveBack;
+ final bool haveOtherLeftWidget;
+ final Widget leftWidget;
+ List actionsList;
+
+ TitleAppBar({Key key,this.barTitle,this.titleColor,this.iconColor,this.backgroundColor,this.actionsList, this.haveBack, this.haveOtherLeftWidget = false , this.leftWidget}) : super(key: key);
+
+ @override
+ _TitleAppBarState createState() => _TitleAppBarState();
+
+}
+
+class _TitleAppBarState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return AppBar(
+ elevation: 0,
+ leading:widget.haveOtherLeftWidget?widget.leftWidget:(widget.haveBack?IconButton(
+ icon: Icon(Icons.arrow_back_ios,color: widget.iconColor??Colors.white),
+ onPressed: () => Navigator.of(context).pop(),
+ ):Container()),
+ backgroundColor: widget.backgroundColor??Colors.white,
+ title: Text(widget.barTitle??'', style: TextStyle(color: widget.titleColor??Colors.white,fontSize: 36.sp, fontWeight:FontWeight.w500)),
+ centerTitle: true,
+ actions: widget.actionsList??[]
+ );
+ }
+}
diff --git a/star_lock/lib/translations/app_dept.dart b/star_lock/lib/translations/app_dept.dart
new file mode 100644
index 00000000..638defd5
--- /dev/null
+++ b/star_lock/lib/translations/app_dept.dart
@@ -0,0 +1,79 @@
+
+import 'dart:convert';
+import 'dart:ui';
+import 'package:flutter/services.dart';
+import 'package:get/get.dart';
+import 'package:star_lock/translations/trans_lib.dart';
+
+import '../tools/app_manager.dart';
+
+enum AppDept {
+ cdl,
+}
+
+extension ExtensionAppDept on AppDept {
+
+ static AppDept fromAppPackageName(String packageName) {
+ AppDept dept = AppDept.cdl;
+ packageName = packageName.toLowerCase();
+ if(packageName.contains('cdl')){
+ dept = AppDept.cdl;
+ }
+ return dept;
+ }
+
+ List get deptSupportedLocales {
+ Locale enL = const Locale('en', 'US');
+ Locale zhL = const Locale('zh', 'CN');
+
+ return [enL,zhL];
+ }
+
+}
+
+AppDept appDept = ExtensionAppDept.fromAppPackageName(AppManager().packageName);
+
+final List appSupportedLocales = appDept.deptSupportedLocales;
+
+enum LanguageType {
+ chinese,
+ english,
+ deutsch, // 德语
+ francais, // 法语
+ italiano, // 意大利
+ dutch, // 荷兰语
+ spanish, // 西班牙
+ czech, // 捷克语
+ slovak // 斯洛伐克语
+}
+
+extension ExtensionLanguageType on LanguageType {
+ String get lanTitle {
+ var str = '';
+ switch(this){
+ case LanguageType.english:
+ str = TranslationLoader.lanKeys.lanEnglish.tr;
+ break;
+ case LanguageType.chinese:
+ str = TranslationLoader.lanKeys.lanChinese.tr;
+ break;
+
+ }
+ return str;
+ }
+
+ static LanguageType fromLanguageCode(String code) {
+ LanguageType languageType = LanguageType.english;
+ switch(code.toLowerCase()){
+ case 'en':
+ languageType = LanguageType.english;
+ break;
+ case 'zh':
+ languageType = LanguageType.chinese;
+ break;
+
+ }
+ return languageType;
+ }
+
+}
\ No newline at end of file
diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart
new file mode 100644
index 00000000..c161a23b
--- /dev/null
+++ b/star_lock/lib/translations/lanKeyEntity.dart
@@ -0,0 +1,833 @@
+class LanKeyEntity {
+ LanKeyEntity({
+ this.starLock,
+ this.clickUnlockAndHoldDownClose,
+ this.checkingIn,
+ this.electronicKey,
+ this.password,
+ this.card,
+ this.fingerprint,
+ this.remoteControl,
+ this.operatingRecord,
+ this.number,
+ this.additive,
+ this.addTime,
+
+ this.reset,
+ this.sendKey,
+ this.timeLimit,
+ this.permanent,
+ this.once,
+ this.circulation,
+ this.receiver,
+ this.pleaseEnterNumberOrEmail,
+ this.name,
+ this.enterYourName,
+ this.effectiveTime,
+ this.failureTime,
+ this.effectiveDate,
+ this.failureDate,
+ this.Monday,
+ this.Tuesday,
+ this.Wednesday,
+ this.Thursday,
+ this.Friday,
+ this.Saturday,
+ this.Sunday,
+
+ this.realNameAuthentication,
+ this.sendKeyBottomTip,
+ this.send,
+ this.periodValidity,
+ this.sendGroupKey,
+ this.lock,
+ this.pleaseAdd,
+ this.pleaseSelet,
+ this.remoteUnlockingAllowed,
+ this.pleaseEnter,
+ this.getPassword,
+ this.custom,
+ this.clearAll,
+ this.recursiveDevice,
+ this.pleaseNameYourPassword,
+ this.pleaseEnterDigitsNumber,
+ this.getPasswordTip1,
+ this.getPasswordTip2,
+ this.getPasswordTip3,
+ this.getPasswordTip4,
+ this.getPasswordTip5,
+ this.getPasswordTip6,
+ this.getTip,
+ this.addTip,
+ this.sender,
+ this.senderTime,
+ this.keyDetail,
+ this.detail,
+ this.delete,
+ this.passwordDetail,
+ this.share,
+ this.amend,
+ this.sure,
+ this.cancel,
+ this.add,
+ this.accountNumber,
+ this.volumeAuthorizationLock,
+ this.authorizedAdminTip,
+ this.lockOperatingRecordTip,
+
+ this.basicInformation,
+ this.wirelessKeyboard,
+ this.doorMagnetic,
+ this.remoteUnlocking,
+ this.automaticBlocking,
+ this.normallyOpenMode,
+ this.lockSound,
+ this.burglarAlarm,
+ this.resetButton,
+ this.lockTime,
+ this.diagnose,
+ this.uploadData,
+ this.importOtherLockData,
+ this.lockEscalation,
+ this.markedHouseState,
+ this.unlockReminder,
+ this.unlockQRCode,
+ this.lockNumber,
+ this.electricQuantity,
+ this.lockName,
+ this.lockGrouping,
+ this.adminOpenLockPassword,
+ this.update,
+ this.updateElectricQuantityTip,
+ this.adminOpenLockPasswordTip,
+ this.updateLockAdminPassword,
+ this.whenScreenFlashesClickNext,
+ this.theScreenNeverFlickered,
+ this.enterNumberOrPressSet,
+ this.theLocationOfTheSetKeyWillBeDifferent,
+ this.pressAndHoldTheResetButtonTwoSeconds,
+ this.nearbyEquipment,
+ this.noData,
+ this.doorMagneticListTopTip,
+ this.remoteUnlockingPageTip,
+ this.currentMode,
+ this.delayTime,
+ this.automaticBlockingTip,
+ this.time,
+ this.normallyOpen,
+ this.date,
+ this.begin,
+ this.end,
+ this.allDay,
+ this.save,
+ this.normallyOpenModeTip,
+ this.pleaseSeletLockVolume,
+ this.lockSoundTip,
+ this.low,
+ this.lower,
+ this.medium,
+ this.high,
+ this.higher,
+ this.burglarAlarmTip,
+ this.resetButtonTip,
+ this.calibrationTime,
+ this.setTheDSTMode,
+ this.diagnoseTip,
+ this.uploading,
+ this.uploadDataTip,
+ this.importOtherLockDataTip,
+ this.haveNewVersion,
+ this.currentVersion,
+ this.newVersion,
+ this.upgrade,
+ this.leisure,
+ this.checkedIn,
+
+ this.lanEnglish,
+ this.lanChinese,
+ this.multilingual,
+ this.addLock,
+ this.gateway,
+ this.message,
+ this.supportStaff,
+ this.set,
+ this.moreServices,
+
+ this.moreSet,
+ this.prompTone,
+ this.touchUnlock,
+ this.pushNotification,
+ this.lockUserManagement,
+ this.authorizedAdmin,
+ this.lockGroup,
+ this.transferSmartLock,
+ this.transferGateway,
+
+ this.multiLanguage,
+ this.lockScreen,
+ this.closed,
+ this.opened,
+ this.hideInvalidUnlockPermissions,
+ this.appUnlockRequiresMobilePhoneAccessToTheLock,
+ this.valueAddedServices,
+ this.about,
+ this.userAgreement,
+ this.privacyPolicy,
+ this.personalInformationCollectionList,
+ this.applicationPermissionDescription,
+ this.thirdPartyInformationSharingList,
+ this.logout,
+ this.deleteAccount,
+
+ this.allLock,
+ this.searchAllLockType,
+ this.doorLock,
+ this.padlock,
+ this.safeLock,
+ this.intelligentLockCore,
+ this.parkingLock,
+ this.bicycleLock,
+ this.longRangeControl,
+ this.lightTouchScreen,
+ this.lightTouchScreenTip,
+ this.next,
+ this.nearbyLock,
+ this.addSuccessfullyPleaseRename,
+ this.whenAddingLockThePhoneMustBeNextToTheLock,
+
+ this.login,
+ this.register,
+ this.forgetPassword,
+ this.readAndAgree,
+ this.verificationCode,
+ this.registerPasswordTip,
+ this.iphone,
+ this.email,
+ this.countryAndRegion,
+ this.selet
+ });
+
+ LanKeyEntity.fromJson(dynamic json) {
+ starLock = json['starLock'];
+ clickUnlockAndHoldDownClose = json['clickUnlockAndHoldDownClose'];
+ checkingIn = json['checkingIn'];
+ electronicKey = json['electronicKey'];
+ password = json['password'];
+ card = json['card'];
+ fingerprint = json['fingerprint'];
+ remoteControl = json['remoteControl'];
+ operatingRecord = json['operatingRecord'];
+ number = json['number'];
+ additive = json['additive'];
+ addTime = json['addTime'];
+
+ reset = json['reset'];
+ sendKey = json['sendKey'];
+ timeLimit = json['timeLimit'];
+ permanent = json['permanent'];
+ once = json['once'];
+ circulation = json['circulation'];
+ receiver = json['receiver'];
+ pleaseEnterNumberOrEmail = json['pleaseEnterNumberOrEmail'];
+ name = json['name'];
+ enterYourName = json['enterYourName'];
+ effectiveTime = json['effectiveTime'];
+ failureTime = json['failureTime'];
+ effectiveDate = json['effectiveDate'];
+ failureDate = json['failureDate'];
+ Monday = json['Monday'];
+ Tuesday = json['Tuesday'];
+ Wednesday = json['Wednesday'];
+ Thursday = json['Thursday'];
+ Friday = json['Friday'];
+ Saturday = json['Saturday'];
+ Sunday = json['Sunday'];
+
+ realNameAuthentication = json['realNameAuthentication'];
+ sendKeyBottomTip = json['sendKeyBottomTip'];
+ send = json['send'];
+ periodValidity = json['periodValidity'];
+ sendGroupKey = json['sendGroupKey'];
+ lock = json['lock'];
+ pleaseAdd = json['pleaseAdd'];
+ pleaseSelet = json['pleaseSelet'];
+ remoteUnlockingAllowed = json['remoteUnlockingAllowed'];
+ pleaseEnter = json['pleaseEnter'];
+ getPassword = json['getPassword'];
+ custom = json['custom'];
+ clearAll = json['clearAll'];
+ recursiveDevice = json['recursiveDevice'];
+ pleaseNameYourPassword = json['pleaseNameYourPassword'];
+ pleaseEnterDigitsNumber = json['pleaseEnterDigitsNumber'];
+ getPasswordTip1 = json['getPasswordTip1'];
+ getPasswordTip2 = json['getPasswordTip2'];
+ getPasswordTip3 = json['getPasswordTip3'];
+ getPasswordTip4 = json['getPasswordTip4'];
+ getPasswordTip5 = json['getPasswordTip5'];
+ getPasswordTip6 = json['getPasswordTip6'];
+ getTip = json['getTip'];
+ addTip = json['addTip'];
+ sender = json['sender'];
+ senderTime = json['senderTime'];
+ keyDetail = json['keyDetail'];
+ detail = json['detail'];
+ delete = json['delete'];
+ passwordDetail = json['passwordDetail'];
+ share = json['share'];
+ amend = json['amend'];
+ sure = json['sure'];
+ cancel = json['cancel'];
+ add = json['add'];
+ accountNumber = json['accountNumber'];
+ volumeAuthorizationLock = json['volumeAuthorizationLock'];
+ authorizedAdminTip = json['authorizedAdminTip'];
+ lockOperatingRecordTip = json['lockOperatingRecordTip'];
+ remoteUnlockingPageTip = json['remoteUnlockingPageTip'];
+ currentMode = json['currentMode'];
+ delayTime = json['delayTime'];
+ automaticBlockingTip = json['automaticBlockingTip'];
+ time = json['time'];
+ normallyOpen = json['normallyOpen'];
+ date = json['date'];
+ begin = json['begin'];
+ end = json['end'];
+ allDay = json['allDay'];
+ save = json['save'];
+ normallyOpenModeTip = json['normallyOpenModeTip'];
+ pleaseSeletLockVolume = json['pleaseSeletLockVolume'];
+ lockSoundTip = json['lockSoundTip'];
+ low = json['low'];
+ lower = json['lower'];
+ medium = json['medium'];
+ high = json['high'];
+ higher = json['higher'];
+ burglarAlarmTip = json['burglarAlarmTip'];
+ resetButtonTip = json['resetButtonTip'];
+ calibrationTime = json['calibrationTime'];
+ setTheDSTMode = json['setTheDSTMode'];
+ diagnoseTip = json['diagnoseTip'];
+ uploading = json['uploading'];
+ uploadDataTip = json['uploadDataTip'];
+ importOtherLockDataTip = json['importOtherLockDataTip'];
+ haveNewVersion = json['haveNewVersion'];
+ currentVersion = json['currentVersion'];
+ newVersion = json['newVersion'];
+ upgrade = json['upgrade'];
+ leisure = json['leisure'];
+ checkedIn = json['checkedIn'];
+
+ basicInformation = json['basicInformation'];
+ wirelessKeyboard = json['wirelessKeyboard'];
+ doorMagnetic = json['doorMagnetic'];
+ remoteUnlocking = json['remoteUnlocking'];
+ automaticBlocking = json['automaticBlocking'];
+ normallyOpenMode = json['normallyOpenMode'];
+ lockSound = json['lockSound'];
+ burglarAlarm = json['burglarAlarm'];
+ resetButton = json['resetButton'];
+ lockTime = json['lockTime'];
+ diagnose = json['diagnose'];
+ uploadData = json['uploadData'];
+ importOtherLockData = json['importOtherLockData'];
+ lockEscalation = json['lockEscalation'];
+ markedHouseState = json['markedHouseState'];
+ unlockReminder = json['unlockReminder'];
+ unlockQRCode = json['unlockQRCode'];
+ lockNumber = json['lockNumber'];
+ electricQuantity = json['electricQuantity'];
+ lockName = json['lockName'];
+ lockGrouping = json['lockGrouping'];
+ adminOpenLockPassword = json['adminOpenLockPassword'];
+ update = json['update'];
+ updateElectricQuantityTip = json['updateElectricQuantityTip'];
+ adminOpenLockPasswordTip = json['adminOpenLockPasswordTip'];
+ updateLockAdminPassword = json['updateLockAdminPassword'];
+ whenScreenFlashesClickNext = json['whenScreenFlashesClickNext'];
+ theScreenNeverFlickered = json['theScreenNeverFlickered'];
+ enterNumberOrPressSet = json['enterNumberOrPressSet'];
+ theLocationOfTheSetKeyWillBeDifferent = json['theLocationOfTheSetKeyWillBeDifferent'];
+ pressAndHoldTheResetButtonTwoSeconds = json['pressAndHoldTheResetButtonTwoSeconds'];
+ nearbyEquipment = json['nearbyEquipment'];
+ noData = json['noData'];
+ doorMagneticListTopTip = json['doorMagneticListTopTip'];
+
+ lanEnglish = json['lanEnglish'];
+ lanChinese = json['lanChinese'];
+ multilingual = json['multilingual'];
+ addLock = json['addLock'];
+ gateway = json['gateway'];
+ message = json['message'];
+ supportStaff = json['supportStaff'];
+ set = json['set'];
+ moreServices = json['moreServices'];
+
+ moreSet = json['moreSet'];
+ prompTone = json['prompTone'];
+ touchUnlock = json['touchUnlock'];
+ pushNotification = json['pushNotification'];
+ lockUserManagement = json['lockUserManagement'];
+ authorizedAdmin = json['authorizedAdmin'];
+ lockGroup = json['lockGroup'];
+ transferSmartLock = json['transferSmartLock'];
+ transferGateway = json['transferGateway'];
+
+ multiLanguage = json['multiLanguage'];
+ lockScreen = json['lockScreen'];
+ closed = json['closed'];
+ opened = json['opened'];
+ hideInvalidUnlockPermissions = json['hideInvalidUnlockPermissions'];
+ appUnlockRequiresMobilePhoneAccessToTheLock = json['appUnlockRequiresMobilePhoneAccessToTheLock'];
+ valueAddedServices = json['valueAddedServices'];
+ about = json['about'];
+ userAgreement = json['userAgreement'];
+ privacyPolicy = json['privacyPolicy'];
+ personalInformationCollectionList = json['personalInformationCollectionList'];
+ applicationPermissionDescription = json['applicationPermissionDescription'];
+ thirdPartyInformationSharingList = json['thirdPartyInformationSharingList'];
+ logout = json['logout'];
+ deleteAccount = json['deleteAccount'];
+
+ allLock = json['allLock'];
+ searchAllLockType = json['searchAllLockType'];
+ doorLock = json['doorLock'];
+ padlock = json['padlock'];
+ safeLock = json['safeLock'];
+ intelligentLockCore = json['intelligentLockCore'];
+ parkingLock = json['parkingLock'];
+ bicycleLock = json['bicycleLock'];
+ longRangeControl = json['longRangeControl'];
+ lightTouchScreen = json['lightTouchScreen'];
+ lightTouchScreenTip = json['lightTouchScreenTip'];
+ next = json['next'];
+ nearbyLock = json['nearbyLock'];
+ addSuccessfullyPleaseRename = json['addSuccessfullyPleaseRename'];
+ whenAddingLockThePhoneMustBeNextToTheLock = json['whenAddingLockThePhoneMustBeNextToTheLock'];
+
+ login = json['login'];
+ register = json['register'];
+ forgetPassword = json['forgetPassword'];
+ readAndAgree = json['readAndAgree'];
+ verificationCode = json['verificationCode'];
+ registerPasswordTip = json['registerPasswordTip'];
+ iphone = json['iphone'];
+ email = json['email'];
+ countryAndRegion = json['countryAndRegion'];
+ selet = json['selet'];
+ }
+ String starLock;
+ String clickUnlockAndHoldDownClose;
+ String checkingIn;
+ String electronicKey;
+ String password;
+ String card;
+ String fingerprint;
+ String remoteControl;
+ String operatingRecord;
+ String number;
+ String additive;
+ String addTime;
+
+ String reset;
+ String sendKey;
+ String timeLimit;
+ String permanent;
+ String once;
+ String circulation;
+ String receiver;
+ String pleaseEnterNumberOrEmail;
+ String name;
+ String enterYourName;
+ String effectiveTime;
+ String failureTime;
+ String effectiveDate;
+ String failureDate;
+ String Monday;
+ String Tuesday;
+ String Wednesday;
+ String Thursday;
+ String Friday;
+ String Saturday;
+ String Sunday;
+
+ String realNameAuthentication;
+ String sendKeyBottomTip;
+ String send;
+ String periodValidity;
+ String sendGroupKey;
+ String lock;
+ String pleaseAdd;
+ String pleaseSelet;
+ String remoteUnlockingAllowed;
+ String pleaseEnter;
+ String getPassword;
+ String custom;
+ String clearAll;
+ String recursiveDevice;
+ String pleaseNameYourPassword;
+ String pleaseEnterDigitsNumber;
+ String getPasswordTip1;
+ String getPasswordTip2;
+ String getPasswordTip3;
+ String getPasswordTip4;
+ String getPasswordTip5;
+ String getPasswordTip6;
+ String getTip;
+ String addTip;
+ String sender;
+ String senderTime;
+ String keyDetail;
+ String detail;
+ String delete;
+ String passwordDetail;
+ String share;
+ String amend;
+ String sure;
+ String cancel;
+ String add;
+ String accountNumber;
+ String volumeAuthorizationLock;
+ String authorizedAdminTip;
+ String lockOperatingRecordTip;
+ String remoteUnlockingPageTip;
+ String currentMode;
+ String delayTime;
+ String automaticBlockingTip;
+ String time;
+ String normallyOpen;
+ String date;
+ String begin;
+ String end;
+ String allDay;
+ String save;
+ String normallyOpenModeTip;
+ String pleaseSeletLockVolume;
+ String lockSoundTip;
+ String low;
+ String lower;
+ String medium;
+ String high;
+ String higher;
+ String burglarAlarmTip;
+ String resetButtonTip;
+ String calibrationTime;
+ String setTheDSTMode;
+ String diagnoseTip;
+ String uploading;
+ String uploadDataTip;
+ String importOtherLockDataTip;
+ String haveNewVersion;
+ String currentVersion;
+ String newVersion;
+ String upgrade;
+ String leisure;
+ String checkedIn;
+
+ String basicInformation;
+ String wirelessKeyboard;
+ String doorMagnetic;
+ String remoteUnlocking;
+ String automaticBlocking;
+ String normallyOpenMode;
+ String lockSound;
+ String burglarAlarm;
+ String resetButton;
+ String lockTime;
+ String diagnose;
+ String uploadData;
+ String importOtherLockData;
+ String lockEscalation;
+ String markedHouseState;
+ String unlockReminder;
+ String unlockQRCode;
+ String lockNumber;
+ String electricQuantity;
+ String lockName;
+ String lockGrouping;
+ String adminOpenLockPassword;
+ String update;
+ String updateElectricQuantityTip;
+ String adminOpenLockPasswordTip;
+ String updateLockAdminPassword;
+ String whenScreenFlashesClickNext;
+ String theScreenNeverFlickered;
+ String enterNumberOrPressSet;
+ String theLocationOfTheSetKeyWillBeDifferent;
+ String pressAndHoldTheResetButtonTwoSeconds;
+ String nearbyEquipment;
+ String noData;
+ String doorMagneticListTopTip;
+
+ String lanEnglish;
+ String lanChinese;
+ String multilingual;
+ String addLock;
+ String gateway;
+ String message;
+ String supportStaff;
+ String set;
+ String moreServices;
+
+ String moreSet;
+ String prompTone;
+ String touchUnlock;
+ String pushNotification;
+ String lockUserManagement;
+ String authorizedAdmin;
+ String lockGroup;
+ String transferSmartLock;
+ String transferGateway;
+
+ String multiLanguage;
+ String lockScreen;
+ String closed;
+ String opened;
+ String hideInvalidUnlockPermissions;
+ String appUnlockRequiresMobilePhoneAccessToTheLock;
+ String valueAddedServices;
+ String about;
+ String userAgreement;
+ String privacyPolicy;
+ String personalInformationCollectionList;
+ String applicationPermissionDescription;
+ String thirdPartyInformationSharingList;
+ String logout;
+ String deleteAccount;
+
+ String allLock;
+ String searchAllLockType;
+ String doorLock;
+ String padlock;
+ String safeLock;
+ String intelligentLockCore;
+ String parkingLock;
+ String bicycleLock;
+ String longRangeControl;
+ String lightTouchScreen;
+ String lightTouchScreenTip;
+ String next;
+ String nearbyLock;
+ String addSuccessfullyPleaseRename;
+ String whenAddingLockThePhoneMustBeNextToTheLock;
+
+ String login;
+ String register;
+ String forgetPassword;
+ String readAndAgree;
+ String verificationCode;
+ String registerPasswordTip;
+ String iphone;
+ String email;
+ String countryAndRegion;
+ String selet;
+
+ Map toJson() {
+ final map = {};
+ map['starLock'] = starLock;
+ map['clickUnlockAndHoldDownClose'] = clickUnlockAndHoldDownClose;
+ map['checkingIn'] = checkingIn;
+ map['electronicKey'] = electronicKey;
+ map['password'] = password;
+ map['card'] = card;
+ map['fingerprint'] = fingerprint;
+ map['remoteControl'] = remoteControl;
+ map['operatingRecord'] = operatingRecord;
+ map['number'] = number;
+ map['additive'] = additive;
+ map['addTime'] = addTime;
+
+ map['reset'] = reset;
+ map['sendKey'] = sendKey;
+ map['timeLimit'] = timeLimit;
+ map['permanent'] = permanent;
+ map['once'] = once;
+ map['circulation'] = circulation;
+ map['receiver'] = receiver;
+ map['pleaseEnterNumberOrEmail'] = pleaseEnterNumberOrEmail;
+ map['name'] = name;
+ map['enterYourName'] = enterYourName;
+ map['effectiveTime'] = effectiveTime;
+ map['failureTime'] = failureTime;
+ map['effectiveDate'] = effectiveDate;
+ map['failureDate'] = failureDate;
+ map['Monday'] = Monday;
+ map['Tuesday'] = Tuesday;
+ map['Wednesday'] = Wednesday;
+ map['Thursday'] = Thursday;
+ map['Friday'] = Friday;
+ map['Saturday'] = Saturday;
+ map['Sunday'] = Sunday;
+
+ map['realNameAuthentication'] = realNameAuthentication;
+ map['sendKeyBottomTip'] = sendKeyBottomTip;
+ map['send'] = send;
+ map['periodValidity'] = periodValidity;
+ map['sendGroupKey'] = sendGroupKey;
+ map['lock'] = lock;
+ map['pleaseAdd'] = pleaseAdd;
+ map['pleaseSelet'] = pleaseSelet;
+ map['remoteUnlockingAllowed'] = remoteUnlockingAllowed;
+ map['pleaseEnter'] = pleaseEnter;
+ map['getPassword'] = getPassword;
+
+ map['custom'] = custom;
+ map['clearAll'] = clearAll;
+ map['recursiveDevice'] = recursiveDevice;
+ map['pleaseNameYourPassword'] = pleaseNameYourPassword;
+ map['pleaseEnterDigitsNumber'] = pleaseEnterDigitsNumber;
+ map['getPasswordTip1'] = getPasswordTip1;
+ map['getPasswordTip2'] = getPasswordTip2;
+ map['getPasswordTip3'] = getPasswordTip3;
+ map['getPasswordTip4'] = getPasswordTip4;
+ map['getPasswordTip5'] = getPasswordTip5;
+ map['getPasswordTip6'] = getPasswordTip6;
+ map['getTip'] = getTip;
+ map['addTip'] = addTip;
+ map['sender'] = sender;
+ map['senderTime'] = senderTime;
+ map['keyDetail'] = keyDetail;
+ map['detail'] = detail;
+ map['delete'] = delete;
+ map['passwordDetail'] = passwordDetail;
+ map['share'] = share;
+ map['amend'] = amend;
+ map['sure'] = sure;
+ map['cancel'] = cancel;
+ map['add'] = add;
+ map['accountNumber'] = accountNumber;
+ map['volumeAuthorizationLock'] = volumeAuthorizationLock;
+ map['authorizedAdminTip'] = authorizedAdminTip;
+ map['lockOperatingRecordTip'] = lockOperatingRecordTip;
+ map['remoteUnlockingPageTip'] = remoteUnlockingPageTip;
+ map['currentMode'] = currentMode;
+ map['delayTime'] = delayTime;
+ map['automaticBlockingTip'] = automaticBlockingTip;
+ map['time'] = time;
+ map['normallyOpen'] = normallyOpen;
+ map['date'] = date;
+ map['begin'] = begin;
+ map['end'] = end;
+ map['allDay'] = allDay;
+ map['save'] = save;
+ map['normallyOpenModeTip'] = normallyOpenModeTip;
+ map['pleaseSeletLockVolume'] = pleaseSeletLockVolume;
+ map['lockSoundTip'] = lockSoundTip;
+ map['low'] = low;
+ map['lower'] = lower;
+ map['medium'] = medium;
+ map['high'] = high;
+ map['higher'] = higher;
+ map['burglarAlarmTip'] = burglarAlarmTip;
+ map['resetButtonTip'] = resetButtonTip;
+ map['calibrationTime'] = calibrationTime;
+ map['setTheDSTMode'] = setTheDSTMode;
+ map['diagnoseTip'] = diagnoseTip;
+ map['uploading'] = uploading;
+ map['uploadDataTip'] = uploadDataTip;
+ map['importOtherLockDataTip'] = importOtherLockDataTip;
+ map['haveNewVersion'] = haveNewVersion;
+ map['currentVersion'] = currentVersion;
+ map['newVersion'] = newVersion;
+ map['upgrade'] = upgrade;
+ map['leisure'] = leisure;
+ map['checkedIn'] = checkedIn;
+
+ map['basicInformation'] = basicInformation;
+ map['wirelessKeyboard'] = wirelessKeyboard;
+ map['doorMagnetic'] = doorMagnetic;
+ map['remoteUnlocking'] = remoteUnlocking;
+ map['automaticBlocking'] = automaticBlocking;
+ map['normallyOpenMode'] = normallyOpenMode;
+ map['lockSound'] = lockSound;
+ map['burglarAlarm'] = burglarAlarm;
+ map['resetButton'] = resetButton;
+ map['lockTime'] = lockTime;
+ map['diagnose'] = diagnose;
+ map['uploadData'] = uploadData;
+ map['importOtherLockData'] = importOtherLockData;
+ map['lockEscalation'] = lockEscalation;
+ map['markedHouseState'] = markedHouseState;
+ map['unlockReminder'] = unlockReminder;
+ map['unlockQRCode'] = unlockQRCode;
+ map['lockNumber'] = lockNumber;
+ map['electricQuantity'] = electricQuantity;
+ map['lockName'] = lockName;
+ map['lockGrouping'] = lockGrouping;
+ map['adminOpenLockPassword'] = adminOpenLockPassword;
+ map['update'] = update;
+ map['updateElectricQuantityTip'] = updateElectricQuantityTip;
+ map['adminOpenLockPasswordTip'] = adminOpenLockPasswordTip;
+ map['updateLockAdminPassword'] = updateLockAdminPassword;
+ map['whenScreenFlashesClickNext'] = whenScreenFlashesClickNext;
+ map['theScreenNeverFlickered'] = theScreenNeverFlickered;
+ map['enterNumberOrPressSet'] = enterNumberOrPressSet;
+ map['theLocationOfTheSetKeyWillBeDifferent'] = theLocationOfTheSetKeyWillBeDifferent;
+ map['pressAndHoldTheResetButtonTwoSeconds'] = pressAndHoldTheResetButtonTwoSeconds;
+ map['nearbyEquipment'] = nearbyEquipment;
+ map['noData'] = noData;
+ map['doorMagneticListTopTip'] = doorMagneticListTopTip;
+
+ map['lanEnglish'] = lanEnglish;
+ map['lanChinese'] = lanChinese;
+ map['multilingual'] = multilingual;
+ map['addLock'] = addLock;
+ map['gateway'] = gateway;
+ map['message'] = message;
+ map['supportStaff'] = supportStaff;
+ map['set'] = set;
+ map['moreServices'] = moreServices;
+
+ map['moreSet'] = moreSet;
+ map['prompTone'] = prompTone;
+ map['touchUnlock'] = touchUnlock;
+ map['pushNotification'] = pushNotification;
+ map['lockUserManagement'] = lockUserManagement;
+ map['authorizedAdmin'] = authorizedAdmin;
+ map['lockGroup'] = lockGroup;
+ map['transferSmartLock'] = transferSmartLock;
+ map['transferGateway'] = transferGateway;
+
+ map['multiLanguage'] = multiLanguage;
+ map['lockScreen'] = lockScreen;
+ map['closed'] = closed;
+ map['opened'] = opened;
+ map['hideInvalidUnlockPermissions'] = hideInvalidUnlockPermissions;
+ map['appUnlockRequiresMobilePhoneAccessToTheLock'] = appUnlockRequiresMobilePhoneAccessToTheLock;
+ map['valueAddedServices'] = valueAddedServices;
+ map['about'] = about;
+ map['userAgreement'] = userAgreement;
+ map['privacyPolicy'] = privacyPolicy;
+ map['personalInformationCollectionList'] = personalInformationCollectionList;
+ map['applicationPermissionDescription'] = applicationPermissionDescription;
+ map['thirdPartyInformationSharingList'] = thirdPartyInformationSharingList;
+ map['logout'] = logout;
+ map['deleteAccount'] = deleteAccount;
+
+ map['allLock'] = allLock;
+ map['searchAllLockType'] = searchAllLockType;
+ map['doorLock'] = doorLock;
+ map['padlock'] = padlock;
+ map['safeLock'] = safeLock;
+ map['intelligentLockCore'] = intelligentLockCore;
+ map['parkingLock'] = parkingLock;
+ map['bicycleLock'] = bicycleLock;
+ map['longRangeControl'] = longRangeControl;
+ map['lightTouchScreen'] = lightTouchScreen;
+ map['lightTouchScreenTip'] = lightTouchScreenTip;
+ map['next'] = next;
+ map['nearbyLock'] = nearbyLock;
+ map['addSuccessfullyPleaseRename'] = addSuccessfullyPleaseRename;
+ map['whenAddingLockThePhoneMustBeNextToTheLock'] = whenAddingLockThePhoneMustBeNextToTheLock;
+
+ map['login'] = login;
+ map['register'] = register;
+ map['forgetPassword'] = forgetPassword;
+ map['readAndAgree'] = readAndAgree;
+ map['verificationCode'] = verificationCode;
+ map['registerPasswordTip'] = registerPasswordTip;
+ map['iphone'] = iphone;
+ map['email'] = email;
+ map['countryAndRegion'] = countryAndRegion;
+ map['selet'] = selet;
+ return map;
+ }
+}
\ No newline at end of file
diff --git a/star_lock/lib/translations/trans_lib.dart b/star_lock/lib/translations/trans_lib.dart
new file mode 100644
index 00000000..b42e09dd
--- /dev/null
+++ b/star_lock/lib/translations/trans_lib.dart
@@ -0,0 +1,9 @@
+library lib_trans;
+
+import 'dart:convert';
+import 'dart:ui';
+import 'package:flutter/services.dart';
+import 'package:get/get.dart';
+import 'lanKeyEntity.dart';
+part 'translation_loader.dart';
+part 'translation_message.dart';
\ No newline at end of file
diff --git a/star_lock/lib/translations/translation_loader.dart b/star_lock/lib/translations/translation_loader.dart
new file mode 100644
index 00000000..9fb726b5
--- /dev/null
+++ b/star_lock/lib/translations/translation_loader.dart
@@ -0,0 +1,42 @@
+part of lib_trans;
+
+
+
+class TranslationLoader {
+
+ static bool get isZh => Get.locale?.languageCode?.toLowerCase() == 'zh';
+ static bool get isEn => Get.locale?.languageCode?.toLowerCase() == 'en';
+
+ static Map
+ _zhMap = {},
+ _enMap = {},
+ _keyMap = {};
+
+ static Map get zhDic => _zhMap;
+ static Map get enDic => _enMap;
+
+ static LanKeyEntity _lanKeyEntity;
+ static LanKeyEntity get lanKeys => _lanKeyEntity;
+
+ static Future loadTranslation({
+ String zhSource,
+ String enSource,
+ String keySource,}) async {
+ _zhMap = await _loadJsonFile(zhSource);
+ _enMap = await _loadJsonFile(enSource);
+ _keyMap = await _loadJsonFile(keySource);
+ _lanKeyEntity = LanKeyEntity.fromJson(_keyMap);
+ }
+
+ static Future