PickerScaffold constructor

PickerScaffold({
  1. Key? key,
  2. required dynamic onSelect(
    1. List<MediaFile> selectedMedia
    ),
  3. Widget? body,
  4. PreferredSizeWidget? appBar,
  5. Widget? floatingActionButton,
  6. FloatingActionButtonLocation? floatingActionButtonLocation,
  7. FloatingActionButtonAnimator? floatingActionButtonAnimator,
  8. List<Widget>? persistentFooterButtons,
  9. AlignmentDirectional persistentFooterAlignment = AlignmentDirectional.centerEnd,
  10. Widget? drawer,
  11. DrawerCallback? onDrawerChanged,
  12. Widget? endDrawer,
  13. DrawerCallback? onEndDrawerChanged,
  14. Widget? bottomNavigationBar,
  15. Color? backgroundColor,
  16. double bottomSheetMinHeight = 0,
  17. bool? resizeToAvoidBottomInset,
  18. bool primary = true,
  19. DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
  20. bool extendBody = false,
  21. bool extendBodyBehindAppBar = false,
  22. Color? drawerScrimColor,
  23. double? drawerEdgeDragWidth,
  24. bool drawerEnableOpenDragGesture = true,
  25. bool endDrawerEnableOpenDragGesture = true,
  26. String? restorationId,
  27. Config? config,
  28. Widget heroBuilder(
    1. String tag,
    2. MediaFile media,
    3. BuildContext context
    )?,
  29. List<MediaFile>? initSelectedMedia,
  30. List<MediaFile>? extraRecentMedia,
  31. bool singleMedia = false,
  32. Widget multipleMediaBuilder(
    1. List<MediaFile> media,
    2. BuildContext context
    )?,
  33. 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!);
    }
  }
}