PickerScaffold constructor
PickerScaffold({
- Key? key,
- required dynamic onSelect(),
- Widget? body,
- PreferredSizeWidget? appBar,
- Widget? floatingActionButton,
- FloatingActionButtonLocation? floatingActionButtonLocation,
- FloatingActionButtonAnimator? floatingActionButtonAnimator,
- Widget? drawer,
- DrawerCallback? onDrawerChanged,
- Widget? endDrawer,
- DrawerCallback? onEndDrawerChanged,
- Color? backgroundColor,
- double bottomSheetMinHeight = 0,
- bool? resizeToAvoidBottomInset,
- bool primary = true,
- DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
- bool extendBody = false,
- bool extendBodyBehindAppBar = false,
- Color? drawerScrimColor,
- double? drawerEdgeDragWidth,
- bool drawerEnableOpenDragGesture = true,
- bool endDrawerEnableOpenDragGesture = true,
- String? restorationId,
- Config? config,
- Widget heroBuilder(
- String tag,
- MediaFile media,
- BuildContext context
- List<
MediaFile> ? initSelectedMedia, - List<
MediaFile> ? extraRecentMedia, - bool singleMedia = false,
- Widget multipleMediaBuilder(
- List<
MediaFile> media, - BuildContext context
- List<
- Future<
bool> onWillPop()?,
Implementation
PickerScaffold({
super.key,
required this.onSelect,
this.body,
this.appBar,
this.floatingActionButton,
this.floatingActionButtonLocation,
this.floatingActionButtonAnimator,
this.persistentFooterButtons,
this.persistentFooterAlignment = AlignmentDirectional.centerEnd,
this.drawer,
this.onDrawerChanged,
this.endDrawer,
this.onEndDrawerChanged,
this.bottomNavigationBar,
this.backgroundColor,
this.bottomSheetMinHeight = 0,
this.resizeToAvoidBottomInset,
this.primary = true,
this.drawerDragStartBehavior = DragStartBehavior.start,
this.extendBody = false,
this.extendBodyBehindAppBar = false,
this.drawerScrimColor,
this.drawerEdgeDragWidth,
this.drawerEnableOpenDragGesture = true,
this.endDrawerEnableOpenDragGesture = true,
this.restorationId,
this.config,
this.heroBuilder,
this.initSelectedMedia,
this.extraRecentMedia,
this.singleMedia = false,
this.multipleMediaBuilder,
this.onWillPop,
}) {
if (GetInstance().isRegistered<PhoneGalleryController>()) {
if (initSelectedMedia != null) {
Get.find<PhoneGalleryController>()
.updateSelectedFiles(initSelectedMedia!);
}
if (extraRecentMedia != null) {
Get.find<PhoneGalleryController>()
.updateExtraRecentMedia(extraRecentMedia!);
}
}
}