Merge branch 'release' of https://gitee.com/starlock-cn/app-starlock into release

This commit is contained in:
魏少阳 2024-06-05 16:38:48 +08:00
commit c53a60a95a
5 changed files with 25 additions and 13 deletions

View File

@ -59,7 +59,6 @@ Future<void> _initTranslation() async => TranslationLoader.loadTranslation(
//
Future<void> _setCommonServices() async {
await Get.putAsync(() => StoreService().init());
await Get.putAsync(() => PlatformInfoService().init());
Get.put(ApiProvider());
Get.put(ApiRepository(Get.find<ApiProvider>()));
if (F.isLite) {
@ -72,6 +71,7 @@ Future<void> _setCommonServices() async {
//
Future<void> privacySDKInitialization() async {
await Get.putAsync(() => PlatformInfoService().init());
await BuglyTool.init();
await XSJPushProvider().initJPushService();
}

View File

@ -147,6 +147,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
BuildContext context, int index, GroupList itemData) {
final List<LockListInfoItemEntity> lockItemList =
itemData.lockList ?? <LockListInfoItemEntity>[];
final List<Widget> list = forItems(lockItemList);
return LockListGroupView(
onTap: () {
setState(() {});
@ -155,15 +156,20 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
backgroundColor: Colors.transparent,
typeImgList: const <dynamic>[],
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),
maxCrossAxisExtent: Get.width * .6,
childAspectRatio: 1.2,
crossAxisSpacing: 15.w,
mainAxisSpacing: 15.h,
shrinkWrap: true,
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(
visible: keyInfo.passageMode == 1,
child: Container(
padding:
EdgeInsets.only(top: 2.h, right: 3.w, left: 3.w,bottom: 1.h),
padding: EdgeInsets.only(
top: 2.h, right: 3.w, left: 3.w, bottom: 1.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.w),
color: AppColors.openPassageModeColor,
@ -338,7 +344,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
children: <Widget>[
Container(
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(
borderRadius: BorderRadius.circular(5.w),
color: AppColors.mainColor,

View File

@ -11,7 +11,7 @@ import '../tools/storage.dart';
String getUserAgent() {
//便
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;
}

View File

@ -3,7 +3,12 @@ import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
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;
PackageInfo get info => _packageInfo;
Future<PlatformInfoService> init() async {

View File

@ -63,8 +63,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 1.0.53+2024052804xhj 线上环境,提审 修改鑫锁名字为星星锁
# 1.0.54+2024053001xhj 线上环境,对外发布,提交测试
# 1.0.56+2024060401xhj 线上环境,对外发布,提交测试
# 1.0.56+2024060502xhj 线上环境,对外发布,提交测试
version: 1.0.56+2024060401
version: 1.0.56+2024060502
environment:
sdk: '>=2.12.0 <3.0.0'