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

show dialog without transition #40

Open
selvam920 opened this issue Aug 25, 2023 · 0 comments
Open

show dialog without transition #40

selvam920 opened this issue Aug 25, 2023 · 0 comments

Comments

@selvam920
Copy link
Contributor

selvam920 commented Aug 25, 2023

how to show dialog or push page without transition animation.

Below are flutter code
showGeneralDialog(
context: context,
barrierDismissible: true,
barrierLabel: 'Text',
// barrierColor: Colors.white.withOpacity(0.9),
transitionDuration: const Duration(milliseconds: 0),
transitionBuilder: (context, animation, secondaryAnimation, child) {
return child;
},
pageBuilder: (BuildContext buildContext, Animation animation,
Animation secondaryAnimation) =>
Material(
type: MaterialType.transparency,
child: Align(
alignment: Alignment.center,
child: Container(
constraints: BoxConstraints(
maxWidth: maxWidth,
),
height: MediaQuery.of(context).size.height * height,
margin: const EdgeInsets.symmetric(vertical: 10),
child: child,
))))

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

1 participant