Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: expose BlocListenerSingleChildWidget #3446

Closed
PlugFox opened this issue Jul 26, 2022 · 3 comments · Fixed by #3675
Closed

refactor: expose BlocListenerSingleChildWidget #3446

PlugFox opened this issue Jul 26, 2022 · 3 comments · Fixed by #3675
Assignees
Labels
question Further information is requested

Comments

@PlugFox
Copy link
Contributor

PlugFox commented Jul 26, 2022

Right now package export

class MultiBlocListener extends MultiProvider {
  MultiBlocListener({
    required List<BlocListenerSingleChildWidget> listeners,
    ...
  });
}

but doesn't expose BlocListenerSingleChildWidget interface

@PlugFox PlugFox added the refactor Refactor an existing implementation label Jul 26, 2022
@felangel
Copy link
Owner

Hi @PlugFox 👋
Thanks for opening an issue!

Can you provide more context regarding why you want that interface exposed? BlocListener applies it as a mixin so if you want to type your list of listeners you can use BlocListener.

@felangel felangel self-assigned this Jul 26, 2022
@felangel felangel added question Further information is requested waiting for response Waiting for follow up labels Jul 26, 2022
@PlugFox
Copy link
Contributor Author

PlugFox commented Aug 8, 2022

@felangel, of course, I know.
But you should use BlocListener as generic or expose BlocListenerSingleChildWidget or create and export new interface (abstract class or mixin), which will be common to them.

You can't use classes as an external API without exporting the classes themselves.

@felangel
Copy link
Owner

@felangel, of course, I know. But you should use BlocListener as generic or expose BlocListenerSingleChildWidget or create and export new interface (abstract class or mixin), which will be common to them.

You can't use classes as an external API without exporting the classes themselves.

What’s your use case for needing the interface? It was just added to work around a bug in Dart (will double check if it’s still need shortly).

@felangel felangel removed the refactor Refactor an existing implementation label Oct 16, 2022
@tenhobi tenhobi removed the waiting for response Waiting for follow up label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants