Skip to content
pubscout

nativeapi

0.6.1, released 6 days ago by leanflutter.dev

Dart bindings to native system APIs across desktop and mobile

WASM-ready
$ flutter pub add nativeapi
Source repository

What it does

Provides unified access to native APIs such as windows, tray icons, menus, displays, keyboard, dialogs, storage, and more, usable from both Flutter and plain Dart.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need native window control in a Flutter or Dart app
  • Need tray icons or system menus
  • Need access to display information or keyboard events

Skip it when

  • Only need high‑level Flutter widgets
  • Target only mobile platforms without desktop support

Strengths

  • Cross‑platform support (Android, iOS, Windows, macOS, Linux)
  • Unified API surface across platforms
  • Works with both Flutter and plain Dart

Weaknesses

  • Work in progress, breaking changes in recent releases
  • Requires Flutter 3.50 / Dart 3.14 for full functionality
  • Experimental runNativeApp() still needs older Dart VM APIs

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
2

Add dependency, import package:nativeapi/nativeapi.dart, may need platform permissions for tray or window access

import 'package:nativeapi/nativeapi.dart';

for (final display in DisplayManager.instance.getAll()) {
  print('${display.name ?? ''}: ${display.size.width}x${display.size.height}');
}

Alternatives

Packages that do the same job and could replace nativeapi.

Works with

Packages commonly used together with nativeapi: ones it builds on, ones built on it, and its own family.