更新安卓通知栏提示
This commit is contained in:
@@ -8,13 +8,12 @@ import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/JPushUtil.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/weather/weather_controller.dart';
|
||||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/FloatingSvgIcon.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/component/HomeDeviceWidget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
@@ -75,6 +74,9 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
homeController.homeSleepDays.value.length - 1;
|
||||
}
|
||||
});
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_onReady();
|
||||
});
|
||||
try {
|
||||
_newVersionSubscription =
|
||||
ef.kvRoot.appmanger.onAppUpdate.listen((MiniAppPkg pkg) {
|
||||
@@ -573,7 +575,19 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
'reportPadding': false,
|
||||
},
|
||||
);
|
||||
}
|
||||
// 保存当前选中的mac到全局状态
|
||||
// homeController.selectDevcie
|
||||
// .value =
|
||||
// formFieldController
|
||||
// .value!;
|
||||
// homeController.selectPerson
|
||||
// .value =
|
||||
// personInfo.value;
|
||||
|
||||
// // 使用底部tab跳转到第二个页面
|
||||
// MainPageBBottomChange
|
||||
// .jumpTo(1);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
@@ -983,6 +997,23 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
if (value is String) return int.tryParse(value);
|
||||
return null;
|
||||
}
|
||||
|
||||
void _onReady() {
|
||||
// 页面渲染完成后执行的逻辑,比如处理通知跳转
|
||||
_handlePendingRoute();
|
||||
}
|
||||
|
||||
void _handlePendingRoute() {
|
||||
var pending = JPushUtil.box.read("pendingRoute");
|
||||
if (pending != null) {
|
||||
String route = pending["route"];
|
||||
var args = pending["arguments"];
|
||||
Future.delayed(const Duration(milliseconds: 300), () {
|
||||
Get.toNamed(route, arguments: args);
|
||||
});
|
||||
JPushUtil.box.remove("pendingRoute");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ScoreItem {
|
||||
|
||||
Reference in New Issue
Block a user