Skip to main content

flutter_injections 1.3.0 copy "flutter_injections: ^1.3.0" to clipboard
flutter_injections: ^1.3.0 copied to clipboard

A lightweight dependency injection package for Flutter that enables context-free dependency management and modular architecture.

1.3.0 #

  • New: FlutterInjections.overrideForTesting(injections) and FlutterInjections.resetOverrides(). A module registers its injections on a level above everything before it, so a fake registered by a test around the module lost to the module's own; the overrides are looked up before every level. The fakes resolve their dependencies from the modules as usual.
  • InjectException and NotDisposeException are exported from package:flutter_injections/flutter_injections.dart (they were only reachable through src/).

1.2.0 #

  • Bugfix: a module rebuilt by its parent (or by a hot reload) registered its injections again on every rebuild. Each rebuild created new instances (a lazySingleton was built once per rebuild) and stacked a level that leaving the module never removed, so its injections kept resolving after it left the tree. FlutterInjectionsWidget now registers once, when it enters the tree, keeps the same instances while it is there, and removes exactly its own level when it leaves.
  • Breaking: the public FlutterInjectionsWidget.instance field is gone (the registry now lives in the widget's State). FlutterInjectionsWidget has a const constructor.
  • The package imports only package:flutter/widgets.dart, not Material (deprecated in Flutter 3.50 in favour of material_ui).

1.1.2 #

  • Documentation: write a short description about the package.

1.1.1 #

  • Bugfix: when change module closed all injections

1.1.0 #

  • Released stable version
  • Add new widget FlutterModule
  • Rename widget FlutterInjections to FlutterInjectionsWidget
  • Create all tests

1.0.3-beta #

  • Add contribuitors sections on reademe

1.0.2-beta #

  • Update descriptions on Readme and Doc

1.0.1-beta #

  • Fix Readme.md

1.0.0-beta #

  • TODO: Initial version beta released.
  • This package use search-tree to get the dependencies, this improve the velocity to get and use more less CPU to search the specific object.
  • Provide you create a module injections, such as HomeInjections have all dependencies you to need on HomePage.
  • Is easy to use, the focus is keep it simple to create a great application.
  • Auto dispose when you remove the FlutterInjection on your Widget Tree.
  • You can dispose a specific object using __dispose
22
likes
160
points
350
downloads

Documentation

API reference

Publisher

verified publishergabul.dev

Weekly Downloads

A lightweight dependency injection package for Flutter that enables context-free dependency management and modular architecture.

Homepage
Repository (GitHub)
View/report issues

Topics

#dependency #di #injection

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_injections