contentToImage static method
Implementation
static Future<Uint8List> contentToImage({
required String content,
double duration = 0,
}) async {
final Map<String, dynamic> arguments = <String, dynamic>{
'content': content,
'duration': Platform.isIOS ? 2000 : duration,
};
Uint8List results = Uint8List.fromList(<int>[]);
try {
results = await _channel.invokeMethod('contentToImage', arguments) ??
Uint8List.fromList(<int>[]);
} on Exception catch (e) {
log('[method:contentToImage]: $e');
throw Exception('Error: $e');
}
return results;
}