ModelGenerator class

Generator for model classes.

This generator creates model classes for tables, views, and queries based on the configuration.

Inheritance

Constructors

ModelGenerator(Local2DartConfig config, String packagePath)
Creates a new ModelGenerator instance.

Properties

config → Local2DartConfig
The configuration for generation.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
packagePath → String
The path where the package should be generated.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

camelCase(String text) → String
Converts a string to camelCase.
inherited
generate() → Future<void>
Generates the code.
override
generateQueryModels() → Future<void>
Generates model classes for queries.
generateTableModels() → Future<void>
Generates model classes for tables.
generateViewModels() → Future<void>
Generates model classes for views.
getDartType(String sqlType) → String
Gets the Dart type for an SQL type.
inherited
getDefaultType(String dartType) → String
Gets the default value for a Dart type.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pascalCase(String text) → String
Converts a string to PascalCase.
inherited
snakeCase(String text) → String
Converts a string to snake_case.
inherited
toString() → String
A string representation of this object.
inherited
writeFile(String path, String content) → Future<void>
Writes content to a file.
inherited

Operators

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