NitroModule class

Declares a native module: which implementation backs the spec on each platform (omit a platform to skip it) and, optionally, the library name and C symbol prefix the generated bridge uses.

Put it on an abstract class that extends HybridObject in a *.native.dart file; every public method, getter and setter of that class becomes part of the bridge.

Constructors

NitroModule({AppleNativeImpl? ios, AndroidNativeImpl? android, AppleNativeImpl? macos, WindowsNativeImpl? windows, LinuxNativeImpl? linux, WebNativeImpl? web, String? cSymbolPrefix, String? lib})
const

Properties

android → AndroidNativeImpl?
Which implementation to use on Android. null = not targeting Android.
final
cSymbolPrefix → String?
Override the C symbol prefix (default: snake_case of the class name).
final
hashCode → int
The hash code for this object.
no setterinherited
ios → AppleNativeImpl?
Which implementation to use on iOS. null = not targeting iOS.
final
lib → String?
Override the shared library name (default: the spec file stem, math.native.dart → math, with - replaced by _).
final
linux → LinuxNativeImpl?
Which implementation to use on Linux. null = not targeting Linux. Only LinuxNativeImpl.cpp is valid — Linux requires direct C++.
final
macos → AppleNativeImpl?
Which implementation to use on macOS. null = not targeting macOS. Only AppleNativeImpl.swift or AppleNativeImpl.cpp are valid.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
web → WebNativeImpl?
Which implementation to use on Web. null = not targeting Web. Only WebNativeImpl.wasm is valid — dart:ffi is unavailable on web.
final
windows → WindowsNativeImpl?
Which implementation to use on Windows. null = not targeting Windows. Only WindowsNativeImpl.cpp is valid — Windows requires direct C++.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited