make settings null safer
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
34da2bea35
commit
ac619cd514
|
@ -75,11 +75,11 @@ class Settings extends ChangeNotifier {
|
||||||
// Set Locale and notify listeners
|
// Set Locale and notify listeners
|
||||||
switchLocale(Locale(settings["Locale"]));
|
switchLocale(Locale(settings["Locale"]));
|
||||||
|
|
||||||
blockUnknownConnections = settings["BlockUnknownConnections"];
|
blockUnknownConnections = settings["BlockUnknownConnections"] ?? false;
|
||||||
streamerMode = settings["StreamerMode"];
|
streamerMode = settings["StreamerMode"] ?? false;
|
||||||
|
|
||||||
// Decide whether to enable Experiments
|
// Decide whether to enable Experiments
|
||||||
experimentsEnabled = settings["ExperimentsEnabled"];
|
experimentsEnabled = settings["ExperimentsEnabled"] ?? false;
|
||||||
|
|
||||||
// Set the internal experiments map. Casting from the Map<dynamic, dynamic> that we get from JSON
|
// Set the internal experiments map. Casting from the Map<dynamic, dynamic> that we get from JSON
|
||||||
experiments = new HashMap<String, bool>.from(settings["Experiments"]);
|
experiments = new HashMap<String, bool>.from(settings["Experiments"]);
|
||||||
|
|
Loading…
Reference in New Issue