|
|
|
@ -140,7 +140,14 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
|
|
|
|
|
}, onReceiveMessage: (event) async { |
|
|
|
|
print("onReceiveMessage: ${event.toString()}"); |
|
|
|
|
return event; |
|
|
|
|
}); |
|
|
|
|
}, onRegisteredDone: (event) async { |
|
|
|
|
print("onRegisteredDone: ${event.toString()}"); |
|
|
|
|
return event; |
|
|
|
|
}, xgPushDidBindWithIdentifier: (event) async { |
|
|
|
|
print("xgPushDidBindWithIdentifier: ${event.toString()}"); |
|
|
|
|
return event; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pushRoute() async { |
|
|
|
@ -202,7 +209,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
|
|
|
|
|
|
|
|
|
|
String mobile = baseDate.data.phone; |
|
|
|
|
if (mobile != null && mobile != "") { |
|
|
|
|
xgFlutterPlugin.setAccount(mobile, AccountType.UNKNOWN); |
|
|
|
|
xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER); |
|
|
|
|
// xgFlutterPlugin.unbindWithIdentifier(identify: mobile, bindType: XGBindType.account) |
|
|
|
|
xgFlutterPlugin.bindWithIdentifier( |
|
|
|
|
identify: mobile, bindType: XGBindType.account); |
|
|
|
|
} |
|
|
|
|