Skip to content

Commit a58b5d6

Browse files
authored
✨ Add control for root navigator (#120)
1 parent 1368b45 commit a58b5d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/widget/asset_picker.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class AssetPicker<A, P> extends StatelessWidget {
3939
IndicatorBuilder? loadingIndicatorBuilder,
4040
SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
4141
bool allowSpecialItemWhenEmpty = false,
42+
bool useRootNavigator = true,
4243
Curve routeCurve = Curves.easeIn,
4344
Duration routeDuration = const Duration(milliseconds: 300),
4445
}) async {
@@ -108,7 +109,7 @@ class AssetPicker<A, P> extends StatelessWidget {
108109
);
109110
final List<AssetEntity>? result = await Navigator.of(
110111
context,
111-
rootNavigator: true,
112+
rootNavigator: useRootNavigator,
112113
).push<List<AssetEntity>>(
113114
SlidePageTransitionBuilder<List<AssetEntity>>(
114115
builder: picker,

0 commit comments

Comments
 (0)