Skip to content

Upgrading cross_file 0.2 to 0.3

Breaking0.2.1 → 0.3.5+5Breaking2Platform7Deprecated1Changed9Fixed6Other12

BreakingUpgrade verdict

2 breaking changes and 6 platform requirement changes.

  • On the web, if a file has no modification time, lastModified now gives the epoch time (1 January 1970) rather than null.
  • This version is labeled breaking, but the maintainers' tests suggest existing code should keep working.
  • You now need Flutter 3.38 or Dart 3.10 or newer to use this package.
  • You need at least Flutter 3.32 and Dart 3.8 to use this version.
Top 5 of 9 that need code or config changes

Dart SDK requirement changed in 0.3.5+3: >=2.1.0 <3.0.0 → ^3.10.0.

No longer states a Flutter requirement from 0.3.3 (was >=1.22.0).

Breaking2
On web, lastModified returns the epoch time as a default value to keep the Future<DateTime> return type instead of null.
lastModified
Marks the release as a breaking change, though unit tests indicate the API should be backwards-compatible.
Platform6
Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
Updates minimum supported SDK version to Flutter 3.32/Dart 3.8.
Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
Deprecated1
Removes a few deprecated API usages.