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

Animations are gone on Android in latest flutter #347

Open
lucasjinreal opened this issue May 7, 2023 · 10 comments
Open

Animations are gone on Android in latest flutter #347

lucasjinreal opened this issue May 7, 2023 · 10 comments

Comments

@lucasjinreal
Copy link

iOS this push back animation is OK, but android is not work anymore. Please have a look!!

@jseminck
Copy link

jseminck commented May 9, 2023

We are having the same issue.

@mariopepe
Copy link

this package is abandoned I think!

@lucasjinreal
Copy link
Author

I am so sorry to hear that, this was a wonderful lib and really less maintainance nowadays! @jamesblasco Our whole software stack are depending on this! Please help!

@jseminck
Copy link

jseminck commented May 9, 2023

Yes, there aren't any real alternative that provide the same functionality. Seems we'll have to figure out this one on our own and fork the repo, if needed.

@lucasjinreal
Copy link
Author

@jseminck I would suggest fork this repo if anyone much more familliar on flutter than me. I would never using sheeter anymore since the original author doesn't response any on his wonderful lib, just leave millions developers keep issues in their apps. This is really lack of responsibility.

I hear flutter might add this pushing back animation into flutter but no progress anymore, so there might need a new modal_bottom_sheet from community!

@xSILENCEx
Copy link

I checked the source code, animation disappearance is caused by accessibility settings:

      ...

    final mediaQuery = MediaQuery.of(context);

    child = AnimatedBuilder(
      animation: widget.animationController,
      builder: (context, Widget? child) {
        assert(child != null);
        final animationValue =
            animationCurve.transform(mediaQuery.accessibleNavigation ? 1.0 : widget.animationController.value);
     ...

So just add it to the MaterialApp builder:

      ...
      builder: (BuildContext ctx, Widget? child) {
        return MediaQuery(
          data: MediaQuery.of(ctx).copyWith(accessibleNavigation: false),
          child: child!,
        );
      },
      ...

Animation is back!

@lucasjinreal
Copy link
Author

@xSILENCEx Waaoo! Does it need change model_bottom_sheet source code itself?

@xSILENCEx
Copy link

@lucasjinreal No need to change the source code

@faridistiqlal
Copy link

anyone who fix animation?

@AlexDochioiu
Copy link

AlexDochioiu commented Sep 14, 2023

For anyone needing it:

I made a fork from main + added the fix from @xSILENCEx (thank you) directly in the library.

  modal_bottom_sheet:
    git:
      url: https://github.com/vespr-wallet/modal_bottom_sheet.git
      path: modal_bottom_sheet
      ref: 48549ad85b0685185e29f2363640621c51741b99

P.S: Some other changes in main to consider: ModalBottomSheetRoute name changed to ModalSheetRoute. You may have to update some parts in your project because of this.

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

6 participants