applicationButton method

KeyboardBuilder applicationButton({
  1. required String label,
  2. required int appId,
  3. required int ownerId,
  4. String? hash,
})

VK Apps button, occupies the entire keyboard width

builder.applicationButton(
 label: "LiveWidget",
 appId: 6232540,
 ownerId: -157525928
);

Implementation

KeyboardBuilder applicationButton(
    {required String label,
    required int appId,
    required int ownerId,
    String? hash}) {
  if (label.length > 40) {
    throw RangeError('Maximum length of label 40 characters');
  }
  return _addWideButton({
    'action': {
      'label': label,
      'app_id': appId,
      'owner_id': ownerId,
      if (hash != null) 'hash': hash,
      'type': 'open_app'
    }
  });
}