BrickConfigEntry.fromJson constructor

BrickConfigEntry.fromJson(
  1. Map json
)

Implementation

factory BrickConfigEntry.fromJson(Map json) {
  try {
    return BrickConfigReference.fromJson(json);
  } catch (_) {
    // do nothing
  }

  try {
    return BrickConfig.fromJson(json, configPath: null);
  } catch (err) {
    di<Logger>().err('Failed to parse brick config');
    throw const BrickConfigException(reason: 'Failed to parse brick config');
  }
}