diff --git a/lib/models/isar/sw_theme.dart b/lib/models/isar/sw_theme.dart index 969b25dec..9b1b117b9 100644 --- a/lib/models/isar/sw_theme.dart +++ b/lib/models/isar/sw_theme.dart @@ -65,7 +65,7 @@ class StackTheme { } else { _gradientBackground ??= GradientExt.fromJson( Map.from( - jsonDecode(gradientBackgroundString!) as Map, + jsonDecode(gradientBackgroundString) as Map, ), ); } @@ -1650,9 +1650,7 @@ class StackTheme { parseColor(json["colors"]["background"]["background"] as String), backgroundAppBarInt: parseColor( json["colors"]["background"]["backgroundAppBar"] as String), - gradientBackgroundString: json["gradients"]["background"] == null - ? null - : jsonEncode(json["gradients"]["background"] as Map), + gradientBackgroundString: jsonEncode(json["gradients"] ?? ["background"]), standardBoxShadowString: jsonEncode(json["box_shadows"]["standard"] as Map), homeViewButtonBarBoxShadowString: