From a9ca0ee61e613f2f0ef8185dafa2e061a575fc92 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 6 Aug 2021 10:24:13 +0800 Subject: [PATCH] jpush.getRegistrationID change await to then --- lib/main.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index f87b768..72ccf24 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,7 +60,8 @@ void main() async { production: false, debug: true, // 设置是否打印 debug 日志 ); - String? id = await JPush().getRegistrationID(); + String? id; + JPush().getRegistrationID().then((value) => id = value); print('jpush RegistrationID is $id'); LoggerData.addData(id); runApp(MyApp());