Skip to content

MultiControllerScope & MultiControllerListener Support #8

Description

@ahadjonovss

Hi! Thanks for the control package—it's great for managing async state!

I’d like to suggest adding support for:

MultiControllerScope: For registering multiple controllers in a single scope, similar to MultiBlocProvider.

MultiControllerListener: To listen to multiple controllers in one place.

Activity

  1. PlugFox commented on Apr 10, 2025

    @PlugFox
    Owner

    I'll think about it.
    But here we need a different implementation, and we need to think about it so that it is adequate.

    Multi Provider clogs up the widget inspector, and we have to bother with generics.

    e.g. for what reason you want do something like that with "multi provider":

    import 'provider';
    import 'a';
    import 'b';
    import 'c';
    
    final a = Provider.of<A>(context);
    final b = Provider.of<B>(context);
    final c = Provider.of<C>(context);

    if you can just:

    import 'dependencies';
    
    final Dependencies(:a, :b, :c) = Dependencies.of(context);

    without generics and so on.

    even analyzer give you suggestion and commentaries when you type:

    Dependencies.of(context).someth ...

    Provider are trash for some root dependencies of you application, just create one InheritedWidget, this is around 5 lines of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions