统一国际化到消息字段
This commit is contained in:
parent
5682ccdffb
commit
90dcb35f76
@ -163,16 +163,14 @@
|
|||||||
"已入住": "Checked In",
|
"已入住": "Checked In",
|
||||||
|
|
||||||
"英文": "English",
|
"英文": "English",
|
||||||
"lanChinese": "Chinese",
|
"中文": "Chinese",
|
||||||
"multilingual": "Multilingual",
|
"多语言": "Multilingual",
|
||||||
"addLock": "Add Lock",
|
"添加锁": "Add Lock",
|
||||||
"lockAddress": "Lock Address",
|
"锁地址": "Lock Address",
|
||||||
"selectLockType": "Select lock type",
|
"选择锁类型": "Select lock type",
|
||||||
"videoIntercomDoorLock": "Video intercom door lock",
|
"NFC无源锁": "NFC Passive Lock",
|
||||||
"NFCPassiveLock": "NFC Passive Lock",
|
"添加设备": "Add device",
|
||||||
"addDevice": "Add device",
|
"网关": "Gateway",
|
||||||
"gateway": "Gateway",
|
|
||||||
"message": "Message",
|
|
||||||
"supportStaff": "Support Staff",
|
"supportStaff": "Support Staff",
|
||||||
"set": "Setting",
|
"set": "Setting",
|
||||||
"moreServices": "More Services",
|
"moreServices": "More Services",
|
||||||
|
|||||||
@ -162,16 +162,14 @@
|
|||||||
"已入住":"已入住",
|
"已入住":"已入住",
|
||||||
|
|
||||||
"英文":"英文",
|
"英文":"英文",
|
||||||
"lanChinese":"lanChinese",
|
"中文":"中文",
|
||||||
"multilingual":"multilingual",
|
"多语言":"多语言",
|
||||||
"addLock":"addLock",
|
"添加锁":"添加锁",
|
||||||
"lockAddress":"lockAddress",
|
"锁地址":"锁地址",
|
||||||
"selectLockType":"selectLockType",
|
"选择锁类型":"选择锁类型",
|
||||||
"videoIntercomDoorLock":"videoIntercomDoorLock",
|
"NFC无源锁":"NFC无源锁",
|
||||||
"NFCPassiveLock":"NFCPassiveLock",
|
"添加设备":"添加设备",
|
||||||
"addDevice":"addDevice",
|
"网关":"网关",
|
||||||
"gateway":"gateway",
|
|
||||||
"message":"message",
|
|
||||||
"supportStaff":"supportStaff",
|
"supportStaff":"supportStaff",
|
||||||
"set":"set",
|
"set":"set",
|
||||||
"moreServices":"moreServices",
|
"moreServices":"moreServices",
|
||||||
|
|||||||
@ -161,16 +161,15 @@
|
|||||||
"已入住": "已入住",
|
"已入住": "已入住",
|
||||||
|
|
||||||
"英文": "英文",
|
"英文": "英文",
|
||||||
"lanChinese": "中文",
|
"中文": "中文",
|
||||||
"multilingual": "多语言",
|
"多语言": "多语言",
|
||||||
"addLock": "添加锁",
|
"添加锁": "添加锁",
|
||||||
"lockAddress": "锁地址",
|
"锁地址": "锁地址",
|
||||||
"selectLockType": "选择锁类型",
|
"选择锁类型": "选择锁类型",
|
||||||
"videoIntercomDoorLock": "可视对讲门锁",
|
"NFC无源锁": "NFC无源锁",
|
||||||
"NFCPassiveLock": "NFC无源锁",
|
"添加设备": "添加设备",
|
||||||
"addDevice": "添加设备",
|
"网关": "网关",
|
||||||
"gateway": "网关",
|
|
||||||
"message": "消息",
|
|
||||||
"supportStaff": "客服",
|
"supportStaff": "客服",
|
||||||
"set": "设置",
|
"set": "设置",
|
||||||
"moreServices": "更多服务",
|
"moreServices": "更多服务",
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/fingerprint/addFingerprintTip/addFingerprintTip_state.dart';
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
@ -18,21 +19,21 @@ class AddFingerprintTipPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddFingerprintTipPageState extends State<AddFingerprintTipPage> {
|
class _AddFingerprintTipPageState extends State<AddFingerprintTipPage> {
|
||||||
final logic = Get.put(AddFingerprintTipLogic());
|
final AddFingerprintTipLogic logic = Get.put(AddFingerprintTipLogic());
|
||||||
final state = Get.find<AddFingerprintTipLogic>().state;
|
final AddFingerprintTipState state = Get.find<AddFingerprintTipLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
barTitle: '添加锁'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
),
|
),
|
||||||
@ -40,10 +41,10 @@ class _AddFingerprintTipPageState extends State<AddFingerprintTipPage> {
|
|||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"添加过程中,请根据提示,在指纹采集器上进行多次的抬起按压".tr,
|
'添加过程中,请根据提示,在指纹采集器上进行多次的抬起按压'.tr,
|
||||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines:null,
|
maxLines:null,
|
||||||
@ -67,20 +68,20 @@ class _AddFingerprintTipPageState extends State<AddFingerprintTipPage> {
|
|||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: SubmitBtn(
|
child: SubmitBtn(
|
||||||
btnName: "开始添加".tr,//TranslationLoader.lanKeys!.next!.tr,
|
btnName: '开始添加'.tr,//TranslationLoader.lanKeys!.next!.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Get.toNamed(Routers.addFingerprintPage, arguments: {
|
Get.toNamed(Routers.addFingerprintPage, arguments: <String, Object>{
|
||||||
"lockId": state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
"endDate": state.endDate.value,
|
'endDate': state.endDate.value,
|
||||||
"addType": state.addType.value,
|
'addType': state.addType.value,
|
||||||
"fingerprintName": state.fingerprintName.value,
|
'fingerprintName': state.fingerprintName.value,
|
||||||
"fingerprintNumber": state.fingerprintNumber.value,
|
'fingerprintNumber': state.fingerprintNumber.value,
|
||||||
"fingerprintType": state.fingerprintType.value,
|
'fingerprintType': state.fingerprintType.value,
|
||||||
"isCoerced": state.isCoerced.value,
|
'isCoerced': state.isCoerced.value,
|
||||||
"startDate": state.startDate.value,
|
'startDate': state.startDate.value,
|
||||||
"weekDay": state.weekDay.value,
|
'weekDay': state.weekDay.value,
|
||||||
"fromType": state.fromType.value,
|
'fromType': state.fromType.value,
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -839,7 +839,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
TranslationLoader.lanKeys!.addDevice!.tr,
|
'添加设备'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -28,12 +28,12 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: F.sw(
|
appBar: F.sw(
|
||||||
skyCall: () => TitleAppBar(
|
skyCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
barTitle: '添加锁'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
xhjCall: () => TitleAppBar(
|
xhjCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
barTitle: '添加锁'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
iconColor: AppColors.blackColor,
|
iconColor: AppColors.blackColor,
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:amap_flutter_base/amap_flutter_base.dart';
|
||||||
import 'package:amap_flutter_location/amap_flutter_location.dart';
|
import 'package:amap_flutter_location/amap_flutter_location.dart';
|
||||||
import 'package:amap_flutter_location/amap_location_option.dart';
|
import 'package:amap_flutter_location/amap_location_option.dart';
|
||||||
|
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
import 'package:star_lock/mine/addLock/lockAddress/gaode/lockAddressGaoDe_state.dart';
|
||||||
import 'package:amap_flutter_base/amap_flutter_base.dart';
|
|
||||||
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
@ -30,8 +30,8 @@ class LockAddressGaoDePage extends StatefulWidget {
|
|||||||
|
|
||||||
class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||||
with RouteAware {
|
with RouteAware {
|
||||||
final logic = Get.put(LockAddressGaoDeLogic());
|
final LockAddressGaoDeLogic logic = Get.put(LockAddressGaoDeLogic());
|
||||||
final state = Get.find<LockAddressGaoDeLogic>().state;
|
final LockAddressGaoDeState state = Get.find<LockAddressGaoDeLogic>().state;
|
||||||
|
|
||||||
// 高德地图
|
// 高德地图
|
||||||
static AMapApiKey amapApiKeys =
|
static AMapApiKey amapApiKeys =
|
||||||
@ -90,7 +90,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
Future<void> requestPermission() async {
|
Future<void> requestPermission() async {
|
||||||
final status = await PermissionDialog.request(Permission.location);
|
final bool status = await PermissionDialog.request(Permission.location);
|
||||||
if(Platform.isIOS){
|
if(Platform.isIOS){
|
||||||
_setLocationOption();
|
_setLocationOption();
|
||||||
requestIOSLocation();
|
requestIOSLocation();
|
||||||
@ -103,7 +103,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> requestAndroidLocation() async {
|
Future<void> requestAndroidLocation() async {
|
||||||
location.onLocationChanged().listen((event) {
|
location.onLocationChanged().listen((Map<String, Object> event) {
|
||||||
if (event.isNotEmpty) {
|
if (event.isNotEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
addressInfo = event;
|
addressInfo = event;
|
||||||
@ -116,7 +116,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
Future<void> requestIOSLocation() async {
|
Future<void> requestIOSLocation() async {
|
||||||
location = AMapFlutterLocation()
|
location = AMapFlutterLocation()
|
||||||
..setLocationOption(AMapLocationOption())
|
..setLocationOption(AMapLocationOption())
|
||||||
..onLocationChanged().listen((event) {
|
..onLocationChanged().listen((Map<String, Object> event) {
|
||||||
// AppLog.log("listenLocationChanged$event");
|
// AppLog.log("listenLocationChanged$event");
|
||||||
// EasyLoading.dismiss();
|
// EasyLoading.dismiss();
|
||||||
if (event.isNotEmpty) {
|
if (event.isNotEmpty) {
|
||||||
@ -134,39 +134,39 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.lockAddress!.tr,
|
barTitle: '锁地址'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 25.w, top: 40.h, bottom: 40.w),
|
margin: EdgeInsets.only(left: 25.w, top: 40.h, bottom: 40.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Text("地理位置".tr, style: TextStyle(fontSize: 50.sp)),
|
Text('地理位置'.tr, style: TextStyle(fontSize: 50.sp)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: (addressInfo != null && addressInfo!.containsKey("latitude"))
|
child: (addressInfo != null && addressInfo!.containsKey('latitude'))
|
||||||
? Column(
|
? Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 1.sw / 5 * 4,
|
height: 1.sw / 5 * 4,
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
child: AMapWidget(
|
child: AMapWidget(
|
||||||
apiKey: amapApiKeys,
|
apiKey: amapApiKeys,
|
||||||
// 初始化地图中心
|
// 初始化地图中心
|
||||||
initialCameraPosition: (CameraPosition(
|
initialCameraPosition: CameraPosition(
|
||||||
target: LatLng(
|
target: LatLng(
|
||||||
double.parse(
|
double.parse(
|
||||||
addressInfo!['latitude'].toString()),
|
addressInfo!['latitude'].toString()),
|
||||||
double.parse(
|
double.parse(
|
||||||
addressInfo!['longitude'].toString())),
|
addressInfo!['longitude'].toString())),
|
||||||
zoom: 10.0,
|
zoom: 10.0,
|
||||||
)),
|
),
|
||||||
//定位小蓝点
|
//定位小蓝点
|
||||||
myLocationStyleOptions: MyLocationStyleOptions(
|
myLocationStyleOptions: MyLocationStyleOptions(
|
||||||
true,
|
true,
|
||||||
@ -191,9 +191,9 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
EdgeInsets.only(left: 25.w, top: 20.h, right: 25.w),
|
EdgeInsets.only(left: 25.w, top: 20.h, right: 25.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text("检查以确保以下地址是正确的".tr,
|
child: Text('检查以确保以下地址是正确的'.tr,
|
||||||
style: TextStyle(fontSize: 24.sp))),
|
style: TextStyle(fontSize: 24.sp))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -205,13 +205,13 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 25.w, top: 20.h, right: 25.w),
|
left: 25.w, top: 20.h, right: 25.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
addressInfo!["address"].toString() ??
|
addressInfo!['address'].toString() ??
|
||||||
"",
|
'',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -235,20 +235,20 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
SizedBox(height: 200.h),
|
SizedBox(height: 200.h),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
"跳过".tr,
|
'跳过'.tr,
|
||||||
style: TextStyle(color: Colors.black, fontSize: 24.sp),
|
style: TextStyle(color: Colors.black, fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.toNamed(Routers.addLockSelectCountryPage, arguments: {
|
Get.toNamed(Routers.addLockSelectCountryPage, arguments: <String, Object>{
|
||||||
"addressInfo": {},
|
'addressInfo': {},
|
||||||
"pwdTimestamp": state.pwdTimestamp.value,
|
'pwdTimestamp': state.pwdTimestamp.value,
|
||||||
"lockInfo": state.lockInfo,
|
'lockInfo': state.lockInfo,
|
||||||
"featureValue": state.featureValue,
|
'featureValue': state.featureValue,
|
||||||
"featureSettingValue": state.featureSettingValue,
|
'featureSettingValue': state.featureSettingValue,
|
||||||
"featureSettingParams": state.featureSettingParams,
|
'featureSettingParams': state.featureSettingParams,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -259,17 +259,17 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (addressInfo!.isEmpty) {
|
if (addressInfo!.isEmpty) {
|
||||||
logic.showToast("还未获取到位置信息哦,请耐心等待一下!".tr);
|
logic.showToast('还未获取到位置信息哦,请耐心等待一下!'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Get.toNamed(Routers.saveLockPage, arguments: {
|
Get.toNamed(Routers.saveLockPage, arguments: <String, Object?>{
|
||||||
"addressInfo": addressInfo,
|
'addressInfo': addressInfo,
|
||||||
"pwdTimestamp": state.pwdTimestamp.value,
|
'pwdTimestamp': state.pwdTimestamp.value,
|
||||||
"lockInfo": state.lockInfo,
|
'lockInfo': state.lockInfo,
|
||||||
"featureValue": state.featureValue,
|
'featureValue': state.featureValue,
|
||||||
"featureSettingValue": state.featureSettingValue,
|
'featureSettingValue': state.featureSettingValue,
|
||||||
"featureSettingParams": state.featureSettingParams,
|
'featureSettingParams': state.featureSettingParams,
|
||||||
"isFromMap": 1,
|
'isFromMap': 1,
|
||||||
});
|
});
|
||||||
// Navigator.pushNamed(context, Routers.saveLockPage);
|
// Navigator.pushNamed(context, Routers.saveLockPage);
|
||||||
},
|
},
|
||||||
@ -297,7 +297,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
locationOption.desiredLocationAccuracyAuthorizationMode =
|
locationOption.desiredLocationAccuracyAuthorizationMode =
|
||||||
AMapLocationAccuracyAuthorizationMode.ReduceAccuracy;
|
AMapLocationAccuracyAuthorizationMode.ReduceAccuracy;
|
||||||
|
|
||||||
locationOption.fullAccuracyPurposeKey = "AMapLocationScene";
|
locationOption.fullAccuracyPurposeKey = 'AMapLocationScene';
|
||||||
|
|
||||||
///设置Android端连续定位的定位间隔
|
///设置Android端连续定位的定位间隔
|
||||||
locationOption.locationInterval = 2000;
|
locationOption.locationInterval = 2000;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class _LockAddressPageState extends State<LockAddressPage> with RouteAware{
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.lockAddress!.tr,
|
barTitle: '锁地址'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
actionsList: [
|
actionsList: [
|
||||||
@ -35,7 +35,7 @@ class _LockAddressPageState extends State<LockAddressPage> with RouteAware{
|
|||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if(addressInfo!.isEmpty){
|
if(addressInfo!.isEmpty){
|
||||||
EasyLoading.showToast("请先获取到位置信息哦!", duration: 2000.milliseconds);
|
EasyLoading.showToast('请先获取到位置信息哦!', duration: 2000.milliseconds);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Get.toNamed(Routers.saveLockPage, arguments: addressInfo);
|
Get.toNamed(Routers.saveLockPage, arguments: addressInfo);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
barTitle: '添加锁'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
|
|||||||
@ -29,12 +29,12 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: F.sw(
|
appBar: F.sw(
|
||||||
skyCall: () => TitleAppBar(
|
skyCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
|
barTitle: '选择锁类型'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
xhjCall: () => TitleAppBar(
|
xhjCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
|
barTitle: '选择锁类型'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
iconColor: AppColors.blackColor,
|
iconColor: AppColors.blackColor,
|
||||||
@ -85,7 +85,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
}),
|
}),
|
||||||
if (!F.isLite)
|
if (!F.isLite)
|
||||||
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
||||||
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
'NFC无源锁'.tr, () {
|
||||||
CommonDataManage().seletLockType = 2;
|
CommonDataManage().seletLockType = 2;
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
@ -120,7 +120,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
// }),
|
// }),
|
||||||
if (!F.isLite)
|
if (!F.isLite)
|
||||||
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
||||||
TranslationLoader.lanKeys!.gateway!.tr, () {
|
'网关'.tr, () {
|
||||||
CommonDataManage().seletLockType = 7;
|
CommonDataManage().seletLockType = 7;
|
||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -17,21 +17,20 @@ class GatewayConfigurationWifiPage extends StatefulWidget {
|
|||||||
_GatewayConfigurationWifiPageState();
|
_GatewayConfigurationWifiPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _GatewayConfigurationWifiPageState
|
class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiPage> {
|
||||||
extends State<GatewayConfigurationWifiPage> {
|
final TextEditingController _wifiPassward = TextEditingController();
|
||||||
final _wifiPassward = TextEditingController();
|
final TextEditingController _gatewayNamePassward = TextEditingController();
|
||||||
final _gatewayNamePassward = TextEditingController();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
barTitle: '网关'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
color: const Color(0xFFF2F6F9),
|
color: const Color(0xFFF2F6F9),
|
||||||
@ -43,10 +42,10 @@ class _GatewayConfigurationWifiPageState
|
|||||||
)),
|
)),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.wifiName!.tr,
|
leftTitel: TranslationLoader.lanKeys!.wifiName!.tr,
|
||||||
rightTitle: "XinHongJia",
|
rightTitle: 'XinHongJia',
|
||||||
allHeight: 100.h,
|
allHeight: 100.h,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -55,7 +54,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.wifiPassward!.tr,
|
leftTitel: TranslationLoader.lanKeys!.wifiPassward!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
_wifiPassward,
|
_wifiPassward,
|
||||||
@ -66,7 +65,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
),
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.gatewayName!.tr,
|
leftTitel: TranslationLoader.lanKeys!.gatewayName!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(_gatewayNamePassward,
|
rightWidget: getTFWidget(_gatewayNamePassward,
|
||||||
TranslationLoader.lanKeys!.pleaseEnterGatewayName!.tr)),
|
TranslationLoader.lanKeys!.pleaseEnterGatewayName!.tr)),
|
||||||
@ -75,7 +74,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
),
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.wifiMAC!.tr,
|
leftTitel: TranslationLoader.lanKeys!.wifiMAC!.tr,
|
||||||
rightTitle: "48:55:19:7d:84:7a",
|
rightTitle: '48:55:19:7d:84:7a',
|
||||||
allHeight: 100.h,
|
allHeight: 100.h,
|
||||||
isHaveLine: false),
|
isHaveLine: false),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -84,22 +83,22 @@ class _GatewayConfigurationWifiPageState
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.ipAddress!.tr,
|
leftTitel: TranslationLoader.lanKeys!.ipAddress!.tr,
|
||||||
rightTitle: "192.168.1.1",
|
rightTitle: '192.168.1.1',
|
||||||
allHeight: 100.h,
|
allHeight: 100.h,
|
||||||
isHaveLine: true),
|
isHaveLine: true),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.subnetMask!.tr,
|
TranslationLoader.lanKeys!.subnetMask!.tr,
|
||||||
rightTitle: "255.255.255.0",
|
rightTitle: '255.255.255.0',
|
||||||
allHeight: 100.h,
|
allHeight: 100.h,
|
||||||
isHaveLine: true),
|
isHaveLine: true),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.defaultGateway!.tr,
|
TranslationLoader.lanKeys!.defaultGateway!.tr,
|
||||||
rightTitle: "192.168.1.1",
|
rightTitle: '192.168.1.1',
|
||||||
allHeight: 100.h,
|
allHeight: 100.h,
|
||||||
isHaveLine: true),
|
isHaveLine: true),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -108,7 +107,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!
|
leftTitel: TranslationLoader.lanKeys!
|
||||||
.automaticallyGetTheDNSServerAddress!.tr,
|
.automaticallyGetTheDNSServerAddress!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
@ -116,11 +115,11 @@ class _GatewayConfigurationWifiPageState
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader
|
||||||
.lanKeys!.preferredDNS!.tr,
|
.lanKeys!.preferredDNS!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
@ -129,7 +128,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader
|
||||||
.lanKeys!.alternativeDNS!.tr,
|
.lanKeys!.alternativeDNS!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
@ -159,7 +158,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: <Widget>[
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// width: 150.w,
|
// width: 150.w,
|
||||||
@ -196,7 +195,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
height: 50.h,
|
height: 50.h,
|
||||||
width: 300.w,
|
width: 300.w,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
@ -229,7 +228,7 @@ class _GatewayConfigurationWifiPageState
|
|||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: _isOn,
|
value: _isOn,
|
||||||
onChanged: (value) {
|
onChanged: (bool value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isOn = value;
|
_isOn = value;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class _GatewayConnectionLockListPageState extends State<GatewayConnectionLockLis
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(barTitle: '网关'.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -33,7 +33,7 @@ class _GatewayConnectionLockListPageState extends State<GatewayConnectionLockLis
|
|||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount:10,
|
itemCount:10,
|
||||||
itemBuilder: (c, index){
|
itemBuilder: (c, index){
|
||||||
return _gatewayConnectionLockListItem('images/mine/icon_mine_gatewaySignal_prompt.png', "MCBN01 8f3106", TranslationLoader.lanKeys!.strongSignal!.tr,(){
|
return _gatewayConnectionLockListItem('images/mine/icon_mine_gatewaySignal_prompt.png', 'MCBN01 8f3106', TranslationLoader.lanKeys!.strongSignal!.tr,(){
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
barTitle: '网关'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import 'package:get/get.dart';
|
|||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/titleAppBar.dart';
|
import '../../../tools/titleAppBar.dart';
|
||||||
import '../../../translations/trans_lib.dart';
|
|
||||||
|
|
||||||
class GatewayListPage extends StatefulWidget {
|
class GatewayListPage extends StatefulWidget {
|
||||||
const GatewayListPage({Key? key}) : super(key: key);
|
const GatewayListPage({Key? key}) : super(key: key);
|
||||||
@ -20,7 +19,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
barTitle: '网关'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
actionsList: [
|
actionsList: [
|
||||||
@ -43,9 +42,9 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _gatewatListItem(
|
return _gatewatListItem(
|
||||||
'images/mine/icon_mine_gatewayListMainIcon.png',
|
'images/mine/icon_mine_gatewayListMainIcon.png',
|
||||||
"星锁网关",
|
'星锁网关',
|
||||||
"在线",
|
'在线',
|
||||||
"2", () {
|
'2', () {
|
||||||
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -91,53 +90,48 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Row(
|
||||||
// color: Colors.red,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
child: Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Text(
|
||||||
children: [
|
gateWayName,
|
||||||
Text(
|
style: TextStyle(fontSize: 24.sp),
|
||||||
gateWayName,
|
),
|
||||||
style: TextStyle(fontSize: 24.sp),
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
SizedBox(height: 5.h),
|
||||||
Container(
|
Row(
|
||||||
child: Row(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Image.asset(
|
||||||
Image.asset(
|
'images/mine/icon_mine_gatewayListOnline.png',
|
||||||
'images/mine/icon_mine_gatewayListOnline.png',
|
width: 22.w,
|
||||||
width: 22.w,
|
height: 22.w,
|
||||||
height: 22.w,
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
width: 10.w,
|
||||||
width: 10.w,
|
),
|
||||||
),
|
Text(
|
||||||
Text(
|
'在线',
|
||||||
"在线",
|
style: TextStyle(fontSize: 18.sp),
|
||||||
style: TextStyle(fontSize: 18.sp),
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
width: 80.w,
|
||||||
width: 80.w,
|
),
|
||||||
),
|
Image.asset(
|
||||||
Image.asset(
|
'images/mine/icon_mine_gatewayListNumber.png',
|
||||||
'images/mine/icon_mine_gatewayListNumber.png',
|
width: 22.w,
|
||||||
width: 22.w,
|
height: 22.w,
|
||||||
height: 22.w,
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
width: 10.w,
|
||||||
width: 10.w,
|
),
|
||||||
),
|
Text(
|
||||||
Text(
|
'2',
|
||||||
"2",
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 18.sp, fontWeight: FontWeight.w500),
|
||||||
fontSize: 18.sp, fontWeight: FontWeight.w500),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/mine/message/messageList/messageList_state.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
@ -25,8 +26,8 @@ class MessageListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _MessageListPageState extends State<MessageListPage>
|
class _MessageListPageState extends State<MessageListPage>
|
||||||
with TickerProviderStateMixin {
|
with TickerProviderStateMixin {
|
||||||
final logic = Get.put(MessageListLogic());
|
final MessageListLogic logic = Get.put(MessageListLogic());
|
||||||
final state = Get.find<MessageListLogic>().state;
|
final MessageListState state = Get.find<MessageListLogic>().state;
|
||||||
|
|
||||||
void getHttpData() {
|
void getHttpData() {
|
||||||
logic.messageListDataRequest().then((MessageListEntity value) {
|
logic.messageListDataRequest().then((MessageListEntity value) {
|
||||||
@ -47,22 +48,22 @@ class _MessageListPageState extends State<MessageListPage>
|
|||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: widget.showAppBar
|
appBar: widget.showAppBar
|
||||||
? TitleAppBar(
|
? TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.message!.tr,
|
barTitle: '消息'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
actionsList: [
|
actionsList: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
"清空".tr,
|
'清空'.tr,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
ShowTipView().showIosTipWithContentDialog("是否清空?".tr, () async {
|
ShowTipView().showIosTipWithContentDialog('是否清空?'.tr, () async {
|
||||||
logic.deletAllMessageDataRequest();
|
logic.deletAllMessageDataRequest();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logic.showToast("演示模式".tr);
|
logic.showToast('演示模式'.tr);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -80,15 +81,15 @@ class _MessageListPageState extends State<MessageListPage>
|
|||||||
: SlidableAutoCloseBehavior(
|
: SlidableAutoCloseBehavior(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: state.itemDataList.value.length,
|
itemCount: state.itemDataList.value.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (BuildContext c, int index) {
|
||||||
MessageItemEntity messageItemEntity =
|
final MessageItemEntity messageItemEntity =
|
||||||
state.itemDataList.value[index];
|
state.itemDataList.value[index];
|
||||||
return Slidable(
|
return Slidable(
|
||||||
key: ValueKey(messageItemEntity.id),
|
key: ValueKey(messageItemEntity.id),
|
||||||
endActionPane: ActionPane(
|
endActionPane: ActionPane(
|
||||||
extentRatio: 0.2,
|
extentRatio: 0.2,
|
||||||
motion: const ScrollMotion(),
|
motion: const ScrollMotion(),
|
||||||
children: [
|
children: <Widget>[
|
||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) {
|
onPressed: (BuildContext context) {
|
||||||
logic.deletMessageDataRequest(
|
logic.deletMessageDataRequest(
|
||||||
@ -105,8 +106,8 @@ class _MessageListPageState extends State<MessageListPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: _messageListItem(messageItemEntity, () {
|
child: _messageListItem(messageItemEntity, () {
|
||||||
Get.toNamed(Routers.messageDetailPage, arguments: {
|
Get.toNamed(Routers.messageDetailPage, arguments: <String, MessageItemEntity>{
|
||||||
"messageItemEntity": messageItemEntity
|
'messageItemEntity': messageItemEntity
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -133,18 +134,18 @@ class _MessageListPageState extends State<MessageListPage>
|
|||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
messageItemEntity.readAt! == 0 ? Container(
|
if (messageItemEntity.readAt! == 0) Container(
|
||||||
width: 10.w,
|
width: 10.w,
|
||||||
height: 10.w,
|
height: 10.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius: BorderRadius.circular(5.w),
|
borderRadius: BorderRadius.circular(5.w),
|
||||||
),
|
),
|
||||||
):Container(),
|
) else Container(),
|
||||||
messageItemEntity.readAt! == 0 ? SizedBox(width: 5.w) : Container(),
|
if (messageItemEntity.readAt! == 0) SizedBox(width: 5.w) else Container(),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
messageItemEntity.data!,
|
messageItemEntity.data!,
|
||||||
@ -162,7 +163,7 @@ class _MessageListPageState extends State<MessageListPage>
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: <Widget>[
|
||||||
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||||
// SizedBox(width: 10.w,),
|
// SizedBox(width: 10.w,),
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/mine/starLockMine_state.dart';
|
import 'package:star_lock/mine/mine/starLockMine_state.dart';
|
||||||
import 'package:star_lock/tools/commonItem.dart';
|
|
||||||
import 'package:star_lock/tools/customer_tool.dart';
|
import 'package:star_lock/tools/customer_tool.dart';
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
@ -164,7 +163,7 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
// Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
// Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
||||||
// }),
|
// }),
|
||||||
mineItem('images/mine/icon_mine_main_addLock.png',
|
mineItem('images/mine/icon_mine_main_addLock.png',
|
||||||
TranslationLoader.lanKeys!.addDevice!.tr, () {
|
'添加设备'.tr, () {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.toNamed(Routers.selectLockTypePage);
|
Get.toNamed(Routers.selectLockTypePage);
|
||||||
}),
|
}),
|
||||||
@ -173,7 +172,7 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
// }),
|
// }),
|
||||||
mineItem('images/mine/icon_mine_main_message.png',
|
mineItem('images/mine/icon_mine_main_message.png',
|
||||||
TranslationLoader.lanKeys!.message!.tr, () {
|
'消息'.tr, () {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.toNamed(Routers.messageListPage);
|
Get.toNamed(Routers.messageListPage);
|
||||||
// Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/mine/mineMultiLanguage/mineMultiLanguage_state.dart';
|
||||||
|
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
import '../../tools/commonItem.dart';
|
import '../../tools/commonItem.dart';
|
||||||
@ -18,15 +19,15 @@ class MineMultiLanguagePage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
||||||
final logic = Get.put(MineMultiLanguageLogic());
|
final MineMultiLanguageLogic logic = Get.put(MineMultiLanguageLogic());
|
||||||
final state = Get.find<MineMultiLanguageLogic>().state;
|
final MineMultiLanguageState state = Get.find<MineMultiLanguageLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.multilingual!.tr,
|
barTitle: '多语言'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
@ -38,7 +39,7 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _children() {
|
List<Widget> _children() {
|
||||||
List<Widget> l = [];
|
List<Widget> l = <Widget>[];
|
||||||
// l.add(
|
// l.add(
|
||||||
// CommonItem(
|
// CommonItem(
|
||||||
// leftTitel: '跟随系统',
|
// leftTitel: '跟随系统',
|
||||||
@ -52,18 +53,18 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
|||||||
// }),
|
// }),
|
||||||
// );
|
// );
|
||||||
for (int i = 0; i < state.languages.length; i++) {
|
for (int i = 0; i < state.languages.length; i++) {
|
||||||
var e = state.languages[i];
|
Locale e = state.languages[i];
|
||||||
var lanType = ExtensionLanguageType.fromLanguageCode(e.languageCode);
|
LanguageType lanType = ExtensionLanguageType.fromLanguageCode(e.languageCode);
|
||||||
l.add(
|
l.add(
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: lanType.lanTitle,
|
leftTitel: lanType.lanTitle,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: Obx(() => state.currentLanguageType.value == lanType
|
rightWidget: Obx(() => state.currentLanguageType.value == lanType
|
||||||
? Image(
|
? Image(
|
||||||
image: const AssetImage("images/icon_item_checked.png"),
|
image: const AssetImage('images/icon_item_checked.png'),
|
||||||
width: 30.w,
|
width: 30.w,
|
||||||
height: 30.w,
|
height: 30.w,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
|||||||
@ -55,7 +55,7 @@ extension ExtensionLanguageType on LanguageType {
|
|||||||
str = '英文'.tr;
|
str = '英文'.tr;
|
||||||
break;
|
break;
|
||||||
case LanguageType.chinese:
|
case LanguageType.chinese:
|
||||||
str = TranslationLoader.lanKeys!.lanChinese!.tr;
|
str = '中文'.tr;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,16 +193,16 @@ class LanKeyEntity {
|
|||||||
// this.noCardPunched,
|
// this.noCardPunched,
|
||||||
// this.holidayInfo,
|
// this.holidayInfo,
|
||||||
// this.lanEnglish,
|
// this.lanEnglish,
|
||||||
this.lanChinese,
|
// this.lanChinese,
|
||||||
this.multilingual,
|
// this.multilingual,
|
||||||
this.addLock,
|
// this.addLock,
|
||||||
this.lockAddress,
|
// this.lockAddress,
|
||||||
this.selectLockType,
|
// this.selectLockType,
|
||||||
this.videoIntercomDoorLock,
|
// this.videoIntercomDoorLock,
|
||||||
this.NFCPassiveLock,
|
// this.NFCPassiveLock,
|
||||||
this.addDevice,
|
// this.addDevice,
|
||||||
this.gateway,
|
// this.gateway,
|
||||||
this.message,
|
// this.message,
|
||||||
this.supportStaff,
|
this.supportStaff,
|
||||||
this.set,
|
this.set,
|
||||||
this.moreServices,
|
this.moreServices,
|
||||||
@ -656,16 +656,16 @@ class LanKeyEntity {
|
|||||||
// holidayInfo = json['holidayInfo'];
|
// holidayInfo = json['holidayInfo'];
|
||||||
|
|
||||||
// lanEnglish = json['lanEnglish'];
|
// lanEnglish = json['lanEnglish'];
|
||||||
lanChinese = json['lanChinese'];
|
// lanChinese = json['lanChinese'];
|
||||||
multilingual = json['multilingual'];
|
// multilingual = json['multilingual'];
|
||||||
addLock = json['addLock'];
|
// addLock = json['addLock'];
|
||||||
lockAddress = json["lockAddress"];
|
// lockAddress = json['lockAddress'];
|
||||||
selectLockType = json['selectLockType'];
|
// selectLockType = json['selectLockType'];
|
||||||
videoIntercomDoorLock = json['videoIntercomDoorLock'];
|
// videoIntercomDoorLock = json['videoIntercomDoorLock'];
|
||||||
NFCPassiveLock = json['NFCPassiveLock'];
|
// NFCPassiveLock = json['NFCPassiveLock'];
|
||||||
addDevice = json['addDevice'];
|
// addDevice = json['addDevice'];
|
||||||
gateway = json['gateway'];
|
// gateway = json['gateway'];
|
||||||
message = json['message'];
|
// message = json['message'];
|
||||||
supportStaff = json['supportStaff'];
|
supportStaff = json['supportStaff'];
|
||||||
set = json['set'];
|
set = json['set'];
|
||||||
moreServices = json['moreServices'];
|
moreServices = json['moreServices'];
|
||||||
@ -1161,16 +1161,16 @@ class LanKeyEntity {
|
|||||||
// String? doorMagneticListTopTip;
|
// String? doorMagneticListTopTip;
|
||||||
|
|
||||||
// String? lanEnglish;
|
// String? lanEnglish;
|
||||||
String? lanChinese;
|
// String? lanChinese;
|
||||||
String? multilingual;
|
// String? multilingual;
|
||||||
String? addLock;
|
// String? addLock;
|
||||||
String? lockAddress;
|
// String? lockAddress;
|
||||||
String? selectLockType;
|
// String? selectLockType;
|
||||||
String? videoIntercomDoorLock;
|
// String? videoIntercomDoorLock;
|
||||||
String? NFCPassiveLock;
|
// String? NFCPassiveLock;
|
||||||
String? addDevice;
|
// String? addDevice;
|
||||||
String? gateway;
|
// String? gateway;
|
||||||
String? message;
|
// String? message;
|
||||||
String? supportStaff;
|
String? supportStaff;
|
||||||
String? set;
|
String? set;
|
||||||
String? moreServices;
|
String? moreServices;
|
||||||
@ -1661,15 +1661,15 @@ class LanKeyEntity {
|
|||||||
|
|
||||||
// map['lanEnglish'] = lanEnglish;
|
// map['lanEnglish'] = lanEnglish;
|
||||||
// map['lanChinese'] = lanChinese;
|
// map['lanChinese'] = lanChinese;
|
||||||
map['multilingual'] = multilingual;
|
// map['multilingual'] = multilingual;
|
||||||
map['addLock'] = addLock;
|
// map['addLock'] = addLock;
|
||||||
map['lockAddress'] = lockAddress;
|
// map['lockAddress'] = lockAddress;
|
||||||
map['selectLockType'] = selectLockType;
|
// map['selectLockType'] = selectLockType;
|
||||||
map['videoIntercomDoorLock'] = videoIntercomDoorLock;
|
// map['videoIntercomDoorLock'] = videoIntercomDoorLock;
|
||||||
map['NFCPassiveLock'] = NFCPassiveLock;
|
// map['NFCPassiveLock'] = NFCPassiveLock;
|
||||||
map['addDevice'] = addDevice;
|
// map['addDevice'] = addDevice;
|
||||||
map['gateway'] = gateway;
|
// map['gateway'] = gateway;
|
||||||
map['message'] = message;
|
// map['message'] = message;
|
||||||
map['supportStaff'] = supportStaff;
|
map['supportStaff'] = supportStaff;
|
||||||
map['set'] = set;
|
map['set'] = set;
|
||||||
map['moreServices'] = moreServices;
|
map['moreServices'] = moreServices;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user