onGalleryTapEvent method

void onGalleryTapEvent()

Implementation

void onGalleryTapEvent() async {
  final result = await FilePicker.platform.pickFiles(
    allowMultiple: true,
    type: FileType.custom,
    allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'mp4', 'mov', 'avi', 'mkv'],
  );
  if (result != null) {
    final files = result.paths.map((e) => File(e!)).toList();
    onGalleryTap?.call(files);
  }
}