Refactor code structure for improved readability and maintainability
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ class _ReceiptImportTabState extends ConsumerState<ReceiptImportTab> {
|
||||
List<ParsedReceiptItem>? _items;
|
||||
|
||||
Future<void> _pickFile() async {
|
||||
final result = await FilePicker.platform.pickFiles(
|
||||
final result = await FilePicker.pickFiles(
|
||||
type: FileType.custom,
|
||||
allowedExtensions: ['pdf', 'png', 'jpg', 'jpeg', 'webp', 'bmp'],
|
||||
withData: true,
|
||||
|
||||
@@ -42,7 +42,7 @@ class _RecipeImportTabState extends ConsumerState<RecipeImportTab> {
|
||||
// ── File picker ──────────────────────────────────────────────────────────
|
||||
|
||||
Future<void> _pickFile() async {
|
||||
final result = await FilePicker.platform.pickFiles(
|
||||
final result = await FilePicker.pickFiles(
|
||||
type: FileType.custom,
|
||||
allowedExtensions: _allowedExtensions,
|
||||
withData: true, // needed on Flutter web to get bytes
|
||||
|
||||
Reference in New Issue
Block a user