injectable_micropackages 1.0.10 copy "injectable_micropackages: ^1.0.10" to clipboard
injectable_micropackages: ^1.0.10 copied to clipboard

Injectable is a convenient code generator for get_it. Inspired by Angular DI, Guice DI and inject.dart. Also enables the support for micro packages concept, supporting di inside of those sub-projects

example/README.md

Example #


import 'package:injectable/injectable_annotations.dart';

abstract class Service {}

@named
@prod
@Injectable(as: Service)
class ServiceImpl1 extends Service {}


@Injectable(as: Service, env: [Envirnoment.dev])
class ServiceImpl2 implements Service {}

@injectable
class MyRepository {
  MyRepository(@Named.from(ServiceImpl1) Service service);
}
3
likes
130
points
41
downloads

Publisher

unverified uploader

Weekly Downloads

Injectable is a convenient code generator for get_it. Inspired by Angular DI, Guice DI and inject.dart. Also enables the support for micro packages concept, supporting di inside of those sub-projects

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

get_it

More

Packages that depend on injectable_micropackages