Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[animations] Set FadeScaleTransitionConfiguration to configuration default value#136
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
Changes from all commits
bb3a9fb4c9f4d2b1580290bd1dcfFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,6 +4,8 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'fade_scale_transition.dart'; | ||
| /// Signature for a function that creates a widget that builds a | ||
| /// transition. | ||
| /// | ||
| @@ -26,7 +28,8 @@ typedef _ModalTransitionBuilder = Widget Function( | ||
| /// The `configuration` argument is used to determine characteristics of the | ||
| /// modal route that will be displayed, such as the enter and exit | ||
| /// transitions, the duration of the transitions, and modal barrier | ||
| /// properties. | ||
| /// properties. By default, `configuration` is | ||
| /// [FadeScaleTransitionConfiguration]. | ||
| /// | ||
| /// The `useRootNavigator` argument is used to determine whether to push the | ||
| /// modal to the [Navigator] furthest from or nearest to the given `context`. | ||
| @@ -45,7 +48,7 @@ typedef _ModalTransitionBuilder = Widget Function( | ||
| /// the modal's characteristics. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify in the API documentation for Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add new tests to What I would do is call You can use some of the existing tests in that test file and the tests from ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I've added the tests: b158029 | ||
| Future<T> showModal<T>({ | ||
| @required BuildContext context, | ||
| @required ModalConfiguration configuration, | ||
| ModalConfiguration configuration = const FadeScaleTransitionConfiguration(), | ||
| bool useRootNavigator = true, | ||
| WidgetBuilder builder, | ||
| }) { | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just leave this here, but it's up to you if this becomes the default behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think the sample code should be simple, so omitting default value is better 🤔