flutter_media_scanner

Use this plugin to refresh the filesystem after writing a file

Example

Scaffold(
        appBar: AppBar(
          title: const Text('FlutterMediaScanner example'),
        ),
        body: Center(
          child: OutlineButton(
            onPressed: () async {
              File originalFile = File("original path");
              List<int> bytes = await originalFile.readAsBytes();
              //save your file to your desired path
              File file = File("path");
              await file.writeAsBytes(bytes);
              //refresh the file system so the file can show there,
              await FlutterMediaScanner.scan(file.path);
            },
            child: const Text("Save & refresh!"),
          ),
        ),
)

Libraries

flutter_media_scanner