fetchSolutionMap method

  1. @protected
Future<Map?> fetchSolutionMap(
  1. String path
)

This method will fetch the schema file from Assets. Override it to fetch the schema file from an alternative location, like a remote location to allow over-the-air updates.

Implementation

@protected
Future<Map?> fetchSolutionMap(String path) async {
  try {
    log.info("Getting asset '$path'");
    var data = await rootBundle.loadString(path);
    return json.decodeWithReviver(data);
  } catch (e) {
    log.severe("Error loading file '$path' from assets.", e);
  }
  return null;
}