ConfigModel class
Configuration model for FLX CLI settings and preferences.
The ConfigModel class represents the user's configuration preferences
stored in .flxrc.json
file, controlling code generation behavior.
Example configuration:
{
"useFreezed": true,
"useEquatable": false,
"defaultStateManager": "getx",
"author": "John Doe"
}
Constructors
- ConfigModel.new({required bool useFreezed, required bool useEquatable, required String defaultStateManager, required String author})
- Creates a new ConfigModel with the specified settings.
-
ConfigModel.fromJson(Map<
String, dynamic> json) -
Creates a ConfigModel from a JSON map with default fallbacks.
factory
Properties
-
Author name for generated file headers.
final
- defaultStateManager → String
-
Default state manager ('getx' or 'bloc').
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useEquatable → bool
-
Whether to use Equatable for value equality.
final
- useFreezed → bool
-
Whether to use Freezed for model generation.
final
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
Static Methods
-
load(
) → Future< ConfigModel> -
Loads configuration from
.flxrc.json
file or returns defaults.