getQR method
Get QR code
Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
Implementation
Future<Uint8List> getQR(
{required String text, int? size, int? margin, bool? download}) async {
const String apiPath = '/avatars/qr';
final Map<String, dynamic> params = {
'text': text,
'size': size,
'margin': margin,
'download': download,
'project': client.config['project'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}