diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml
index 33fc5ee..a6f7996 100644
--- a/example/android/app/src/main/res/values/styles.xml
+++ b/example/android/app/src/main/res/values/styles.xml
@@ -1,12 +1,12 @@
-
-
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 1580772..fc003a7 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -8,6 +8,7 @@ import 'package:zhiying_base_widget/register.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
+import 'package:zhiying_comm/util/update/app_update_util.dart';
import 'util/localizations_delegate.dart';
@@ -44,6 +45,8 @@ class _MyAppState extends State {
FlutterAlibc.initAlibc(version: "", appName: "").then((result) {
print("白川" + '${result.errorCode} ${result.errorMessage}');
});
+ // app更新插件
+ AppUpdateUtil.initXUpdate();
}
@override
diff --git a/lib/dialog/loading/loading.dart b/lib/dialog/loading/loading.dart
index 94428de..7df3ed1 100644
--- a/lib/dialog/loading/loading.dart
+++ b/lib/dialog/loading/loading.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/dialog/loading/loading_dialog.dart';
+import 'package:zhiying_comm/zhiying_comm.dart';
// loading弹窗
class Loading {
@@ -14,7 +15,7 @@ class Loading {
return GestureDetector(
onTap: dismiss,
child: Container(
- color: Colors.black.withOpacity(0.5),
+ color: Colors.black.withOpacity(0.3),
child: LoadingDialog(
message: msg,
),
@@ -22,12 +23,20 @@ class Loading {
);
});
- //插入到 Overlay中显示 OverlayEntry
- Overlay.of(context).insert(_overlayEntry);
+ try {
+ //插入到 Overlay中显示 OverlayEntry
+ Overlay.of(context).insert(_overlayEntry);
+ }catch(e, s){
+ Logger.error(e, s);
+ }
}
static dismiss() {
- _overlayEntry?.remove();
- _overlayEntry = null;
+ try {
+ _overlayEntry?.remove();
+ _overlayEntry = null;
+ }catch(e, s){
+ Logger.error(e, s);
+ }
}
}
diff --git a/lib/dialog/loading/loading_dialog.dart b/lib/dialog/loading/loading_dialog.dart
index b866dc8..317d86a 100644
--- a/lib/dialog/loading/loading_dialog.dart
+++ b/lib/dialog/loading/loading_dialog.dart
@@ -21,17 +21,17 @@ class LoadingDialog extends StatelessWidget {
child: Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
- color: Colors.white, borderRadius: BorderRadius.circular(8)),
+ color: Colors.transparent, borderRadius: BorderRadius.circular(8)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
- width: 80,
- height: 80,
+ width: 40,
+ height: 40,
child: LoadingIndicator(
indicatorType: Indicator.ballSpinFadeLoader,
- color: Colors.redAccent,
+ color: Colors.white,
),
),
message == null || message == ''
diff --git a/lib/pages/about_us_page/about_us_page.dart b/lib/pages/about_us_page/about_us_page.dart
index 2f6a87b..31881cf 100644
--- a/lib/pages/about_us_page/about_us_page.dart
+++ b/lib/pages/about_us_page/about_us_page.dart
@@ -3,6 +3,7 @@ import 'package:zhiying_base_widget/pages/about_us_page/about_us_page_sk.dart';
import 'package:zhiying_base_widget/pages/about_us_page/bloc/about_us_bloc.dart';
import 'package:zhiying_base_widget/pages/about_us_page/bloc/about_us_repository.dart';
import 'package:zhiying_base_widget/pages/about_us_page/model/about_us_model.dart';
+import 'package:zhiying_comm/util/update/app_update_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'bloc/about_us_bloc.dart';
@@ -34,8 +35,9 @@ class _AboutUsPageContainer extends StatefulWidget {
class __AboutUsPageContainerState extends State<_AboutUsPageContainer> {
/// 检查更新
- void _onClickCheckUpdate() {
+ void _onClickCheckUpdate() async{
Logger.log('点击了更新');
+ // AppUpdateUtil.updateApp(context);
}
/// 给个评价
diff --git a/lib/pages/goods_details_page/bloc/goods_details_page_repository.dart b/lib/pages/goods_details_page/bloc/goods_details_page_repository.dart
index eec4c36..11c8e7f 100644
--- a/lib/pages/goods_details_page/bloc/goods_details_page_repository.dart
+++ b/lib/pages/goods_details_page/bloc/goods_details_page_repository.dart
@@ -2,6 +2,9 @@ import 'dart:convert';
import 'package:zhiying_comm/zhiying_comm.dart';
class GoodsDetailsPageRepository {
+
+ String _parentGoodsCoverImg;
+
/// 获取上个页面传进来的数据
Future>> fetchParentPageData(final Map model) async {
try {
@@ -10,19 +13,7 @@ class GoodsDetailsPageRepository {
String goodId = model['good_id']?.toString();
if (!EmptyUtil.isEmpty(provider) && !EmptyUtil.isEmpty(goodId)) {
Map detailData = model['detail_data'];
- return _baseDataProcess(goodId, provider, detailData);
- // Logger.log('商品类型 = $provider, 商品ID = $goodId');
- // List