check if gradientBackground is null

This commit is contained in:
ryleedavis 2023-04-25 07:49:50 -06:00
parent c206ed3e77
commit fbc61403d8

View file

@ -65,7 +65,7 @@ class StackTheme {
} else { } else {
_gradientBackground ??= GradientExt.fromJson( _gradientBackground ??= GradientExt.fromJson(
Map<String, dynamic>.from( Map<String, dynamic>.from(
jsonDecode(gradientBackgroundString!) as Map, jsonDecode(gradientBackgroundString) as Map,
), ),
); );
} }
@ -1650,9 +1650,7 @@ class StackTheme {
parseColor(json["colors"]["background"]["background"] as String), parseColor(json["colors"]["background"]["background"] as String),
backgroundAppBarInt: parseColor( backgroundAppBarInt: parseColor(
json["colors"]["background"]["backgroundAppBar"] as String), json["colors"]["background"]["backgroundAppBar"] as String),
gradientBackgroundString: json["gradients"]["background"] == null gradientBackgroundString: jsonEncode(json["gradients"] ?? ["background"]),
? null
: jsonEncode(json["gradients"]["background"] as Map),
standardBoxShadowString: standardBoxShadowString:
jsonEncode(json["box_shadows"]["standard"] as Map), jsonEncode(json["box_shadows"]["standard"] as Map),
homeViewButtonBarBoxShadowString: homeViewButtonBarBoxShadowString: