Fix notification handlers return type

This commit is contained in:
estevez-dev 2019-09-01 00:14:54 +03:00
parent abdc0fc1c8
commit 622543d405

View File

@ -226,13 +226,15 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
_firebaseMessaging.configure( _firebaseMessaging.configure(
onLaunch: (data) { onLaunch: (data) {
Logger.d("Notification [onLaunch]: $data"); Logger.d("Notification [onLaunch]: $data");
return Future.value();
}, },
onMessage: (data) { onMessage: (data) {
Logger.d("Notification [onMessage]: $data"); Logger.d("Notification [onMessage]: $data");
_showNotification(title: data["notification"]["title"], text: data["notification"]["body"]); return _showNotification(title: data["notification"]["title"], text: data["notification"]["body"]);
}, },
onResume: (data) { onResume: (data) {
Logger.d("Notification [onResume]: $data"); Logger.d("Notification [onResume]: $data");
return Future.value();
} }
); );