create static method

KeyboardButton create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "keyboardButton",
  3. String special_return_type = "keyboardButton",
  4. String? text,
  5. KeyboardButtonType? type,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static KeyboardButton create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "keyboardButton",
  String special_return_type = "keyboardButton",
  String? text,
  KeyboardButtonType? type,
}) {
  // KeyboardButton keyboardButton = KeyboardButton({
  final Map keyboardButton_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "text": text,
    "type": (type != null) ? type.toJson() : null,
  };

  keyboardButton_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (keyboardButton_data_create_json.containsKey(key) == false) {
        keyboardButton_data_create_json[key] = value;
      }
    });
  }
  return KeyboardButton(keyboardButton_data_create_json);
}