simple_clean_getit_generator 0.1.2 copy "simple_clean_getit_generator: ^0.1.2" to clipboard
simple_clean_getit_generator: ^0.1.2 copied to clipboard

Simple Service Locator generator using GetIt on clean architecture

Simple Clean GetIt Generator #

Simple generate service locator using GetIt and clean architecture.

Whats the different with other library? #

this library simplify the implementation and can inject the service locator in order

How to use #

  1. Install get_it (https://pub.dev/packages/get_it)
  2. Install build_runner (https://pub.dev/packages/build_runner)
  3. this library support adding Repository, DataSource, and Service.

for example:

@AddRepositoryOf(services: [AuthRepository, UserInfoRepository], tag: "Remote")
class RemoteRepository implements AuthRepository, UserInfoRepository{
   
   // some implementation...

}
  1. then run build_runner command:
     flutter pub run build_runner build
  1. Then there will be a new file called service_locator.g.dart inside lib/

Supported Annotation #

@AddRepositoryOf() #

@AddDataSourceOf() #

@AddServiceOf() #

1
likes
110
pub points
34%
popularity

Publisher

verified publisheranggaaryas.my.id

Simple Service Locator generator using GetIt on clean architecture

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

analyzer, build, glob, path, source_gen

More

Packages that depend on simple_clean_getit_generator