Autowired class
Autowired annotation for automatic dependency injection
Marks a field, setter method, or constructor parameter for automatic dependency injection by the Dire DI container.
Example:
@Service()
class UserService {
@Autowired()
late UserRepository userRepository;
@Autowired()
late Logger logger;
// Constructor injection
UserService(@Autowired() this.emailService);
final EmailService emailService;
}
Properties
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