MultiAssetPicker constructor

const MultiAssetPicker({
  1. Key? key,
  2. ValueChanged<List<ExtendedAssetEntity>>? onChanged,
  3. AssetsPickerController? controller,
  4. PickerAssetEntryBuilderConfig entryConfig = const PickerAssetEntryBuilderConfig(),
  5. MultiPickerEntryBuilder? entryBuilder,
  6. PickerWrapBuilderConfig wrapConfig = const PickerWrapBuilderConfig(),
  7. PickerWrapBuilder? wrapBuilder,
  8. List<ExtendedAssetEntity> initialData = const [],
  9. bool allowDelete = true,
  10. PickerIconBuilder? pickerIconBuilder,
  11. bool enablePicker = true,
  12. PickerErrorCallback? errorCallback,
  13. int maxVideoCount = 1,
  14. int maxCount = 9,
  15. List<PickerFromTypeConfig> fromRequestTypes = const [PickerFromTypeConfig(fromType: PickerFromType.assets, text: Text('图库选择'), requestType: RequestType.common), PickerFromTypeConfig(fromType: PickerFromType.camera, text: Text('相机拍摄'), requestType: RequestType.common), PickerFromTypeConfig(fromType: PickerFromType.cancel, text: Text('取消'), requestType: RequestType.common)],
  16. FlAssetFileRenovate? renovate,
  17. CameraPickerPageRoute<AssetEntity> pageRouteBuilderForCameraPicker(
    1. Widget picker
    )?,
  18. AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilderForAssetPicker,
  19. PickerFromTypeBuilder? fromTypesBuilder,
  20. FlAssetsPickerCheckPermission? checkPermission,
  21. FlPreviewAssetsBuilder? previewBuilder,
  22. FlPreviewAssetsSheetRouteBuilder? previewSheetRouteBuilder,
})

Implementation

const MultiAssetPicker({
  super.key,
  this.onChanged,
  this.controller,
  this.entryConfig = const PickerAssetEntryBuilderConfig(),
  this.entryBuilder,
  this.wrapConfig = const PickerWrapBuilderConfig(),
  this.wrapBuilder,
  this.initialData = const [],
  this.allowDelete = true,
  this.pickerIconBuilder,
  super.enablePicker = true,
  super.errorCallback,
  super.maxVideoCount = 1,
  super.maxCount = 9,
  super.fromRequestTypes = const [
    PickerFromTypeConfig(
        fromType: PickerFromType.assets,
        text: Text('图库选择'),
        requestType: RequestType.common),
    PickerFromTypeConfig(
        fromType: PickerFromType.camera,
        text: Text('相机拍摄'),
        requestType: RequestType.common),
    PickerFromTypeConfig(
        fromType: PickerFromType.cancel,
        text: Text('取消'),
        requestType: RequestType.common),
  ],
  super.renovate,
  super.pageRouteBuilderForCameraPicker,
  super.pageRouteBuilderForAssetPicker,
  super.fromTypesBuilder,
  super.checkPermission,
  this.previewBuilder,
  this.previewSheetRouteBuilder,
});