Skip to content

Instantly share code, notes, and snippets.

@matthew-carroll
Created May 22, 2019 21:07
Show Gist options
  • Save matthew-carroll/2b4666b4ab5024764a53c4e0f376e8ba to your computer and use it in GitHub Desktop.
Save matthew-carroll/2b4666b4ab5024764a53c4e0f376e8ba to your computer and use it in GitHub Desktop.
Canonical GeneratedPluginLoader usage
// This example assumes that the developer is using the new Android embedding
// API, as well as plugins that have opted-in to the proposed dart-side
// plugin initialization.
public class MainActivity extends FlutterActivity {
@Override
protected void onFlutterEngineCreated(@NonNull FlutterEngine engine) {
engine.setPluginLoader(new GeneratedPluginLoader());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment