diff options
Diffstat (limited to 'lib/presentation/screens/settings/settings_screens')
7 files changed, 10 insertions, 9 deletions
diff --git a/lib/presentation/screens/settings/settings_screens/bluetooth/widgets/bluetooth_content.dart b/lib/presentation/screens/settings/settings_screens/bluetooth/widgets/bluetooth_content.dart index 3fbb75f..1a6de4e 100644 --- a/lib/presentation/screens/settings/settings_screens/bluetooth/widgets/bluetooth_content.dart +++ b/lib/presentation/screens/settings/settings_screens/bluetooth/widgets/bluetooth_content.dart @@ -75,7 +75,7 @@ class BluetoothContentState extends ConsumerState<BluetoothContent> { title: "Bluetooth", hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Expanded( diff --git a/lib/presentation/screens/settings/settings_screens/date_time/date_time_screen.dart b/lib/presentation/screens/settings/settings_screens/date_time/date_time_screen.dart index acc1541..8ab55c1 100644 --- a/lib/presentation/screens/settings/settings_screens/date_time/date_time_screen.dart +++ b/lib/presentation/screens/settings/settings_screens/date_time/date_time_screen.dart @@ -19,7 +19,7 @@ class DateTimePage extends ConsumerWidget { title: 'Date & Time', hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Expanded( diff --git a/lib/presentation/screens/settings/settings_screens/profiles/widgets/profiles_content.dart b/lib/presentation/screens/settings/settings_screens/profiles/widgets/profiles_content.dart index 48e1565..3fc895b 100644 --- a/lib/presentation/screens/settings/settings_screens/profiles/widgets/profiles_content.dart +++ b/lib/presentation/screens/settings/settings_screens/profiles/widgets/profiles_content.dart @@ -35,7 +35,7 @@ class ProfilesContentState extends ConsumerState<ProfilesContent> { title: "Profiles", hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Expanded( diff --git a/lib/presentation/screens/settings/settings_screens/units/units_screen.dart b/lib/presentation/screens/settings/settings_screens/units/units_screen.dart index ba84471..181eeb9 100644 --- a/lib/presentation/screens/settings/settings_screens/units/units_screen.dart +++ b/lib/presentation/screens/settings/settings_screens/units/units_screen.dart @@ -18,7 +18,7 @@ class UnitsPage extends ConsumerWidget { title: 'Units', hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Expanded( diff --git a/lib/presentation/screens/settings/settings_screens/version_info/version_info_screend.dart b/lib/presentation/screens/settings/settings_screens/version_info/version_info_screend.dart index c5e571d..3b973a4 100644 --- a/lib/presentation/screens/settings/settings_screens/version_info/version_info_screend.dart +++ b/lib/presentation/screens/settings/settings_screens/version_info/version_info_screend.dart @@ -41,7 +41,7 @@ class VersionInfoPage extends ConsumerWidget { title: 'Version Information', hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Padding( diff --git a/lib/presentation/screens/settings/settings_screens/wifi/widgets/wifi_content.dart b/lib/presentation/screens/settings/settings_screens/wifi/widgets/wifi_content.dart index 2473847..1fbeeb5 100644 --- a/lib/presentation/screens/settings/settings_screens/wifi/widgets/wifi_content.dart +++ b/lib/presentation/screens/settings/settings_screens/wifi/widgets/wifi_content.dart @@ -72,7 +72,7 @@ class WifiContentState extends ConsumerState<WifiContent> { title: "Wifi", hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + ref.read(appProvider.notifier).back(); }, ), Expanded( diff --git a/lib/presentation/screens/settings/settings_screens/wired/wired_screen.dart b/lib/presentation/screens/settings/settings_screens/wired/wired_screen.dart index 1d2e679..8aeab70 100644 --- a/lib/presentation/screens/settings/settings_screens/wired/wired_screen.dart +++ b/lib/presentation/screens/settings/settings_screens/wired/wired_screen.dart @@ -9,12 +9,13 @@ class WiredPage extends ConsumerWidget { static Page<void> page() => const MaterialPage<void>(child: WiredPage()); @override Widget build(BuildContext context, WidgetRef ref) { - return const Scaffold(body: WiredScreen()); + return Scaffold(body: WiredScreen(ref: ref)); } } class WiredScreen extends StatefulWidget { - const WiredScreen({super.key}); + WidgetRef ref; + WiredScreen({super.key, required this.ref}); @override State<WiredScreen> createState() => _WiredScreenState(); @@ -81,7 +82,7 @@ class _WiredScreenState extends State<WiredScreen> { title: 'Wired', hasBackButton: true, onPressed: () { - context.flow<AppState>().update((state) => AppState.settings); + widget.ref.read(appProvider.notifier).back(); }, ), Expanded(child: ListView.separated( |