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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jerky animation, no way to track swipes (Problems migrating to version 1.0.0 from 0.6.0) #225

Closed
boredcity opened this issue Jul 16, 2021 · 3 comments

Comments

@boredcity
Copy link

Hi there, and thanks a lot for such a great library 馃憤

Found several problems after migration:

  • there is a visible jerk in animation when slidable is swiped quickly: animation first stops about at about halfway and then continues only after user removes their finger

  • there is no way to track left/right swipe for analytics: onNotification does not provide any info on what kind of swipe it is and if it was successfull (openThreshold was reached); I more or less managed to track this in 0.6.0, but in 1.0.0 there is just no way

I know that 1.0.0 is a pre-release for now and you might be working on those problems already, but hope it helps 馃檱

@boredcity
Copy link
Author

boredcity commented Jul 16, 2021

example of the 1st problem:
example

@boredcity
Copy link
Author

boredcity commented Jul 16, 2021

simplified example:

  Widget build(BuildContext context) {
    final screenWidth = MediaQuery.of(context).size.width;
    final extentRatio = actionSideLength / screenWidth;
    return Slidable(
      groupTag: 'some-slidable',
      child: Container(child: Text('ya'), height: actionSideLength, width: double.infinity,),
      startActionPane: ActionPane(
        motion: const ScrollMotion(),
        extentRatio: extentRatio,
        children: [
          Container(height: actionSideLength, width: actionSideLength, color: Colors.lime)
        ],
      ),
    );
  }

@boredcity boredcity changed the title Problems migrating to version 1.0.0 from 0.6.0 Jerky animation, no way to track swipes (Problems migrating to version 1.0.0 from 0.6.0) Jul 16, 2021
@letsar letsar closed this as completed in 87c1d65 Jul 16, 2021
@letsar
Copy link
Owner

letsar commented Jul 16, 2021

Hi @merelj, thanks I've been able to fix it in the 1.0.0-dev.5 version.
Concerning a way to track left/right swipe, you can do it.
If you get the SlidableController from a Slidable's child, you'll be able to listen to actionPaneType which is a ValueNotifier. With that in mind, you can then do whatever you want with this value.

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