Dart Constraints

These are the Dart specific constraints applied to the MetaModel before reaching the presets. Read here to get a more general idea on the overall process of converting a MetaModel to a ConstrainedMetaModel.

Model Naming

These are the constraints that is applied to model naming. The Rule key is what you can use in the options to overwrite the default behavior. See constraint customization.

Rule keyRuleResolution
NO_SPECIAL_CHARNo special charactersSpecial characters are replaced by their name, for example ! is replaced with exclamation. For dart _ and $ are an exception to this rule.
NO_NUMBER_START_CHARNo numbers as starting charactersDefault behavior is pre pending number_ in front of the first character
NO_EMPTY_VALUENo empty valuesDefault behavior is to use empty as name.
NO_RESERVED_KEYWORDSNo reserved keywordsDart has a list of reserved keywords (see the full list here)
NAMING_FORMATTERMust be formatted equallyModel name is formatted using pascal case

Property naming

These are the constraints that is applied to object properties and the naming of them. The Rule key is what you can use in the options to overwrite the default behavior. See constraint customization.

Rule keyRuleResolution
NO_SPECIAL_CHARNo special charactersSpecial characters are replaced by their name, for example ! is replaced with exclamation. For dart _ and $ are an exception to this rule.
NO_NUMBER_START_CHARNo numbers as starting charactersDefault behavior is pre pending number_ in front of the first character
NO_EMPTY_VALUENo empty valuesDefault behavior is to use empty as name.
NO_RESERVED_KEYWORDSNo reserved keywordsDart has a list of reserved keywords (see the full list here)
NAMING_FORMATTERMust be formatted equallyProperty name is formatted using pascal case
NO_DUPLICATE_PROPERTIESNo duplicate propertiesIf any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered reserved_ is pre-pended. This is done recursively until no duplicates are found.

Enum key constraints

These are the constraints that is applied to enum keys. The Rule key is what you can use in the options to overwrite the default behavior. See constraint customization.

Rule keyRuleResolution
NO_SPECIAL_CHARNo special charactersSpecial characters are replaced by their name, for example ! is replaced with exclamation. For dart _ and $ are an exception to this rule.
NO_NUMBER_START_CHARNo numbers as starting charactersDefault behavior is pre pending number_ in front of the first character
NO_EMPTY_VALUENo empty valuesDefault behavior is to use empty as name.
NO_RESERVED_KEYWORDSNo reserved keywordsDart has a list of reserved keywords (see the full list here)
NAMING_FORMATTERMust be formatted equallyEnum name is formatted using pascal case
NO_DUPLICATE_KEYSNo duplicate enum keysIf any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered reserved_ is pre-pended. This is done recursively until no duplicates are found.

Constant

Constant constraints are currently not supported for Dart.