DavinciCapture.offStage , Uint8List object returned null when built in physic device .
XNORGATE opened this issue · comments
Unhandled Exception: type 'Null' is not a subtype of type 'Uint8List'
As the topic says, i got an error when running debug test in physic device(iphone XR , Ios 17)
but it works properly on both iphone 15 and iphone XR simulator (ios 17)
my code
static Future<void> update(context, Widget widget) async {
Uint8List bytes = await DavinciCapture.offStage(widget,
context: context,
returnImageUint8List: true,
wait: const Duration(seconds: 1),
openFilePreview: true);
final directory = await getApplicationSupportDirectory();
File tempFile =
File("${directory.path}/${DateTime.now().toIso8601String()}.png");
await tempFile.writeAsBytes(bytes);
screenshots
Appreciated for developed this awesome pkg.