mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-19 08:53:45 +02:00
feat: opening text files now show file name and it's content
This commit is contained in:
parent
4d9f760418
commit
5b87c8cc38
1 changed files with 10 additions and 1 deletions
|
@ -68,8 +68,17 @@ class MediaPickerInputFile implements MediaPickerInput {
|
||||||
case '.pdf':
|
case '.pdf':
|
||||||
case '.doc':
|
case '.doc':
|
||||||
case '.docx':
|
case '.docx':
|
||||||
case '.txt':
|
|
||||||
return Text(result.fileName!);
|
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:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue