open method

Future<List<String>> open(
  1. BuildContext context, {
  2. List<String>? mimeTypes,
  3. String? title,
  4. String? thumbnailDirPath,
})

Implementation

Future<List<String>> open(
  BuildContext context, {
  List<String>? mimeTypes,
  String? title,
  String? thumbnailDirPath,
}) async {
  final completer = Completer<List<String>>();
  Navigator.push(
    context,
    MaterialPageRoute(
      builder:
          (context) => FileChooserScreen(
            title: title,
            mimeTypes: mimeTypes,
            onSelected: completer.complete,
            thumbnailDirPath: thumbnailDirPath,
          ),
    ),
  );
  return completer.future;
}