File tree Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 0.2.0
2+
3+ * ** breaking change** Make sure the ` saveTo ` method returns a ` Future ` so it can be awaited and users are sure the file has been written to disk.
4+
15## 0.1.0+2
26
37* Fix outdated links across a number of markdown files ([ #3276 ] ( https://github.com/flutter/plugins/pull/3276 ) )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ abstract class XFileBase {
1818 XFileBase (String path);
1919
2020 /// Save the CrossFile at the indicated file path.
21- void saveTo (String path) async {
21+ Future < void > saveTo (String path) {
2222 throw UnimplementedError ('saveTo has not been implemented.' );
2323 }
2424
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ class XFile extends XFileBase {
108108
109109 /// Saves the data of this CrossFile at the location indicated by path.
110110 /// For the web implementation, the path variable is ignored.
111- void saveTo (String path) async {
111+ Future < void > saveTo (String path) async {
112112 // Create a DOM container where we can host the anchor.
113113 _target = ensureInitialized ('__x_file_dom_element' );
114114
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class XFile extends XFileBase {
5757 }
5858
5959 @override
60- void saveTo (String path) async {
60+ Future < void > saveTo (String path) async {
6161 File fileToSave = File (path);
6262 await fileToSave.writeAsBytes (_bytes ?? (await readAsBytes ()));
6363 await fileToSave.create ();
Original file line number Diff line number Diff line change 11name : cross_file
22description : An abstraction to allow working with files across multiple platforms.
33homepage : https://github.com/flutter/plugins/tree/master/packages/cross_file
4- version : 0.1.0+2
4+ version : 0.2.0
55
66dependencies :
77 flutter :
You can’t perform that action at this time.
0 commit comments