karee_inject 1.0.3+1 copy "karee_inject: ^1.0.3+1" to clipboard
karee_inject: ^1.0.3+1 copied to clipboard

Part of Karee that manage all annotation used to inject dependency

example/karee_inject_example.dart

import 'package:karee_inject/karee_inject.dart';

import 'interface.dart';

@Persistable(collection: 'users')
class User {
  double id;
  String name;

  User.from({required this.id, required this.name});
}

@Service
class ServiceUser {
  @Autowired
  late DatabaseInterface db;

  User? getUserById(double id) {
    return db.find<User>().firstWhere('id', isEqualTo: id);
  }
}
2
likes
140
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

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on karee_inject