We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
canTransitionFromPredicate
AssetPickerPageRoute
1 parent 2752b3c commit 6ed8423Copy full SHA for 6ed8423
lib/src/widget/asset_picker_page_route.dart
@@ -22,6 +22,7 @@ class AssetPickerPageRoute<T> extends PageRoute<T> {
22
this.barrierLabel,
23
this.maintainState = true,
24
this.opaque = true,
25
+ this.canTransitionFromPredicate,
26
});
27
28
final WidgetBuilder builder;
@@ -41,8 +42,11 @@ class AssetPickerPageRoute<T> extends PageRoute<T> {
41
42
@override
43
final bool maintainState;
44
45
+ final bool Function(TransitionRoute<dynamic>)? canTransitionFromPredicate;
46
+
47
- bool canTransitionFrom(TransitionRoute<dynamic> previousRoute) => false;
48
+ bool canTransitionFrom(TransitionRoute<dynamic> previousRoute) =>
49
+ canTransitionFromPredicate?.call(previousRoute) ?? false;
50
51
52
Widget buildPage(
0 commit comments