fix:修复 华为隐私的问题,修复设备列表报错
This commit is contained in:
parent
9c8f722710
commit
eb650460ad
@ -59,7 +59,6 @@ Future<void> _initTranslation() async => TranslationLoader.loadTranslation(
|
|||||||
// 设置包名服务设备信息
|
// 设置包名服务设备信息
|
||||||
Future<void> _setCommonServices() async {
|
Future<void> _setCommonServices() async {
|
||||||
await Get.putAsync(() => StoreService().init());
|
await Get.putAsync(() => StoreService().init());
|
||||||
await Get.putAsync(() => PlatformInfoService().init());
|
|
||||||
Get.put(ApiProvider());
|
Get.put(ApiProvider());
|
||||||
Get.put(ApiRepository(Get.find<ApiProvider>()));
|
Get.put(ApiRepository(Get.find<ApiProvider>()));
|
||||||
if (F.isLite) {
|
if (F.isLite) {
|
||||||
@ -72,6 +71,7 @@ Future<void> _setCommonServices() async {
|
|||||||
|
|
||||||
//关于隐私协议的初始化
|
//关于隐私协议的初始化
|
||||||
Future<void> privacySDKInitialization() async {
|
Future<void> privacySDKInitialization() async {
|
||||||
|
await Get.putAsync(() => PlatformInfoService().init());
|
||||||
await BuglyTool.init();
|
await BuglyTool.init();
|
||||||
await XSJPushProvider().initJPushService();
|
await XSJPushProvider().initJPushService();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,6 +147,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
BuildContext context, int index, GroupList itemData) {
|
BuildContext context, int index, GroupList itemData) {
|
||||||
final List<LockListInfoItemEntity> lockItemList =
|
final List<LockListInfoItemEntity> lockItemList =
|
||||||
itemData.lockList ?? <LockListInfoItemEntity>[];
|
itemData.lockList ?? <LockListInfoItemEntity>[];
|
||||||
|
final List<Widget> list = forItems(lockItemList);
|
||||||
return LockListGroupView(
|
return LockListGroupView(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@ -155,15 +156,20 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
typeImgList: const <dynamic>[],
|
typeImgList: const <dynamic>[],
|
||||||
groupItem: itemData,
|
groupItem: itemData,
|
||||||
child: GridView.extent(
|
child: GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
crossAxisSpacing: 15.w,
|
||||||
|
mainAxisSpacing: 15.h,
|
||||||
|
childAspectRatio: 1.1,
|
||||||
|
),
|
||||||
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.w),
|
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.w),
|
||||||
maxCrossAxisExtent: Get.width * .6,
|
|
||||||
childAspectRatio: 1.2,
|
|
||||||
crossAxisSpacing: 15.w,
|
|
||||||
mainAxisSpacing: 15.h,
|
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: forItems(lockItemList),
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return list[index];
|
||||||
|
},
|
||||||
|
itemCount: list.length,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,8 +323,8 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: keyInfo.passageMode == 1,
|
visible: keyInfo.passageMode == 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding:
|
padding: EdgeInsets.only(
|
||||||
EdgeInsets.only(top: 2.h, right: 3.w, left: 3.w,bottom: 1.h),
|
top: 2.h, right: 3.w, left: 3.w, bottom: 1.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5.w),
|
borderRadius: BorderRadius.circular(5.w),
|
||||||
color: AppColors.openPassageModeColor,
|
color: AppColors.openPassageModeColor,
|
||||||
@ -338,7 +344,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 2.h, right: 3.w, left: 3.w,bottom: 1.h),
|
top: 2.h, right: 3.w, left: 3.w, bottom: 1.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5.w),
|
borderRadius: BorderRadius.circular(5.w),
|
||||||
color: AppColors.mainColor,
|
color: AppColors.mainColor,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import '../tools/storage.dart';
|
|||||||
String getUserAgent() {
|
String getUserAgent() {
|
||||||
//赋值变量方便调试
|
//赋值变量方便调试
|
||||||
String ua =
|
String ua =
|
||||||
'StarLock/${PlatformInfoService.to.info.version}/${PlatformInfoService.to.info.buildNumber}/${GetPlatform.isAndroid ? 'Android' : 'iOS'}';
|
'StarLock/${PlatformInfoService.to?.info.version}/${PlatformInfoService.to?.info.buildNumber}/${GetPlatform.isAndroid ? 'Android' : 'iOS'}';
|
||||||
return ua;
|
return ua;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,12 @@ import 'package:get/get.dart';
|
|||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
class PlatformInfoService extends GetxService {
|
class PlatformInfoService extends GetxService {
|
||||||
static PlatformInfoService get to => Get.find<PlatformInfoService>();
|
static PlatformInfoService? get to {
|
||||||
|
if(Get.isRegistered<PlatformInfoService>()){
|
||||||
|
return Get.find<PlatformInfoService>();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
late PackageInfo _packageInfo;
|
late PackageInfo _packageInfo;
|
||||||
PackageInfo get info => _packageInfo;
|
PackageInfo get info => _packageInfo;
|
||||||
Future<PlatformInfoService> init() async {
|
Future<PlatformInfoService> init() async {
|
||||||
|
|||||||
@ -63,8 +63,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.53+2024052804:xhj 线上环境,提审 修改鑫锁名字为星星锁
|
# 1.0.53+2024052804:xhj 线上环境,提审 修改鑫锁名字为星星锁
|
||||||
# 1.0.54+2024053001:xhj 线上环境,对外发布,提交测试
|
# 1.0.54+2024053001:xhj 线上环境,对外发布,提交测试
|
||||||
# 1.0.56+2024060401:xhj 线上环境,对外发布,提交测试
|
# 1.0.56+2024060401:xhj 线上环境,对外发布,提交测试
|
||||||
|
# 1.0.56+2024060502:xhj 线上环境,对外发布,提交测试
|
||||||
|
|
||||||
version: 1.0.56+2024060401
|
version: 1.0.56+2024060502
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user