Skip to content

Migrate to v0.5.0

There's major breaking changes when updating to v0.5.0, be careful.

Update your pubspec.yaml:

  shared_storage: ^0.5.0

Return type of listFiles

Instead of:

Stream<PartialDocumentFile> fileStream = listFiles(uri);


Stream<DocumentFile> fileStream = listFiles(uri);

And when reading data from each file:

// Old.
PartialDocumentFile file = ...

String displayName =![DocumentFileColumn.displayName] as String;
DateTime lastModified = DateTime.fromMillisecondsSinceEpoch(![DocumentFileColumn.lastModified] as int);

// New.
DocumentFile file = ...

String displayName =;
DateTime lastModified = file.lastModified;

It now parses all fields as class fields instead Map<DocumentFileColumn, dynamic> hash map.