NodeFlutterPlatform class abstract
The platform interface for node_flutter
.
This class defines the contract that platform-specific implementations must fulfill. It follows the platform interface pattern using a private token to prevent unauthorized overrides.
- Inheritance
-
- Object
- PlatformInterface
- NodeFlutterPlatform
- Implementers
Constructors
- NodeFlutterPlatform.new()
- Constructs a NodeFlutterPlatform using a secure token for verification.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onMessageReceived
→ Stream<
Map< String, dynamic> > -
A stream that listens to messages sent from the Node.js environment.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCurrentABIName(
) → Future< String?> - Returns the ABI (Application Binary Interface) name for the current platform.
-
getNodeJsProjectPath(
) → Future< String?> - Returns the file path where the Node.js project is located.
-
getPlatformVersion(
) → Future< String?> - Returns the platform version string.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
String tag, String message) → Future< void> -
Sends a message to the Node.js process with an associated
tag
. -
startNodeProject(
String mainFileName, {bool redirectOutputToLogcat = true}) → Future< void> -
Starts the Node.js engine by executing the given entry file
mainFileName
. -
startNodeService(
String mainFileName, String title, String content, {bool redirectOutputToLogcat = true}) → Future< void> - Starts the Node.js script as a foreground service (e.g. Android Notification Service).
-
startNodeWithScript(
String script, {bool redirectOutputToLogcat = true}) → Future< void> -
Starts the embedded Node.js engine with an inline JavaScript
script
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ NodeFlutterPlatform
-
The default instance of NodeFlutterPlatform to use.
getter/setter pair