berry 0.0.1 copy "berry: ^0.0.1" to clipboard
berry: ^0.0.1 copied to clipboard

Dependency injection container.

berry #

A library for Dart developers.

Usage #

A simple usage example:

import 'package:berry/berry.dart';

main() {
  new Berry({
      ProfessorService: Provider(
        provide: () => ProfessorService(),
      ),
      'GradeService': Provider(
        provide: () => GradeService(),
      ),
      StudentService: Provider(
        provide: (params) => StudentServiceImpl.fromDi(params),
        resolve: ['GradeService', ProfessorService],
      ),
      'key': Provider(
        provide: () => 'value',
      ),
    });
  
    StudentService studentService = Berry()[StudentService];
  
    List<int> studentGrades = studentService.getGrades();
  
    print(studentGrades);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Dependency injection container.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

graphs

More

Packages that depend on berry