-
Notifications
You must be signed in to change notification settings - Fork 485
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
Modal bottom sheet drag doesn't animate on some devices #369
Comments
I tracked the problem down to
I get the idea of disabling animation, BUT you cannot rely on I think the best way is to remove the accessibleNavigation check making it always animate with |
Same on Samsung phone. There is only animations on barrier color instead of sheet. Future<T?> showMyBottomSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
...
}) {
//...
if (showCompatibility) {
myBuilder = (ctx) {
return MyBottomSheet(child: builder(ctx));
};
myContainerWidget =
(BuildContext ctx, Animation<double> animation, Widget child) {
final tween = Tween<Offset>(
begin: const Offset(0, 1),
end: Offset.zero,
).chain(CurveTween(curve: Curves.easeOutCirc));
return SlideTransition(
position: tween.animate(animation),
child: child,
);
};
} else {
myBuilder = builder;
myContainerWidget = (_, __, Widget child) {
return MyBottomSheet(
child: child,
);
};
}
return showCustomModalBottomSheet(
context: context,
builder: myBuilder,
containerWidget: myContainerWidget,...
);
} |
Wondering if this is still valid issue? I don't see the reference to |
@orestesgaolin It works on Pixel 7A, so I guess it's fixed. Thanks for the info. |
I noticed that iOS-styled modal bottom sheet doesn't drag on some devices, such as Pixel 7a. It will animate screen behind correctly.
The same thing works on Android emulator, iOS simulator and iPhone devices.
Screen.Recording.2023-09-01.at.12.07.55.mov
The text was updated successfully, but these errors were encountered: