SupportedGenerateModes class

A collection of supported generation modes for the translations code generator.

This class defines the various modes in which the translations_code_gen tool can operate. Each mode generates different types of output files based on the input translation files.

The generation modes control whether to generate:

  • Dart key constants and value maps (full generation)
  • Only Dart key constants
  • Only Dart value maps
  • Only JSON value files

Example usage:

# Generate both keys and values
dart run translations_code_gen --generate=dart

# Generate only key constants
dart run translations_code_gen --generate=dart-keys

# Generate only value maps
dart run translations_code_gen --generate=dart-values

# Generate JSON value files
dart run translations_code_gen --generate=json-values

See also:

Constructors

SupportedGenerateModes()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

dart → const String
The default generation mode that creates both Dart keys and values.
dartKeys → const String
Generation mode that creates only Dart key constants.
dartValues → const String
Generation mode that creates only Dart value maps.
jsonValues → const String
Generation mode that creates JSON value files.
supportedGenerateModes → const List<String>
A list containing all supported generation modes.