Palette.fromJson constructor
Palette.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Palette.fromJson(Map<String, dynamic> json) => Palette(
sbColorPrimary: json.containsKey("sbColorPrimary")
? ScanbotColor(json["sbColorPrimary"] as String)
: ScanbotColor("#C8193C"),
sbColorPrimaryDisabled: json.containsKey("sbColorPrimaryDisabled")
? ScanbotColor(json["sbColorPrimaryDisabled"] as String)
: ScanbotColor("#F5F5F5"),
sbColorNegative: json.containsKey("sbColorNegative")
? ScanbotColor(json["sbColorNegative"] as String)
: ScanbotColor("#FF3737"),
sbColorPositive: json.containsKey("sbColorPositive")
? ScanbotColor(json["sbColorPositive"] as String)
: ScanbotColor("#4EFFB4"),
sbColorWarning: json.containsKey("sbColorWarning")
? ScanbotColor(json["sbColorWarning"] as String)
: ScanbotColor("#FFCE5C"),
sbColorSecondary: json.containsKey("sbColorSecondary")
? ScanbotColor(json["sbColorSecondary"] as String)
: ScanbotColor("#FFEDEE"),
sbColorSecondaryDisabled: json.containsKey("sbColorSecondaryDisabled")
? ScanbotColor(json["sbColorSecondaryDisabled"] as String)
: ScanbotColor("#F5F5F5"),
sbColorOnPrimary: json.containsKey("sbColorOnPrimary")
? ScanbotColor(json["sbColorOnPrimary"] as String)
: ScanbotColor("#FFFFFF"),
sbColorOnSecondary: json.containsKey("sbColorOnSecondary")
? ScanbotColor(json["sbColorOnSecondary"] as String)
: ScanbotColor("#C8193C"),
sbColorSurface: json.containsKey("sbColorSurface")
? ScanbotColor(json["sbColorSurface"] as String)
: ScanbotColor("#FFFFFF"),
sbColorOutline: json.containsKey("sbColorOutline")
? ScanbotColor(json["sbColorOutline"] as String)
: ScanbotColor("#EFEFEF"),
sbColorOnSurfaceVariant: json.containsKey("sbColorOnSurfaceVariant")
? ScanbotColor(json["sbColorOnSurfaceVariant"] as String)
: ScanbotColor("#707070"),
sbColorOnSurface: json.containsKey("sbColorOnSurface")
? ScanbotColor(json["sbColorOnSurface"] as String)
: ScanbotColor("#000000"),
sbColorSurfaceLow: json.containsKey("sbColorSurfaceLow")
? ScanbotColor(json["sbColorSurfaceLow"] as String)
: ScanbotColor("#00000026"),
sbColorSurfaceHigh: json.containsKey("sbColorSurfaceHigh")
? ScanbotColor(json["sbColorSurfaceHigh"] as String)
: ScanbotColor("#0000007A"),
sbColorModalOverlay: json.containsKey("sbColorModalOverlay")
? ScanbotColor(json["sbColorModalOverlay"] as String)
: ScanbotColor("#000000A3"),
);