create static method

MessageDice create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "messageDice",
  3. String special_return_type = "messageContent",
  4. DiceStickers? initial_state,
  5. DiceStickers? final_state,
  6. String? emoji,
  7. num? value,
  8. num? success_animation_frame_number,
})
override

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

Implementation

static MessageDice create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "messageDice",
  String special_return_type = "messageContent",
  DiceStickers? initial_state,
  DiceStickers? final_state,
  String? emoji,
  num? value,
  num? success_animation_frame_number,
}) {
  // MessageDice messageDice = MessageDice({
  final Map messageDice_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "initial_state": (initial_state != null) ? initial_state.toJson() : null,
    "final_state": (final_state != null) ? final_state.toJson() : null,
    "emoji": emoji,
    "value": value,
    "success_animation_frame_number": success_animation_frame_number,
  };

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

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