You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nativeapi 0.5.7 does not compile on Dart 3.14 (beta): Isolate.create unshipped #22
With the Dart 3.14 beta SDK (3.14.0-315.3.beta, Flutter beta 3.50.0-0.3.pre), any program importing package:nativeapi/nativeapi.dart 0.5.7 fails to compile:
nativeapi-0.5.7/lib/src/run_native_app.dart:45:25: Error: Member not found: 'Isolate.create'.
final app = Isolate.create(debugName: 'nativeapi');
^^^^^^
It compiles with Dart 3.13.7 (stable).
Cause
Dart 3.14 unships the experimental isolate APIs that were accidentally exposed in Dart 3.13 (dart-lang/sdk#64285, dart:isolate section of the 3.14 CHANGELOG): Isolate.create, Isolate.runSync and Isolate.runEventLoopSync are removed from dart:isolate, and NativeCallable.isolateGroupBound is now gated behind the --experimental-shared-data VM flag. runNativeApp in lib/src/run_native_app.dart uses all four.
lib/nativeapi.dart exports src/run_native_app.dart on every non-web platform, so the file is compiled for every user of the library, including Flutter apps that never call runNativeApp. That also covers every user of package:window_manager/window_manager.dart 0.6.0, which re-exports package:nativeapi/nativeapi.dart (a show list does not stop the library from being compiled). Their tests fail to load on the beta channel.
Dart 3.14.0-315.3.beta: the error above. Dart 3.13.7: compiles.
Suggestion
Moving runNativeApp out of nativeapi.dart into its own library (for example package:nativeapi/run_native_app.dart) would let Flutter apps and window_manager compile on Dart 3.14 again. runNativeApp itself needs another approach on 3.14, since NativeCallable.isolateGroupBound now requires --experimental-shared-data.
Thanks @alextekartik for the detailed report and suggested fix! This is now fixed on main in #24.
package:nativeapi/nativeapi.dart no longer exports the experimental standalone runner, so ordinary Dart and Flutter imports no longer compile the removed isolate APIs. We reproduced your failure and verified that the ordinary entrypoint now compiles with Dart 3.14.0-315.3.beta; CI also covers this regression, and all checks passed.
For standalone apps that use runNativeApp, the explicit import is now:
import'package:nativeapi/standalone.dart';
The standalone runner itself still depends on Dart 3.13's experimental VM APIs and is not yet supported on Dart 3.14. This change isolates that limitation from regular package users.
The fix is merged but is not included in the already-published 0.5.10 release.
Activity
lijy91 commentedon Nov 5, 2026
Thanks @alextekartik for the detailed report and suggested fix! This is now fixed on
mainin #24.package:nativeapi/nativeapi.dartno longer exports the experimental standalone runner, so ordinary Dart and Flutter imports no longer compile the removed isolate APIs. We reproduced your failure and verified that the ordinary entrypoint now compiles with Dart3.14.0-315.3.beta; CI also covers this regression, and all checks passed.For standalone apps that use
runNativeApp, the explicit import is now:The standalone runner itself still depends on Dart 3.13's experimental VM APIs and is not yet supported on Dart 3.14. This change isolates that limitation from regular package users.
The fix is merged but is not included in the already-published 0.5.10 release.