storage_access 0.0.4 copy "storage_access: ^0.0.4" to clipboard
storage_access: ^0.0.4 copied to clipboard

outdated

correct saving/loading files as strings, used to abstract opening and closing files with correct path. All you need to do is provide same filename.

storage_access #

Allow correct write/read of files as strings, using:

  • path_provider

Import:

import 'package:storage_access/storage_access.dart' as storage;

Write:

Returns Future<bool>, true if all okay

final fileWasSaved= await storage.write(
    data: "I am very important data",
    asFile: "how_to_prepare_horkers.xml"
);
if (fileWasSaved == false) beHeroAndFixIt();

Read:

Returns Future<String>, null on any error

final myTreasure= await storage.read(
    fromFile: "how_to_prepare_horkers.xml"
);
if (myTreasure != null) cookHorkers();
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

correct saving/loading files as strings, used to abstract opening and closing files with correct path. All you need to do is provide same filename.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, meta, path_provider

More

Packages that depend on storage_access