getNodeJsProjectPath method

  1. @override
Future<String?> getNodeJsProjectPath()
override

Returns the file path where the Node.js project is located.

This is useful for reading/writing to the same project folder from Dart.

Implementation

@override
Future<String?> getNodeJsProjectPath() async {
  try {
    final String? projectPath = await _methodChannel.invokeMethod(
      'getNodeJsProjectPath',
    );
    return projectPath;
  } on PlatformException catch (e) {
    logger.e("Failed to get Node.js project path: '${e.message}'.");
    return null;
  }
}