Skip to content
pubscout

nativeapi_flutter

0.6.1, released 6 days ago by leanflutter.dev

Flutter integration for nativeapi, adding widgets and type conversions.

$ flutter pub add nativeapi_flutter
Source repository

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.