DocumentSelector constructor
DocumentSelector({
- Key? key,
- required bool editable,
- required String url,
- required dynamic onFileSelection(
- File? file
- bool cameraVisible = true,
- bool galleryVisible = true,
- bool handwritingVisible = true,
- String imageAsset = 'assets/images/card_sample.png',
- double height = 170,
- BoxShape shape = BoxShape.rectangle,
- dynamic onErrorMessage()?,
- String label = 'Select an image',
- String cameraPermissionErrorMessage = 'Please allow camera permission from Settings',
- String galleryPermissionErrorMessage = 'Please allow gallery permission from Settings',
- String imageNotSelectedMessage = 'You have not yet picked/captured an image.',
- Color iconsBackgroundColor = Colors.green,
- Color iconColor = Colors.white,
Implementation
DocumentSelector({
Key? key,
required this.editable,
required this.url,
required this.onFileSelection,
this.cameraVisible = true,
this.galleryVisible = true,
this.handwritingVisible = true,
this.imageAsset = 'assets/images/card_sample.png',
this.height = 170,
this.shape = BoxShape.rectangle,
this.onErrorMessage,
this.label = 'Select an image',
this.cameraPermissionErrorMessage =
'Please allow camera permission from Settings',
this.galleryPermissionErrorMessage =
'Please allow gallery permission from Settings',
this.imageNotSelectedMessage = 'You have not yet picked/captured an image.',
this.iconsBackgroundColor = Colors.green,
this.iconColor = Colors.white,
}) : super(key: key);