fix some deprecations
This commit is contained in:
@@ -187,9 +187,7 @@ class WebEngineSettingsScreen extends HookConsumerWidget {
|
|||||||
leading: Icon(MdiIcons.incognitoCircleOff),
|
leading: Icon(MdiIcons.incognitoCircleOff),
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
RadioListTile<TrackingProtectionPolicy>.adaptive(
|
RadioGroup(
|
||||||
value: TrackingProtectionPolicy.none,
|
|
||||||
title: const Text('Disabled'),
|
|
||||||
groupValue: engineSettings.trackingProtectionPolicy,
|
groupValue: engineSettings.trackingProtectionPolicy,
|
||||||
onChanged: (value) async {
|
onChanged: (value) async {
|
||||||
await ref
|
await ref
|
||||||
@@ -199,13 +197,15 @@ class WebEngineSettingsScreen extends HookConsumerWidget {
|
|||||||
.trackingProtectionPolicy(value),
|
.trackingProtectionPolicy(value),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
child:
|
||||||
|
const RadioListTile<
|
||||||
|
TrackingProtectionPolicy
|
||||||
|
>.adaptive(
|
||||||
|
value: TrackingProtectionPolicy.none,
|
||||||
|
title: Text('Disabled'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
RadioListTile<TrackingProtectionPolicy>.adaptive(
|
RadioGroup(
|
||||||
value: TrackingProtectionPolicy.recommended,
|
|
||||||
title: const Text('Standard'),
|
|
||||||
subtitle: const Text(
|
|
||||||
'Pages will load normally, but block fewer trackers.',
|
|
||||||
),
|
|
||||||
groupValue: engineSettings.trackingProtectionPolicy,
|
groupValue: engineSettings.trackingProtectionPolicy,
|
||||||
onChanged: (value) async {
|
onChanged: (value) async {
|
||||||
await ref
|
await ref
|
||||||
@@ -215,13 +215,15 @@ class WebEngineSettingsScreen extends HookConsumerWidget {
|
|||||||
.trackingProtectionPolicy(value),
|
.trackingProtectionPolicy(value),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
child: const RadioListTile<TrackingProtectionPolicy>.adaptive(
|
||||||
RadioListTile<TrackingProtectionPolicy>.adaptive(
|
value: TrackingProtectionPolicy.recommended,
|
||||||
value: TrackingProtectionPolicy.strict,
|
title: Text('Standard'),
|
||||||
title: const Text('Strict'),
|
subtitle: Text(
|
||||||
subtitle: const Text(
|
'Pages will load normally, but block fewer trackers.',
|
||||||
'Stronger tracking protection and faster performance, but some sites may not work properly.',
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
RadioGroup(
|
||||||
groupValue: engineSettings.trackingProtectionPolicy,
|
groupValue: engineSettings.trackingProtectionPolicy,
|
||||||
onChanged: (value) async {
|
onChanged: (value) async {
|
||||||
await ref
|
await ref
|
||||||
@@ -231,15 +233,27 @@ class WebEngineSettingsScreen extends HookConsumerWidget {
|
|||||||
.trackingProtectionPolicy(value),
|
.trackingProtectionPolicy(value),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
child: const RadioListTile<TrackingProtectionPolicy>.adaptive(
|
||||||
RadioListTile<TrackingProtectionPolicy>.adaptive(
|
value: TrackingProtectionPolicy.strict,
|
||||||
value: TrackingProtectionPolicy.custom,
|
title: Text('Strict'),
|
||||||
title: const Text('Custom'),
|
subtitle: Text(
|
||||||
subtitle: const Text(
|
'Stronger tracking protection and faster performance, but some sites may not work properly.',
|
||||||
'Choose which trackers and scripts to block.',
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
RadioGroup(
|
||||||
groupValue: engineSettings.trackingProtectionPolicy,
|
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.',
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ class _AnimateGradientShaderState extends State<AnimateGradientShader>
|
|||||||
_controller =
|
_controller =
|
||||||
(widget.controller ??
|
(widget.controller ??
|
||||||
AnimationController(vsync: this, duration: widget.duration))
|
AnimationController(vsync: this, duration: widget.duration))
|
||||||
|
// ignore: discarded_futures
|
||||||
..repeat(reverse: widget.reverse);
|
..repeat(reverse: widget.reverse);
|
||||||
|
|
||||||
_animation = CurvedAnimation(parent: _controller!, curve: Curves.easeInOut);
|
_animation = CurvedAnimation(parent: _controller!, curve: Curves.easeInOut);
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
@@ -160,17 +162,17 @@ class _AnimatedIndexedStackState extends State<AnimatedIndexedStack>
|
|||||||
_moveToEnd(entries, entry);
|
_moveToEnd(entries, entry);
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case _ChildAnimationDirection.primaryForward:
|
case _ChildAnimationDirection.primaryForward:
|
||||||
entry.primaryController.forward(from: 0);
|
unawaited(entry.primaryController.forward(from: 0));
|
||||||
entry.secondaryController.value = 0;
|
entry.secondaryController.value = 0;
|
||||||
case _ChildAnimationDirection.primaryReverse:
|
case _ChildAnimationDirection.primaryReverse:
|
||||||
entry.primaryController.reverse(from: 1);
|
unawaited(entry.primaryController.reverse(from: 1));
|
||||||
entry.secondaryController.value = 0;
|
entry.secondaryController.value = 0;
|
||||||
case _ChildAnimationDirection.secondaryForward:
|
case _ChildAnimationDirection.secondaryForward:
|
||||||
entry.primaryController.value = 1;
|
entry.primaryController.value = 1;
|
||||||
entry.secondaryController.forward(from: 0);
|
unawaited(entry.secondaryController.forward(from: 0));
|
||||||
case _ChildAnimationDirection.secondaryReverse:
|
case _ChildAnimationDirection.secondaryReverse:
|
||||||
entry.primaryController.value = 1;
|
entry.primaryController.value = 1;
|
||||||
entry.secondaryController.reverse(from: 1);
|
unawaited(entry.secondaryController.reverse(from: 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user