Skip to content

Commit 6a82d95

Browse files
committed
refactor(dependencies): simplify JSON deserialization functions
- Replace lambda functions with direct method references for improved readability - Update userAppSettingsRepository and userContentPreferencesRepository initializers
1 parent e6c4e6b commit 6a82d95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/config/app_dependencies.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class AppDependencies {
165165
userAppSettingsRepository = _createRepository(
166166
connection,
167167
'user_app_settings',
168-
(json) => UserAppSettings.fromJson(json),
168+
UserAppSettings.fromJson,
169169
(settings) {
170170
final json = settings.toJson();
171171
// These fields are complex objects and must be JSON encoded for the DB.
@@ -177,7 +177,7 @@ class AppDependencies {
177177
userContentPreferencesRepository = _createRepository(
178178
connection,
179179
'user_content_preferences',
180-
(json) => UserContentPreferences.fromJson(json),
180+
UserContentPreferences.fromJson,
181181
(preferences) {
182182
final json = preferences.toJson();
183183
// These fields are lists of complex objects and must be JSON encoded.

0 commit comments

Comments
 (0)