create static method

ChatTheme create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatTheme",
  3. String special_return_type = "chatTheme",
  4. String? name,
  5. ThemeSettings? light_settings,
  6. ThemeSettings? dark_settings,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static ChatTheme create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatTheme",
  String special_return_type = "chatTheme",
  String? name,
  ThemeSettings? light_settings,
  ThemeSettings? dark_settings,
}) {
  // ChatTheme chatTheme = ChatTheme({
  final Map chatTheme_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "name": name,
    "light_settings": (light_settings != null) ? light_settings.toJson() : null,
    "dark_settings": (dark_settings != null) ? dark_settings.toJson() : null,
  };

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

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