Skip to content

Commit 5c5dc6e

Browse files
committed
🚀 Expose useRootNavigator while picking
1 parent 9260fdb commit 5c5dc6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/widget/camera_picker.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,15 @@ class CameraPicker extends StatefulWidget {
143143
ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown,
144144
Widget Function(CameraValue)? foregroundBuilder,
145145
EntitySaveCallback? onEntitySaving,
146+
bool useRootNavigator = true,
146147
}) {
147148
if (enableRecording != true && onlyEnableRecording == true) {
148149
throw ArgumentError('Recording mode error.');
149150
}
150-
return Navigator.of(context, rootNavigator: true).push<AssetEntity>(
151+
return Navigator.of(
152+
context,
153+
rootNavigator: useRootNavigator,
154+
).push<AssetEntity>(
151155
SlidePageTransitionBuilder<AssetEntity>(
152156
builder: CameraPicker(
153157
enableRecording: enableRecording,

0 commit comments

Comments
 (0)