karee_inject 1.0.1 copy "karee_inject: ^1.0.1" to clipboard
karee_inject: ^1.0.1 copied to clipboard

outdated

Part of Karee that manage all annotation used to inject dependency

Karee Inject #

Library used to help developers to better manage dependency injection during flutter development.

Usage #

Karee Inject provide an amazing collection of annotation like Service for services, Value for reading value from application config file, Autowired to auto initialize classe and Persistable A simple usage example:

Use of @Persistable with data model

import 'package:karee_inject/karee_inject.dart';

@Persistable
class User {

  double id;
  String name;

}

Use of Serviceto define a service, and Autowiredto inject into property;

@Service
class ServiceUser {

  @Autowired
  DatabaseInterface db;

  User getUserById(double id){

    return db
      .find(User.runtimeType)
      .where('id', isEqualTo: id);
      
  }
}

Test #

# Generate additional source first
flutter packages pub run build_runner build --delete-conflicting-outputs

# Then run test
flutter test
2
likes
0
pub points
17%
popularity

Publisher

verified publisherflutter.bixterprise.com

Part of Karee that manage all annotation used to inject dependency

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta, reflectable

More

Packages that depend on karee_inject