From 5b87c8cc382473513ab29e4f62b554db808d1765 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 2 Jan 2023 09:19:30 +0100 Subject: [PATCH] feat: opening text files now show file name and it's content --- lib/src/inputs/input_file.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/src/inputs/input_file.dart b/lib/src/inputs/input_file.dart index a1221eb..7b428ad 100644 --- a/lib/src/inputs/input_file.dart +++ b/lib/src/inputs/input_file.dart @@ -68,8 +68,17 @@ class MediaPickerInputFile implements MediaPickerInput { case '.pdf': case '.doc': case '.docx': - case '.txt': return Text(result.fileName!); + case '.txt': + return Column(mainAxisSize: MainAxisSize.min, children: [ + Text(result.fileName!), + const SizedBox( + height: 20, + ), + Center( + child: Text(String.fromCharCodes(result.fileValue!)), + ) + ]); default: } }