embedPng method

Future<Uint8List> embedPng({
  1. required Uint8List pngBytes,
  2. required Uint8List payload,
  3. required int 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',
  );
}