PackageTrack
Sign in Get early access

scope

A Dependency injection (Inversion of Control) library. Supports nested Scopes and multiple values of the same type.

5.1.0 238K downloads/mo #787 most downloaded on pub.dev onepub-dev/scope

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 8 days to 12 months

Nearly every release is documented

notes for 14 of 15 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

16 releases · first in 2021

0 releases in the last 12 months

see the full history below

Release timeline

16 releases · Mar 2021 to Aug 2024
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 16
  1. 5.1.0 13 Aug 2024
    Release notes
    • changed ScopeKey ctors so they are consts. The examples that show them being consts are now correct.
    Open source →
  2. 5.0.0 27 Jul 2024
    Release notes
    • updated dev dependencies.
    Open source →
  3. 4.1.1 27 Jul 2024
    Release notes
    • Fixed an error in the README example. Use of wrong type.
    • Cleared out a few lint fixes.
    Open source →
  4. 4.1.0 01 Aug 2023
    Release notes
    • update links to doc and repo.
    Open source →
  5. 4.0.1 17 May 2023
    Release notes
    • upgraded dependencies
    Open source →
  6. 4.0.0 15 May 2023
    Release notes
    • upgraded to dart 3.0.
    Open source →
  7. 3.0.0 16 Oct 2022
    Release notes
    • BREAKING: The Scope.run method is now asynchronous. Use Scope.runSync to run a synchronous method. You will likely have to change how you call the run method. If you have been using something like:

      
        final scope = Scope()
          ..value<int>(keyAge, 10)
          ..run(()  {
          Future.delayed(oneSecond, () {
            print('Age: ${use(keyAge)}');
          });
        });
      

      You will need to change it to:

        final scope = Scope()
          ..value<int>(keyAge, 10);
      
        await scope.run(() async {
          Future.delayed(oneSecond, () {
            print('Age: ${use(keyAge)}');
          });
        });
      
    • added copyright notices.

    • Created an example of how overrides work.

    • Changed the debugName on ScopeKey.withDefault to optional to match ScopeKey.

    • Added missing types from global scope unit tests.

    Open source →
  8. 2.3.0-beta.1 15 Jan 2022 pre-release
    Release notes
    • Added a GlobalScope object which implements a Singleton pattern which can be overriden by injecting a Scope.
    Open source →
  9. 2.2.1 08 Jan 2022
    Release notes
    • Improved debug messages for ScopeKeys by providing the type and debug name if available.
    Open source →
  10. 2.2.0 07 Jan 2022
    Release notes
    • ENH: Added new method hasScopeValue
    • ENH: added withDefault argument to use to provide site specific defaults
    • BREAKING: Subtle change to method hasScopeKey. Previously it return true if the key was in scope or if it had a default value. Use hasScopeValue to get the original implementation and use hasScopeKey to check if a key exists.
    Open source →
  11. 2.1.2 07 Jan 2022
    Release notes
    • purged singleton from the doc as it is now single.
    Open source →
  12. 2.1.1 07 Jan 2022
    Release notes
    • purged the term generator for the code/doco as it should be sequence.
    Open source →
  13. 2.1.0 07 Jan 2022
    Release notes
    • Deprecated factory in favour of single. Added sequence in favour of the originally planned generator.
    Open source →
  14. 2.0.2 06 Jan 2022
    Release notes

    updated description again.

    Open source →
  15. 2.0.0 06 Jan 2022
    Release notes
    • renamed packaged to scope.
    Open source →
  16. 1.0.0 10 Mar 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive