Last updated:
0 purchases
simple clean getit generator
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 #
Install get_it (https://pub.dev/packages/get_it)
Install build_runner (https://pub.dev/packages/build_runner)
this library support adding Repository, DataSource, and Service.
for example:
@AddRepositoryOf(services: [AuthRepository, UserInfoRepository], tag: "Remote")
class RemoteRepository implements AuthRepository, UserInfoRepository{
// some implementation...
}
copied to clipboard
then run build_runner command:
flutter pub run build_runner build
copied to clipboard
Then there will be a new file called service_locator.g.dart inside lib/
Supported Annotation #
@AddRepositoryOf() #
@AddDataSourceOf() #
@AddServiceOf() #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.