Skip to content

Instantly share code, notes, and snippets.

@philipretl
Created May 18, 2020 18:31
Show Gist options
  • Save philipretl/49148a37da91f00111500c4b38f079c3 to your computer and use it in GitHub Desktop.
Save philipretl/49148a37da91f00111500c4b38f079c3 to your computer and use it in GitHub Desktop.
package com.dominio.nombreapp
import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application : FlutterApplication(), PluginRegistrantCallback {
override fun onCreate() {
super.onCreate()
FlutterFirebaseMessagingService.setPluginRegistrant(this)
}
override fun registerWith(registry: PluginRegistry?) {
io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment