PickerStyle constructor

PickerStyle({
  1. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
  2. Color backgroundColor = Colors.white,
  3. Color textColor = Colors.black,
  4. Color selectIconBackgroundColor = Colors.white,
  5. Widget selectIcon = const Icon(Icons.check, color: Colors.black),
  6. bool isNeedDragIndicator = true,
  7. Border selectIconBorder = const Border(),
  8. Color dragIndicatorColor = Colors.grey,
  9. EdgeInsets mainPadding = const EdgeInsets.all(10),
  10. BorderRadius itemsBorderRadius = const BorderRadius.all(Radius.circular(10)),
  11. Color shimmerBaseColor = Colors.grey,
  12. Color shimmerHighlightColor = Colors.white,
  13. Alignment selectIconAlignment = Alignment.topRight,
  14. Color dividerColor = Colors.grey,
  15. Color selectedFolderTextColor = Colors.white,
  16. Color unselectedFolderTextColor = Colors.black,
  17. BoxDecoration selectedFolderDecoration = const BoxDecoration(color: Colors.blue, borderRadius: BorderRadius.all(Radius.circular(10))),
  18. BoxDecoration unselectedFolderDecoration = const BoxDecoration(color: Colors.grey, borderRadius: BorderRadius.all(Radius.circular(10))),
  19. BoxDecoration cameraContainerDecoration = const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(10))),
  20. Widget cameraIcon = const Icon(Icons.camera_alt, color: Colors.white),
  21. Widget? completeWidget,
  22. CloseAlertStyle? closeAlertStyle,
  23. Future<bool> showCustomAlert()?,
  24. Widget? typeSelectionWidget,
  25. double bottomPadding = 0,
  26. Widget folderDivider = const Divider(),
  27. Widget titleWidget = const Text('Select media'),
  28. Widget cameraAndGalleryUnavailableContent = const Text('There is no permission to access the camera and gallery'),
  29. Widget cameraUnavailableContent = const Text('There is no permission to access the camera'),
  30. Widget galleryUnavailableContent = const Text('There is no permission to access the gallery'),
  31. bool hasPermissionToCamera = true,
  32. bool hasPermissionToGallery = true,
  33. EdgeInsets cameraPreviewPadding = const EdgeInsets.all(16),
  34. int crossAxisCount = 4,
  35. double crossAxisSpacing = 4,
  36. double mainAxisSpacing = 4,
  37. Widget? unselectAssetIcon,
  38. Widget? customSelectAssetIcon,
  39. TextStyle? customSelectAssetCountStyle,
})

Picker style

Implementation

PickerStyle({
  this.borderRadius = const BorderRadius.all(Radius.circular(10)),
  this.backgroundColor = Colors.white,
  this.textColor = Colors.black,
  this.selectIconBackgroundColor = Colors.white,
  this.selectIcon = const Icon(Icons.check, color: Colors.black),
  this.isNeedDragIndicator = true,
  this.selectIconBorder = const Border(),
  this.dragIndicatorColor = Colors.grey,
  this.mainPadding = const EdgeInsets.all(10),
  this.itemsBorderRadius = const BorderRadius.all(Radius.circular(10)),
  this.shimmerBaseColor = Colors.grey,
  this.shimmerHighlightColor = Colors.white,
  this.selectIconAlignment = Alignment.topRight,
  this.dividerColor = Colors.grey,
  this.selectedFolderTextColor = Colors.white,
  this.unselectedFolderTextColor = Colors.black,
  this.selectedFolderDecoration = const BoxDecoration(
    color: Colors.blue,
    borderRadius: BorderRadius.all(
      Radius.circular(10),
    ),
  ),
  this.unselectedFolderDecoration = const BoxDecoration(
    color: Colors.grey,
    borderRadius: BorderRadius.all(
      Radius.circular(10),
    ),
  ),
  this.cameraContainerDecoration = const BoxDecoration(
    color: Colors.white,
    borderRadius: BorderRadius.all(Radius.circular(
      10,
    )),
  ),
  this.cameraIcon = const Icon(
    Icons.camera_alt,
    color: Colors.white,
  ),
  this.completeWidget,
  CloseAlertStyle? closeAlertStyle,
  this.showCustomAlert,
  this.typeSelectionWidget,
  this.bottomPadding = 0,
  this.folderDivider = const Divider(),
  this.titleWidget = const Text('Select media'),
  this.cameraAndGalleryUnavailableContent =
      const Text('There is no permission to access the camera and gallery'),
  this.cameraUnavailableContent = const Text('There is no permission to access the camera'),
  this.galleryUnavailableContent = const Text('There is no permission to access the gallery'),
  this.hasPermissionToCamera = true,
  this.hasPermissionToGallery = true,
  this.cameraPreviewPadding = const EdgeInsets.all(16),
  this.crossAxisCount = 4,
  this.crossAxisSpacing = 4,
  this.mainAxisSpacing = 4,
  this.unselectAssetIcon,
  this.customSelectAssetIcon,
  this.customSelectAssetCountStyle,
}) : _closeAlertStyle = closeAlertStyle ??
          CloseAlertStyle(
            title: 'Close',
            message: 'Are you sure you want to close?',
            positiveButtonText: 'Yes',
            negativeButtonText: 'No',
          );