0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Flutter (Android) で、 任意のpluginをApplication.ktに読み込む

Posted at

やりたいこと

Application.kt
import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
...

みたいな、Application.kt のimportの部分を、任意のプラグインに対して定義したい

解決策

Application.kt
import io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin

該当するパッケージのgithub repoをみる。
cloud firestoreの場合、ここ

image.png

cloud_firestore/android/src/main/java 以下の、io/flutter/plugins/firebase/firestore のところがそれになる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?