I try to create a new doc file, but when I invoke DocxTemplate.fromBytes(await f.readAsBytes()), get error
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: FormatException: Could not find End of Central Directory Record
here is my code
final f = await LLCFileUtil.getLocalFile('test', 'template.docx');
if (!f.existsSync()) {
f.createSync();
}
final byte = await f.readAsBytes();
final docx = await DocxTemplate.fromBytes(byte);
and the f.path was /var/mobile/Containers/Data/Application/AB671DDF-9D0E-4B40-B7A9-2252E71F433E/Documents/test/template.docx
I try to create a new doc file, but when I invoke
DocxTemplate.fromBytes(await f.readAsBytes())
, get error[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: FormatException: Could not find End of Central Directory Record
here is my codeand the
f.path
was/var/mobile/Containers/Data/Application/AB671DDF-9D0E-4B40-B7A9-2252E71F433E/Documents/test/template.docx