urlButton method
URL button
builder.urlButton(
label: "Buy a coffee",
url: "https://coffee.mania/buy"
);
Implementation
KeyboardBuilder urlButton(
{required String label,
required String url,
_Button payload = const {}}) {
if (label.length > 40) {
throw RangeError('Maximum length of label 40 characters');
}
return _addWideButton({
'action': {
'label': label,
'payload': _serializePayload(payload),
'link': url,
'type': 'open_link'
}
});
}