setAppearanceConfig method
Implementation
String setAppearanceConfig(BuildContext context,
{String type = "system", bool notify = true}) {
String appearance = ""; // only light or dark (no system)
appearanceConfig = type;
if (appearanceConfig == "system") {
var brightness = MediaQuery.of(context).platformBrightness;
appearance = (brightness == Brightness.light) ? "light" : "dark";
} else {
appearance = appearanceConfig;
}
_setAppearance(appearance, notify: notify);
return appearance;
}