MethodChannelNodeFlutter class

The MethodChannel implementation of the NodeFlutterPlatform interface.

This class provides methods to start Node.js with a script or project, send messages, and retrieve platform-specific information. It uses MethodChannel and EventChannel to communicate with the native platform.

Inheritance

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 setteroverride
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.
override
getNodeJsProjectPath() Future<String?>
Returns the file path where the Node.js project is located.
override
getPlatformVersion() Future<String?>
Returns the platform version string.
override
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.
override
startNodeProject(String mainFileName, {bool redirectOutputToLogcat = true}) Future<void>
Starts the Node.js engine by executing the given entry file mainFileName.
override
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).
override
startNodeWithScript(String script, {bool redirectOutputToLogcat = true}) Future<void>
Starts the embedded Node.js engine with an inline JavaScript script.
override
toString() String
A string representation of this object.
inherited

Operators

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