create static method

RegExpDataScheme create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "regExpDataScheme",
  3. String? pattern,
  4. bool? is_multi_line,
  5. bool? is_case_sensitive,
  6. bool? is_unicode,
  7. bool? is_dot_all,
})
override

return original data json

Implementation

static RegExpDataScheme create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "regExpDataScheme",
  String? pattern,
  bool? is_multi_line,
  bool? is_case_sensitive,
  bool? is_unicode,
  bool? is_dot_all,
}) {
  // RegExpDataScheme regExpDataScheme = RegExpDataScheme({
  final Map regExpDataScheme_data_create_json = {
    "@type": special_type,
    "pattern": pattern,
    "is_multi_line": is_multi_line,
    "is_case_sensitive": is_case_sensitive,
    "is_unicode": is_unicode,
    "is_dot_all": is_dot_all,
  };

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

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