getOutputNames method

List<String> getOutputNames(
  1. JSObject session
)

Get output names from the session

Implementation

List<String> getOutputNames(JSObject session) {
  final outputNames = <String>[];
  try {
    final outputs = getProperty(session, 'outputNames');
    final length = getProperty(outputs, 'length') as int;

    for (var i = 0; i < length; i++) {
      final name = callMethod(outputs, 'at', [i]);
      outputNames.add(name.toString());
    }
  } catch (e) {
    // print('Error getting output names: $e');
  }
  return outputNames;
}