yk_flutter_core 0.0.2 copy "yk_flutter_core: ^0.0.2" to clipboard
yk_flutter_core: ^0.0.2 copied to clipboard

YKFlutterCore

Features #

YkFileManager #

获取存储路径


YkFileManager.getDocumentPath();

保存内容,但需要把保存的内容先进行转化成二进制data, 保存成功将返回bool



  final data = Int8List.fromList(utf8.encode("fawoeigjaowiegjoiawjegoiawjegoiawejgo"));

  final documentPath = await YkFileManager.getDocumentPath();

  String newFilePath = "$documentPath/text.txt";

  final result = await YkFileManager.save(bytes: data, filePath:newFilePath);

获取内容, 根据路径返回内容

final documentPath = await YkFileManager.getDocumentPath();

String newFilePath = "$documentPath/text.txt";

final detail = await YkFileManager.getData(path: newFilePath);

final andoder = utf8.decode(detail ?? []);
0
likes
0
points
195
downloads

Publisher

unverified uploader

Weekly Downloads

YKFlutterCore

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, path, path_provider

More

Packages that depend on yk_flutter_core