SingleAssetPicker constructor
const
SingleAssetPicker({
- Key? key,
- ValueChanged<
ExtendedAssetEntity> ? onChanged, - bool enablePicker = true,
- PickerErrorCallback? errorCallback,
- 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)], - CameraPickerPageRoute<
AssetEntity> pageRouteBuilderForCameraPicker(- Widget picker
- AssetPickerPageRouteBuilder<
List< ? pageRouteBuilderForAssetPicker,AssetEntity> > - PickerFromTypeBuilder? fromTypesBuilder,
- FlAssetFileRenovate? renovate,
- FlAssetsPickerCheckPermission? checkPermission,
- PickerAssetEntryBuilderConfig config = const PickerAssetEntryBuilderConfig(),
- SinglePickerEntryBuilder? builder,
- ExtendedAssetEntity? initialData,
- bool allowDelete = true,
Implementation
const SingleAssetPicker({
super.key,
this.onChanged,
super.enablePicker = true,
super.errorCallback,
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.pageRouteBuilderForCameraPicker,
super.pageRouteBuilderForAssetPicker,
super.fromTypesBuilder,
super.renovate,
super.checkPermission,
this.config = const PickerAssetEntryBuilderConfig(),
this.builder,
this.initialData,
this.allowDelete = true,
}) : super(maxCount: 1, maxVideoCount: 0);