load static method

Future<SnapshotTestOptions?> load({
  1. String? path,
})

Implementation

static Future<SnapshotTestOptions?> load({String? path}) async {
  final file = File(path ?? CONFIG_FILE_NAME);
  try {
    final content = await file.readAsString();
    final json = jsonDecode(content);
    return fromJson(json);
  } catch (e) {
    print(
        'SnapshotTestOptions: (load) failed to load config file $CONFIG_FILE_NAME - $e');
  }
}