GenerateRepository class
Annotation for repository classes to override generator configuration.
Use this annotation to customize code generation for a specific repository, overriding project-wide defaults from build.yaml.
Example:
@GenerateRepository(
vars: {'wrapper': 'CustomHandler.call'},
imports: ['package:custom/custom.dart'],
)
abstract class SpecialRepository {
@Generate(apiClient: SpecialApi)
Future<Either<Failure, Data>> getData();
}
Constructors
Properties
- classTemplate → String?
-
Custom class template using Mustache syntax.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
imports
→ List<
String> ? -
Additional imports required by the generated code.
final
- methodTemplate → String?
-
Custom method template using Mustache syntax.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
vars
→ Map<
String, String> ? -
Custom variables to use in templates.
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