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

No notification on closing / repeated closing and opening to the same side #226

Closed
boredcity opened this issue Jul 17, 2021 · 2 comments
Closed

Comments

@boredcity
Copy link

boredcity commented Jul 17, 2021

Hey there again 👋
Thanks a lot for your help with #225

I've found another small issue though: when I subscribe to actionPaneType ValueNotifier its value never becomes equal to ActionPaneType.none after closing gesture -- and, therefore, no events are received when I open and close it to the same side multiple times in a row.

It's certainly not a big problem, but I thought I should mention it anyway.

my code:

  late final ValueNotifier<ActionPaneType>? _actionPaneTypeValueNotifier;
  @override
  void initState() { 
    super.initState();
    _actionPaneTypeValueNotifier = Slidable.of(context)?.actionPaneType;
    _actionPaneTypeValueNotifier?.addListener(_onActionPaneTypeChanged);
  }

  @override
  void dispose() {
    _actionPaneTypeValueNotifier?.removeListener(_onActionPaneTypeChanged);
    super.dispose();
  }

  void _onActionPaneTypeChanged() {
    print('Value is ${_actionPaneTypeValueNotifier?.value}') // I receive ActionPaneType.start 1 time and after that nothing (unless I get ActionPaneType.end, after which ActionPaneType.start starts working, but .end stops).
  }
@letsar
Copy link
Owner

letsar commented Jul 18, 2021

Hi @merelj ! Thank you for your feedback, I see where it comes from, I'll fix it.

@letsar letsar closed this as completed in 73e185a Jul 18, 2021
@letsar
Copy link
Owner

letsar commented Jul 18, 2021

Fixed in 1.0.0-dev.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants