create static method

ChatPosition create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatPosition",
  3. String special_return_type = "chatPosition",
  4. ChatList? list,
  5. num? order,
  6. bool? is_pinned,
  7. ChatSource? source,
})
override

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

Implementation

static ChatPosition create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatPosition",
  String special_return_type = "chatPosition",
  ChatList? list,
  num? order,
  bool? is_pinned,
  ChatSource? source,
}) {
  // ChatPosition chatPosition = ChatPosition({
  final Map chatPosition_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "list": (list != null) ? list.toJson() : null,
    "order": order,
    "is_pinned": is_pinned,
    "source": (source != null) ? source.toJson() : null,
  };

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

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