embedPng method
Implementation
Future<Uint8List> embedPng({
required Uint8List pngBytes,
required Uint8List payload,
required int method,
}) async {
final dynamic raw = await _channel.invokeMethod<dynamic>(
'embedPng',
<String, dynamic>{'png': pngBytes, 'payload': payload, 'method': method},
);
if (raw == null) {
throw PlatformException(
code: 'NULL_RESULT',
message: 'embedPng returned null',
);
}
if (raw is Uint8List) return raw;
if (raw is ByteData) return raw.buffer.asUint8List();
throw PlatformException(
code: 'BAD_RESULT',
message: 'Unexpected embedPng result type',
);
}