DashboardSettings.fromJson constructor
- Json? json
Parses settings from JSON.
Implementation
DashboardSettings.fromJson(Json? json) :
presets = [
for (final presetJson in json?["presets"] ?? [])
ViewPreset.fromJson(presetJson),
],
splitMode = SplitMode.values[json?["splitMode"] ?? SplitMode.horizontal.index],
mapBlockSize = json?["mapBlockSize"] ?? 1.0,
maxFps = (json?["maxFps"] ?? 60) as int,
splitCameras = json?["splitCameras"] ?? false,
preferTankControls = json?["preferTankControls"] ?? false,
versionChecking = json?["versionChecking"] ?? true,
themeMode = ThemeMode.values.byName(json?["theme"] ?? ThemeMode.system.name);