open method

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

Implementation

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