SolidConfig.fromJson constructor

SolidConfig.fromJson(
  1. Map<String, dynamic> json
)

Decode config from JSON, defaulting to FilePerResource if missing.

Implementation

factory SolidConfig.fromJson(Map<String, dynamic> json) {
  final layoutJson = json['layout'] as Map<String, dynamic>? ??
      const {'type': 'filePerResource'};
  return SolidConfig(
    layout: RemoteStorageLayout.fromJson(layoutJson),
  );
}