PackageTrack
Sign in Get early access

get_it_mixin

mixin on Stateless- and StatefulWidgts that makes binding the Widget to Objects stored in GetIt easier.

4.2.2 3.0K downloads/mo #4628 most downloaded on pub.dev escamoteur/get_it_mixin

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 9 months

Most releases are documented

notes for 21 of 26 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

26 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

26 releases · Sep 2020 to Sep 2023
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 26
  1. 4.2.2 03 Sep 2023

    Nothing published for this version

  2. 4.2.1 31 Aug 2023

    Nothing published for this version

  3. 4.2.0 26 May 2023
    Release notes
    • pushScope now gives the new scope a unique name, that is used to drop it when the Widget is destroyed. This is a precausion to avoid race conditions if another widget pushes a new scope while this one isn't destroyed yet. See https://github.com/fluttercommunity/get_it/issues/316
    Open source →
  4. 4.1.1 22 Mar 2023
    Release notes
    • I forgot to add the new allReadyHandler to the GetItStateMixin too
    Open source →
  5. 4.1.0 22 Mar 2023
    Release notes
    • added allReadyHandler. Although allReady already has an optional handler, it will always trigger a rebuild which leads to a double execution of the registered handler. This might not always be what you want.
      /// registers a handler that is called when the all-ready state is reached
      /// it does not trigger a rebuild like [allReady] does
      /// you can force a timeout Exceptions if [allReady] completed
      /// within [timeout] which will call [onError]
      void allReadyHandler(void Function(BuildContext context)? onReady,
              {void Function(BuildContext context, Object? error)? onError,
              Duration? timeout})
    
    Open source →
  6. 4.0.0 09 Mar 2023
    Release notes

    Although the change in the API is a minor one and most of you won't see a difference it is a change in the function signature of watchOnly that justifies a major version bump.

    • watchOnly got more powerful and flexible. You know can trigger a rebuild on every change notification of the Listenable for instance a simple ChangeNotifier. Also you can pass in a direct target if the listenable that you want to observe is available outside GetIt.
      /// like watch but for simple `Listenable` objects.
      /// It only triggers a rebuild when the value that
      /// [only] returns changes. With that you can react to changes of single members
      /// of [T]
      /// If [only] is null it will trigger a rebuild every time the `Listenable` changes
      /// in this case R has to be equal to T
      /// If [target] is not null whatch will observe this Object as Listenable instead of
      /// looking inside GetIt
      R watchOnly<T extends Listenable, R>(
        R Function(T)? only, {
        T? target,
        String? instanceName,
      }) =>
    
    Open source →
  7. 3.1.4 10 Feb 2022
    Release notes
    • fix for https://github.com/escamoteur/get_it_mixin/issues/16
    • fix for https://github.com/escamoteur/get_it_mixin/issues/17
    • fix for https://github.com/escamoteur/get_it_mixin/issues/20
    Open source →
  8. 3.1.4+1 14 Nov 2022

    Nothing published for this version

  9. 3.1.4+2 14 Nov 2022

    Nothing published for this version

  10. 3.1.3 21 Jun 2021
    Release notes
    • fix for https://github.com/escamoteur/get_it_mixin/issues/13
    Open source →
  11. 3.1.2 16 Jun 2021
    Release notes
    • fix for https://github.com/escamoteur/get_it_mixin/issues/8
    Open source →
  12. 3.1.1 07 May 2021
    Release notes
    • Removed possibly unnecessary reset of the watches on update of the widgets. If you experience any strange behaviour with this version, please let me know
    Open source →
  13. 3.1.0 06 May 2021
    Release notes
    • Added new function to rebuild a widget as soon as a GetIt-Scope changed

    Trigger a rebuild on GetIt Scope changes

    As it is possible that objects registered in a higher GetIt-Scope can shadow objects of the same registration type in a lower scope it is important to ensure that the UI can update its references to the newly active object (the one last registered). The get_it_mixin detects such changes and updates them on the next rebuild but if you want to ensure that this happens immediately you can put a call to

      /// Will triger a rebuild of the Widget if any new GetIt-Scope is pushed or popped
      /// This function will return `true` if the change was a push otherwise `false`
      /// If no change has happend the return value will be null
      bool? rebuildOnScopeChanges();
    
    Open source →
  14. 3.0.0 03 May 2021
    Release notes
    • Major version bump because get_it V7.0.0 is a breaking change
    Open source →
  15. 2.0.2 25 Apr 2021
    Release notes
    • Switched internal structure from LinkedList to List because of https://github.com/dart-lang/sdk/issues/45767 which made the package unusable on web
    Open source →
  16. 2.0.1 22 Mar 2021
    Release notes
    • Added option to watch any ValueListenable with watch(target:)
    Open source →
  17. 2.0.0 04 Mar 2021
    Release notes
    • Null safety migration
    Open source →
  18. 1.5.1 17 Oct 2020
    Release notes
    • fixed bug that you couldn't use watchOnly and watchXonly more than once on the same Listenable object.
    • split source into several part files.
    Open source →
  19. 1.5.0 16 Oct 2020
    Release notes
    • Refactoring and corrected cancelation of futures
    Open source →
  20. 1.4.0 14 Oct 2020
    Release notes
    • Bug fix for Hot reload and added a warning in the readme
    Open source →
  21. 1.3.0 14 Oct 2020

    Nothing published for this version

  22. 1.2.0 07 Oct 2020
    Release notes
    • the previous implementation of allReady() would have called GetIt.allReady on every build which would return every time a new Future so that it did rebuild unpredictable
    Open source →
  23. 1.1.0 07 Oct 2020
    Release notes
    • deprecated registerValueListenableHandler in favour of registerHandler
    Open source →
  24. 1.0.0 06 Oct 2020
    Release notes
    • some breaking changes of the handler function definitions
    • added support for allReady and isReady
    Open source →
  25. 0.9.0 02 Oct 2020
    Release notes
    • now with readme and tests
    Open source →
  26. 0.1.0 26 Sep 2020
    Release notes
    • Initial release without docs and tests
    Open source →

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