saveFromData method

  1. @override
Future<String> saveFromData({
  1. required Uint8List data,
  2. required String name,
  3. JSaverFileType type = JSaverFileType.OTHER,
})
override

Future method saveFromData takes the Uint8List bytes and String name and JSaverFileType type has String return Value

Implementation

@override
Future<String> saveFromData(
    {required Uint8List data,
    required String name,
    JSaverFileType type = JSaverFileType.OTHER}) async {
  try {
    final wVal = await _webSaver(data, name, "application/octet-stream");
    return wVal.toString();
  } catch (e) {
    return e.toString();
  }
}