showBottomSheetAttachment method
Implementation
showBottomSheetAttachment(BuildContext context) {
AppPermission.askNotificationPermission(context).then((value) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
enableDrag: false,
builder: (BuildContext bottomSheetContext) {
return Container(
margin:
const EdgeInsets.only(right: 18.0, left: 18.0, bottom: 18.0),
child: BottomSheet(
onClosing: () {},
enableDrag: false,
backgroundColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15)),
builder: (builder) => AttachmentsSheetView(
attachments: availableAttachments,
availableFeatures: availableFeatures,
onDocument: () {
Navigator.pop(bottomSheetContext);
documentPickUpload(context);
},
onCamera: () {
Navigator.pop(bottomSheetContext);
onCameraClick(context);
},
onGallery: () {
Navigator.pop(bottomSheetContext);
onGalleryClick(context);
},
onAudio: () {
Navigator.pop(bottomSheetContext);
onAudioClick(context);
},
onContact: () {
Navigator.pop(bottomSheetContext);
onContactClick(context);
},
onLocation: () {
Navigator.pop(bottomSheetContext);
onLocationClick(context);
})),
);
},
useSafeArea: true,
);
});
}