From 482064a8dea79b98fee184611dc2cf73f305ad1d Mon Sep 17 00:00:00 2001 From: Tomjerry Date: Sun, 1 Oct 2023 03:39:46 +0800 Subject: [PATCH] 01/10/2023 --- lib/screens/data_buku/data_buku.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/screens/data_buku/data_buku.dart b/lib/screens/data_buku/data_buku.dart index de29ca7..a4a1a58 100644 --- a/lib/screens/data_buku/data_buku.dart +++ b/lib/screens/data_buku/data_buku.dart @@ -211,7 +211,10 @@ class _DataBukuState extends State { } void _pickPDF(Function setFile) async { - FilePickerResult? result = await FilePickerWeb.platform.pickFiles(); + FilePickerResult? result = await FilePickerWeb.platform.pickFiles( + type: FileType.custom, + allowedExtensions: ['pdf'], + ); if (result != null) { Uint8List? fileBytes = result.files.first.bytes; String fileName = result.files.first.name;