File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 0.3.3+4
2+
3+ * Reverts an accidental change in a constructor argument's nullability.
4+
15## 0.3.3+3
26
7+ * ** RETRACTED**
38* Updates code to fix strict-cast violations.
49* Updates minimum SDK version to Flutter 3.0.
510
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class XFile extends XFileBase {
2222 /// `path` of the file doesn't match what the user sees when selecting it
2323 /// (like in web)
2424 XFile (
25- super .path, {
25+ String super .path, {
2626 String ? mimeType,
2727 String ? name,
2828 int ? length,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: cross_file
22description : An abstraction to allow working with files across multiple platforms.
33repository : https://github.com/flutter/packages/tree/main/packages/cross_file
44issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+cross_file%22
5- version : 0.3.3+3
5+ version : 0.3.3+4
66
77environment :
88 sdk : " >=2.17.0 <3.0.0"
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ void main() {
7070
7171 await tempDir.delete (recursive: true );
7272 });
73+
74+ test ('nullability is correct' , () async {
75+ expect (_ensureNonnullPathArgument ('a/path' ), isNotNull);
76+ });
7377 });
7478
7579 group ('Create with data' , () {
@@ -107,6 +111,13 @@ void main() {
107111 });
108112}
109113
114+ // This is to create an analysis error if the version of XFile in
115+ // interface.dart, which should never actually be used but is what the analyzer
116+ // runs against, has the nullability of `path` changed.
117+ XFile _ensureNonnullPathArgument (String ? path) {
118+ return XFile (path! );
119+ }
120+
110121/// An XFile subclass that tracks reads, for testing purposes.
111122class TestXFile extends XFile {
112123 TestXFile (super .path);
You can’t perform that action at this time.
0 commit comments