toImagePng method
Future<Uint8List?>
toImagePng({
- double pixelRatio = 1.0,
- FutureOr<
void> onError(- Object error,
- StackTrace stackTrace
Implementation
Future<Uint8List?> toImagePng({double pixelRatio = 1.0,
FutureOr<void> Function(Object error, StackTrace stackTrace)? onError,
}) async {
try {
return await currentContext!.toImagePng(
pixelRatio: pixelRatio,
onError: onError,
);
} catch (e, stack) {
if (onError != null) {
await onError(e, stack);
}
return null;
}
}