Relative Content

Tag Archive for androidiosflutterflutter-plugin

Flutter plugin safer/proper setup to show various native screens

I’m working on a Flutter plugin that shows a few native screens but as the documentation for https://docs.flutter.dev/platform-integration/ios/platform-views nor https://docs.flutter.dev/platform-integration/android/platform-views offers a specific approach for this case I’m not sure if I should register in the Plugin multiple FlutterPlatformViewFactory and FlutterPlatformView each one point to a specific native view, or is it safe to register only one pair and dynamically attach the native screen view i need to the FlutterPlatformView by passing a value in the view params from Flutter and picking the screen I need using an enum and as I implemented here: