ModuleContext class
Provides configuration and resolved values used during module generation.
Constructors
-
ModuleContext({required InitConfig config, required TemplateDefinition template, required ModuleDefinition module, Map<
String, dynamic> options = const {}}) -
Creates a module generation context.
const
Properties
- config → InitConfig
-
The project configuration used during module generation.
final
-
enabledDevPackages
→ Map<
String, String> -
The enabled development packages required by the module.
no setter
-
enabledPackages
→ Map<
String, String> -
The enabled runtime packages required by the module.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- module → ModuleDefinition
-
The module being generated or installed.
final
-
options
→ Map<
String, dynamic> -
The configured module options keyed by option name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- template → TemplateDefinition
-
The template associated with the module.
final
- templateRoot → String
-
The root path containing the module templates.
no setter
-
variables
→ Map<
String, String> -
The template variables available during module generation.
no setter
Methods
-
isEnabled(
String option) → bool -
Returns whether the specified module
optionis enabled. -
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