widject_container 1.0.2 widject_container: ^1.0.2 copied to clipboard
Dependency Injection Container to structure your application in loosely coupled components. Inspired by VContainer.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add widject_container
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
widject_container: ^1.0.2
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:widject_container/container_register.dart';
import 'package:widject_container/dependency_provider.dart';
import 'package:widject_container/example/app_scope.dart';
import 'package:widject_container/example/app_widget.dart';
import 'package:widject_container/example/hello_world_provider.dart';
import 'package:widject_container/example/main.dart';
import 'package:widject_container/example/message_provider.dart';
import 'package:widject_container/example/screen_scope.dart';
import 'package:widject_container/example/screen_widget.dart';
import 'package:widject_container/initialization/initializable.dart';
import 'package:widject_container/initialization/initialization_group.dart';
import 'package:widject_container/initialization/initializer.dart';
import 'package:widject_container/initialization/readonly_initialization_state.dart';
import 'package:widject_container/installer.dart';
import 'package:widject_container/lifetime.dart';
import 'package:widject_container/registration_builder.dart';
import 'package:widject_container/scope.dart';
import 'package:widject_container/widget_provider.dart';