5package io.flutter.embedding.engine.plugins.util;
7import androidx.annotation.NonNull;
9import io.flutter.embedding.engine.FlutterEngine;
10import java.lang.reflect.Method;
13 private static final String TAG =
"GeneratedPluginsRegister";
76 Class<?> generatedPluginRegistrant =
77 Class.forName(
"io.flutter.plugins.GeneratedPluginRegistrant");
78 Method registrationMethod =
79 generatedPluginRegistrant.getDeclaredMethod(
"registerWith",
FlutterEngine.class);
80 registrationMethod.invoke(
null, flutterEngine);
81 }
catch (Exception
e) {
84 "Tried to automatically register plugins with FlutterEngine ("
86 +
") but could not find or invoke the GeneratedPluginRegistrant.");
87 Log.
e(
TAG,
"Received exception while registering",
e);
static void e(@NonNull String tag, @NonNull String message)
static void registerGeneratedPlugins(@NonNull FlutterEngine flutterEngine)