Fix For iOS
This commit is contained in:
@@ -129,12 +129,7 @@ class _LoginPageState extends State<FaceLogin2> {
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (!bMayLogin) {
|
||||
return;
|
||||
}
|
||||
Navigator.pushNamed(context, '/faceLogin_take_pictuer', arguments: 'FaceLogin');
|
||||
},
|
||||
onTap: faceLogin,
|
||||
),
|
||||
SizedBox(height: ScreenUtil().setHeight(40)),
|
||||
Container(
|
||||
@@ -150,12 +145,7 @@ class _LoginPageState extends State<FaceLogin2> {
|
||||
),
|
||||
SizedBox(height: ScreenUtil().setHeight(20)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (!bMayLogin) {
|
||||
return;
|
||||
}
|
||||
Navigator.pushNamed(context, '/faceLogin_take_pictuer', arguments: 'FaceLogin');
|
||||
},
|
||||
onTap: faceLogin,
|
||||
child: Container(
|
||||
alignment: Alignment(0, 0),
|
||||
margin: EdgeInsets.all(5),
|
||||
@@ -170,19 +160,6 @@ class _LoginPageState extends State<FaceLogin2> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// JdButton(
|
||||
// height: 126,
|
||||
// //JdText中已经使用ScreenUtil().setHeight(126),此处不能传 ScreenUtil().setHeight(126) ,否则严重错位
|
||||
// width: 999,
|
||||
// text: "开始检测",
|
||||
// color: Color.fromRGBO(23, 176, 91, 1),
|
||||
// onTop: () {
|
||||
// if (!bMayLogin) {
|
||||
// return;
|
||||
// }
|
||||
// Navigator.pushNamed(context, '/faceLogin_take_pictuer', arguments: 'FaceLogin');
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -237,4 +214,11 @@ class _LoginPageState extends State<FaceLogin2> {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
faceLogin() async {
|
||||
if (!bMayLogin) {
|
||||
return;
|
||||
}
|
||||
Navigator.pushNamed(context, '/faceLogin_take_pictuer', arguments: 'FaceLogin');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -37,7 +39,7 @@ class LoginTabs2State extends State<LoginTabs2> {
|
||||
Container(
|
||||
height: ScreenUtil().screenHeight -
|
||||
ScreenUtil().statusBarHeight -
|
||||
ScreenUtil().bottomBarHeight,
|
||||
(Platform.isAndroid ? ScreenUtil().bottomBarHeight : 0),
|
||||
width: ScreenUtil().screenWidth,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -54,15 +56,21 @@ class LoginTabs2State extends State<LoginTabs2> {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
//Navigator.pop(context);
|
||||
SystemNavigator.pop(); //退出App
|
||||
},
|
||||
icon: const Icon(Icons.close, color: Colors.white),
|
||||
)
|
||||
],
|
||||
children: (() {
|
||||
if (Platform.isAndroid) {
|
||||
return [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
//Navigator.pop(context);
|
||||
SystemNavigator.pop(); //退出App
|
||||
},
|
||||
icon:
|
||||
const Icon(Icons.close, color: Colors.white),
|
||||
)
|
||||
];
|
||||
}
|
||||
return <Widget>[];
|
||||
})(),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
@@ -113,10 +121,6 @@ class LoginTabs2State extends State<LoginTabs2> {
|
||||
color: Colors.transparent,
|
||||
height: ScreenUtil().setHeight(130), //不能超过133,否则有些手机会越界
|
||||
child: Text(
|
||||
//'© 宜宾市翠屏生态环境局\n© 四川省踏石科技有限公司 版权所有 \n服务热线:187-8467-8300',
|
||||
//'© 宜宾市翠屏生态环境局\n© 四川省踏石科技有限公司',
|
||||
//'© 宜宾市翠屏生态环境局 四川省踏石科技 版权所有\n服务热线:187-8467-8300',
|
||||
//'© 宜宾市翠屏生态环境局 版权所有',
|
||||
copyright_info,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
@@ -126,48 +130,6 @@ class LoginTabs2State extends State<LoginTabs2> {
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
|
||||
//144
|
||||
// 384
|
||||
// 36
|
||||
// 166
|
||||
// 17
|
||||
// 1026
|
||||
// 1573
|
||||
|
||||
// 1768
|
||||
//S7采用5.1英寸的Super AMOLED屏幕,分辨率为2560 ×1440(Quad HD),设置为1920*1080
|
||||
// Wrap(
|
||||
// runSpacing: 9.0,
|
||||
// alignment: WrapAlignment.center,
|
||||
// children: <Widget>[
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: <Widget>[
|
||||
// Text('${pageData['title']}',
|
||||
// style: TextStyle(fontSize: 38.0, color: Color.fromRGBO(234, 200, 134, 1)))
|
||||
// ],
|
||||
// ),
|
||||
// //自定义圆角
|
||||
// ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(12.5),
|
||||
// child: Container(
|
||||
// height: 25.0,
|
||||
// width: 190.0,
|
||||
// color: Color.fromRGBO(234, 200, 134, 1),
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: <Widget>[
|
||||
// Text(
|
||||
// '${pageData['subTitle']}',
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(color: Color.fromRGBO(113, 80, 24, 1)),
|
||||
// )
|
||||
// ])))
|
||||
// ],
|
||||
// )
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -59,25 +59,6 @@ class MyUpdatedNew {
|
||||
|
||||
registerCallback({bool first = false}) {
|
||||
//3、在initState中初始化
|
||||
/*
|
||||
D/DownloadWorker( 4745): Update too frequently!!!!, this should be dropped
|
||||
E/flutter ( 4745): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The method 'update' was called on null.
|
||||
E/flutter ( 4745): Receiver: null
|
||||
E/flutter ( 4745): Tried calling: update(message: "下载中,请稍后…", progress: 0.0)
|
||||
E/flutter ( 4745): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
|
||||
E/flutter ( 4745): #1 MyUpdatedNew._updateDownLoadInfo (package:hyzp_ybqx/pages/MyMsics/05_updated/MyUpdatedNew.dart:251:10)
|
||||
E/flutter ( 4745): #2 _rootRunUnary (dart:async/zone.dart:1206:13)
|
||||
E/flutter ( 4745): #3 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
|
||||
E/flutter ( 4745): #4 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
|
||||
E/flutter ( 4745): #5 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
|
||||
E/flutter ( 4745): #6 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
|
||||
E/flutter ( 4745): #7 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
|
||||
E/flutter ( 4745): #8 _StreamController._add (dart:async/stream_controller.dart:682:7)
|
||||
E/flutter ( 4745): #9 _StreamController.add (dart:async/stream_controller.dart:624:5)
|
||||
E/flutter ( 4745): #10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
|
||||
E/flutter ( 4745):
|
||||
*/
|
||||
|
||||
if (!first) {
|
||||
// 解决2次进入报错无法下载的问题-OK
|
||||
// 如果以前注册过必须先移除,否则报错无法下载:DownloadWorker( 4745): Update too frequently!!!!, this should be dropped
|
||||
@@ -128,6 +109,8 @@ class MyUpdatedNew {
|
||||
_showNoNewVersionAppDialog();
|
||||
}
|
||||
});
|
||||
} else if (Platform.isIOS) {
|
||||
// TODO: iOS更新
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,10 +207,6 @@ class _Page4_MyMsicsNewState extends State<Page4_MyMsicsNew>
|
||||
leadColor: _greenColor,
|
||||
onTapFun: OnTap_MyUpdate,
|
||||
bBadge: bNewVer),
|
||||
_getListTile('软件下载',
|
||||
leadPath: 'assets/images/download.png',
|
||||
leadColor: _deepBlueColor,
|
||||
onTapFun: OnTap_download),
|
||||
_getListTile('待审提醒',
|
||||
leadPath: 'assets/images/语音提醒.png',
|
||||
leadColor: _deepGreyColor,
|
||||
@@ -229,6 +225,14 @@ class _Page4_MyMsicsNewState extends State<Page4_MyMsicsNew>
|
||||
// leadColor: _deepGreyColor,
|
||||
// onTapFun: OnTap_UserAuthority),
|
||||
];
|
||||
if (Platform.isAndroid) {
|
||||
_listViewUser.insert(
|
||||
3,
|
||||
_getListTile('软件下载',
|
||||
leadPath: 'assets/images/download.png',
|
||||
leadColor: _deepBlueColor,
|
||||
onTapFun: OnTap_download));
|
||||
}
|
||||
}
|
||||
|
||||
//已添加管理员记录的标志,0 未添加, 1 已添加 1 次
|
||||
|
||||
Reference in New Issue
Block a user