ProfilePicture constructor
ProfilePicture({
- Key? key,
- required bool editable,
- required String url,
- required dynamic onFileSelection(
- File? file
- bool cameraVisible = true,
- bool galleryVisible = true,
- String? imageAsset = 'assets/images/person.png',
- double height = 140,
- double width = 140,
- BoxShape shape = BoxShape.rectangle,
- dynamic onErrorMessage()?,
- String label = 'Select',
- 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.',
- CameraDevice preferredCameraDevice = CameraDevice.rear,
Implementation
ProfilePicture({
Key? key,
required this.editable,
required this.url,
required this.onFileSelection,
this.cameraVisible = true,
this.galleryVisible = true,
this.imageAsset = 'assets/images/person.png',
this.height = 140,
this.width = 140,
this.shape = BoxShape.rectangle,
this.onErrorMessage,
this.label = 'Select',
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.preferredCameraDevice = CameraDevice.rear,
}) : super(key: key);