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