TemplateDi class

Defines dependency injection configuration for an FKIT template.

Constructors

TemplateDi({required String strategy, required String file, required List<String> imports, required bool enabled, required List<String> ignore, required Map<String, TemplateRegistration> registrations})
Creates a template dependency injection configuration.
const
TemplateDi.fromMap(Map map)
Creates a template dependency injection configuration from map.
factory

Properties

allRegistrations → Iterable<TemplateRegistration>
All dependency injection registrations defined by the template.
no setter
enabled → bool
Whether dependency injection integration is enabled.
final
file → String
The output file path relative to the feature root.
final
hashCode → int
The hash code for this object.
no setterinherited
ignore → List<String>
The glob patterns excluded while scanning files.
final
imports → List<String>
The directories scanned when generating imports.
final
isGetIt → bool
Whether the configured dependency injection strategy uses GetIt.
no setter
isGetX → bool
Whether the configured dependency injection strategy uses GetX.
no setter
isInjectable → bool
Whether the configured dependency injection strategy uses Injectable.
no setter
isManual → bool
Whether the configured dependency injection strategy is manual.
no setter
isRiverpod → bool
Whether the configured dependency injection strategy uses Riverpod.
no setter
registrations → Map<String, TemplateRegistration>
The component registration definitions keyed by component name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strategy → String
The dependency injection strategy used by the template.
final

Methods

getRegistration(String component) → TemplateRegistration?
Returns the registration associated with component.
hasRegistration(String component) → bool
Returns whether a registration exists for component.
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