refactor: migrate appSettingsProvider ✅
Phase 5.4 Complete (4/5) - appSettingsProvider → appSettingsNotifierProvider - High complexity NotifierProvider with many methods - 26 usages across 6 files updated automatically - Data class AppSettings unchanged
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'animation_service.dart';
|
||||
|
||||
part 'settings_service.g.dart';
|
||||
|
||||
/// Service for managing app-wide settings including accessibility preferences
|
||||
class SettingsService {
|
||||
static const String _reduceMotionKey = 'reduce_motion';
|
||||
@@ -404,11 +407,8 @@ bool _listEquals(List<String> a, List<String> b) {
|
||||
}
|
||||
|
||||
/// Provider for app settings
|
||||
final appSettingsProvider = NotifierProvider<AppSettingsNotifier, AppSettings>(
|
||||
AppSettingsNotifier.new,
|
||||
);
|
||||
|
||||
class AppSettingsNotifier extends Notifier<AppSettings> {
|
||||
@riverpod
|
||||
class AppSettingsNotifier extends _$AppSettingsNotifier {
|
||||
bool _initialized = false;
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user