flutter_native_view
0.0.2, released 4 years ago by an unverified publisher
Embed native Windows windows and components directly into a Flutter window.
What it does
Allows embedding arbitrary Win32 HWND windows into a Flutter application as a standard Widget. It uses Win32 APIs without intermediate pixel buffer copying to keep performance high.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed existing third-party native Windows windows into a Flutter desktop app.
- You are building Windows desktop applications with Flutter and need performant native window embedding.
Skip it when
- You are targeting platforms other than Windows, such as mobile or web.
- You require fully stable interactive support with the embedded native views out of the box.
Strengths
- Very performant as it avoids texture or intermediate pixel buffer copying.
- Supports placing other Flutter widgets on top of the native view.
- Supports multiple instances of NativeView and placement inside scrollables.
Weaknesses
- Currently restricted to Windows only.
- Interactability (hit-testing) is marked as unstable.
- Requires manual native C++ setup in `windows/runner/main.cpp`.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires modifying windows/runner/main.cpp to include the plugin header and initialize NativeViewContainer.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await FlutterNativeView.ensureInitialized();
runApp(const MyApp());
}Alternatives
Packages that do the same job and could replace flutter_native_view.
- desktop_webview_window
Show a native webview window on your Flutter desktop application.
94Compare - desktop_multi_window
Create and manage multiple windows on desktop platforms in Flutter.
89Compare - zikzak_inappwebview
A Flutter plugin providing inline WebView, headless WebView, and in-app browser features.
80Compare - desktop_lifecycle
Allows Flutter desktop applications to perceive window activation state.
76Compare