createArray static method

List<ExternalApp> createArray(
  1. String externalApp
)

Implementation

static List<ExternalApp> createArray(String externalApp) {
  List<ExternalApp> externalApps = [];
  try {
    Map list = json.decode(externalApp);
    for (int i = 0; i < list.length; i++) {
      ExternalApp? app = new ExternalApp.fromMap(list[i]);
      externalApps.add(app);
    }
  } catch (exception) {
    print('external app getting error: ' + exception.toString());
  }

  return externalApps;
}