Skip to content

Commit

Permalink
01/10/2023
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomjerry12345 committed Sep 30, 2023
1 parent a8bf97d commit 482064a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/screens/data_buku/data_buku.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ class _DataBukuState extends State<DataBuku> {
}

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;
Expand Down

0 comments on commit 482064a

Please sign in to comment.