From 720d84b0b5d09e7b3eb2db829d9e25c60782e6a2 Mon Sep 17 00:00:00 2001 From: Nikodem Bernat Date: Sat, 7 Sep 2024 21:06:14 +0200 Subject: [PATCH] Fix assertion --- lib/app_preferences.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/app_preferences.dart b/lib/app_preferences.dart index c06dc5e..ae74e26 100644 --- a/lib/app_preferences.dart +++ b/lib/app_preferences.dart @@ -55,6 +55,7 @@ class Preference extends ValueNotifier { initialValue is List || initialValue is List || initialValue is List || + initialValue is Enum || (fromJson != null && toJson != null), 'You have to provide a `fromJson` and `toJson` functions for custom `Preference` types.', ),