Skip to content

Instantly share code, notes, and snippets.

@yshean
Created July 6, 2020 10:59
Show Gist options
  • Save yshean/20d766bd7c20acd232309d27c882354b to your computer and use it in GitHub Desktop.
Save yshean/20d766bd7c20acd232309d27c882354b to your computer and use it in GitHub Desktop.
class MyApp extends StatelessWidget {
static final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
Widget build(BuildContext context) {
final pushNotificationService = PushNotificationService(_firebaseMessaging);
pushNotificationService.initialise();
// the rest of your build method
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment