mirror of
https://github.com/foss42/apidash.git
synced 2025-05-30 13:27:09 +08:00
Refactor code
This commit is contained in:
20
lib/widgets/dialog_import.dart
Normal file
20
lib/widgets/dialog_import.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:file_selector/file_selector.dart';
|
||||
import 'drag_and_drop_area.dart';
|
||||
|
||||
showImportDialog(
|
||||
BuildContext context,
|
||||
Function(XFile) onFileDropped,
|
||||
) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
contentPadding: const EdgeInsets.all(12),
|
||||
content: DragAndDropArea(
|
||||
onFileDropped: onFileDropped,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user