diff --git a/app/lib/features/settings/presentation/screens/web_engine_settings.dart b/app/lib/features/settings/presentation/screens/web_engine_settings.dart index 66998b20..549a6dde 100644 --- a/app/lib/features/settings/presentation/screens/web_engine_settings.dart +++ b/app/lib/features/settings/presentation/screens/web_engine_settings.dart @@ -187,9 +187,7 @@ class WebEngineSettingsScreen extends HookConsumerWidget { leading: Icon(MdiIcons.incognitoCircleOff), contentPadding: EdgeInsets.zero, ), - RadioListTile.adaptive( - value: TrackingProtectionPolicy.none, - title: const Text('Disabled'), + RadioGroup( groupValue: engineSettings.trackingProtectionPolicy, onChanged: (value) async { await ref @@ -199,13 +197,15 @@ class WebEngineSettingsScreen extends HookConsumerWidget { .trackingProtectionPolicy(value), ); }, + child: + const RadioListTile< + TrackingProtectionPolicy + >.adaptive( + value: TrackingProtectionPolicy.none, + title: Text('Disabled'), + ), ), - RadioListTile.adaptive( - value: TrackingProtectionPolicy.recommended, - title: const Text('Standard'), - subtitle: const Text( - 'Pages will load normally, but block fewer trackers.', - ), + RadioGroup( groupValue: engineSettings.trackingProtectionPolicy, onChanged: (value) async { await ref @@ -215,13 +215,15 @@ class WebEngineSettingsScreen extends HookConsumerWidget { .trackingProtectionPolicy(value), ); }, - ), - RadioListTile.adaptive( - value: TrackingProtectionPolicy.strict, - title: const Text('Strict'), - subtitle: const Text( - 'Stronger tracking protection and faster performance, but some sites may not work properly.', + child: const RadioListTile.adaptive( + value: TrackingProtectionPolicy.recommended, + title: Text('Standard'), + subtitle: Text( + 'Pages will load normally, but block fewer trackers.', + ), ), + ), + RadioGroup( groupValue: engineSettings.trackingProtectionPolicy, onChanged: (value) async { await ref @@ -231,15 +233,27 @@ class WebEngineSettingsScreen extends HookConsumerWidget { .trackingProtectionPolicy(value), ); }, - ), - RadioListTile.adaptive( - value: TrackingProtectionPolicy.custom, - title: const Text('Custom'), - subtitle: const Text( - 'Choose which trackers and scripts to block.', + child: const RadioListTile.adaptive( + value: TrackingProtectionPolicy.strict, + title: Text('Strict'), + subtitle: Text( + 'Stronger tracking protection and faster performance, but some sites may not work properly.', + ), ), + ), + RadioGroup( groupValue: engineSettings.trackingProtectionPolicy, - onChanged: null, + onChanged: (_) {}, + child: + const RadioListTile< + TrackingProtectionPolicy + >.adaptive( + value: TrackingProtectionPolicy.custom, + title: Text('Custom'), + subtitle: Text( + 'Choose which trackers and scripts to block.', + ), + ), ), ], ), diff --git a/app/lib/presentation/widgets/animate_gradient_shader.dart b/app/lib/presentation/widgets/animate_gradient_shader.dart index 00cf6650..2dd52277 100644 --- a/app/lib/presentation/widgets/animate_gradient_shader.dart +++ b/app/lib/presentation/widgets/animate_gradient_shader.dart @@ -224,6 +224,7 @@ class _AnimateGradientShaderState extends State _controller = (widget.controller ?? AnimationController(vsync: this, duration: widget.duration)) + // ignore: discarded_futures ..repeat(reverse: widget.reverse); _animation = CurvedAnimation(parent: _controller!, curve: Curves.easeInOut); diff --git a/app/lib/presentation/widgets/animated_indexed_stack.dart b/app/lib/presentation/widgets/animated_indexed_stack.dart index e8125f83..891cd0e1 100644 --- a/app/lib/presentation/widgets/animated_indexed_stack.dart +++ b/app/lib/presentation/widgets/animated_indexed_stack.dart @@ -17,6 +17,8 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +import 'dart:async'; + import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; @@ -160,17 +162,17 @@ class _AnimatedIndexedStackState extends State _moveToEnd(entries, entry); switch (direction) { case _ChildAnimationDirection.primaryForward: - entry.primaryController.forward(from: 0); + unawaited(entry.primaryController.forward(from: 0)); entry.secondaryController.value = 0; case _ChildAnimationDirection.primaryReverse: - entry.primaryController.reverse(from: 1); + unawaited(entry.primaryController.reverse(from: 1)); entry.secondaryController.value = 0; case _ChildAnimationDirection.secondaryForward: entry.primaryController.value = 1; - entry.secondaryController.forward(from: 0); + unawaited(entry.secondaryController.forward(from: 0)); case _ChildAnimationDirection.secondaryReverse: entry.primaryController.value = 1; - entry.secondaryController.reverse(from: 1); + unawaited(entry.secondaryController.reverse(from: 1)); } }