DocumentSelector constructor

DocumentSelector({
  1. Key? key,
  2. required bool editable,
  3. required String url,
  4. required dynamic onFileSelection(
    1. File? file
    ),
  5. bool cameraVisible = true,
  6. bool galleryVisible = true,
  7. bool handwritingVisible = true,
  8. String imageAsset = 'assets/images/card_sample.png',
  9. double height = 170,
  10. BoxShape shape = BoxShape.rectangle,
  11. dynamic onErrorMessage(
    1. String?
    )?,
  12. String label = 'Select an image',
  13. String cameraPermissionErrorMessage = 'Please allow camera permission from Settings',
  14. String galleryPermissionErrorMessage = 'Please allow gallery permission from Settings',
  15. String imageNotSelectedMessage = 'You have not yet picked/captured an image.',
  16. Color iconsBackgroundColor = Colors.green,
  17. 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);