From e25a763d9de5312050cbf6edfd199e6a448d6d02 Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Tue, 30 Sep 2025 15:01:47 +0530 Subject: [PATCH] =?UTF-8?q?refactor:=20migrate=20appSettingsProvider=20?= =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/core/services/settings_service.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/services/settings_service.dart b/lib/core/services/settings_service.dart index 8eafddd..c268528 100644 --- a/lib/core/services/settings_service.dart +++ b/lib/core/services/settings_service.dart @@ -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 a, List b) { } /// Provider for app settings -final appSettingsProvider = NotifierProvider( - AppSettingsNotifier.new, -); - -class AppSettingsNotifier extends Notifier { +@riverpod +class AppSettingsNotifier extends _$AppSettingsNotifier { bool _initialized = false; @override