nativeapi_flutter
0.6.1, released 6 days ago by leanflutter.dev
Flutter integration for nativeapi, adding widgets and type conversions.
What it does
Re-exports nativeapi and provides Flutter widgets for window manipulation, context menus, and asset image loading. It also offers extensions to convert between nativeapi types and dart:ui types.
AI-written summary of version 0.6.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need native window controls or context menus in a Flutter desktop app
- Want to load nativeapi Image from a Flutter asset
- Need to bridge Flutter's multi‑window API to nativeapi
Skip it when
- Using only mobile platforms without desktop features
- Relying on experimental multi‑window API before Flutter 3.50
Strengths
- Provides ready‑made widgets for window interaction
- Convenient type conversion extensions
- Supports all major desktop platforms
Weaknesses
- Requires Flutter 3.50 / Dart 3.14
- Limited to desktop platforms for most features
- No code generation
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add dependency, import package, no extra build steps
import 'package:nativeapi_flutter/nativeapi_flutter.dart';
final window = WindowManager.instance.getCurrent();
window?.contentSize = const Size(800, 600).toNative();
final Rect bounds = window!.bounds.toRect();Works with
Packages commonly used together with nativeapi_flutter: ones it builds on, ones built on it, and its own family.
- nativeapinativeapi_flutter depends on itDart bindings to native system APIs across desktop and mobile
- hotkey_managerSame familyRegister system-wide and in-app keyboard shortcuts on desktop and Android
- protocol_handlerSame familyRegister and handle custom protocols and deep links in Flutter apps.
- screen_retrieverBuilt on nativeapi_flutterRead desktop screen size, work area, scale factor and cursor position on Windows, macOS and Linux.
- window_managerBuilt on nativeapi_flutterFlutter desktop window resizing, moving, showing, hiding via nativeapi.
- tray_managerBuilt on nativeapi_flutterDefine system tray icons and context menus in Flutter desktop apps.