Visitar URL original
[animations] Add const to FadeScaleTransitionConfiguration by mono0926 · Pull Request #124 · flutter/packages · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add const to FadeScaleTransitionConfiguration
  • Loading branch information
mono0926 committed Apr 10, 2020
commit 0c14dcc48921b103cfd3241d1a51a55370927d33
2 changes: 1 addition & 1 deletion packages/animations/example/lib/fade_scale_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class _FadeScaleTransitionDemoState extends State<FadeScaleTransitionDemo>
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration: const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return _ExampleAlertDialog();
},
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/lib/src/fade_scale_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class FadeScaleTransitionConfiguration extends ModalConfiguration {
/// scrim dismisses the modal. [barrierLabel] sets the semantic label for
/// a dismissible barrier. [barrierDismissible] cannot be null. If
/// [barrierDismissible] is true, the [barrierLabel] cannot be null.
FadeScaleTransitionConfiguration({
const FadeScaleTransitionConfiguration({
Color barrierColor = Colors.black54,
bool barrierDismissible = true,
Duration transitionDuration = const Duration(milliseconds: 150),
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/lib/src/modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ abstract class ModalConfiguration {
/// duration of the transitions when the modal enters and exits the
/// application. [transitionDuration] and [reverseTransitionDuration]
/// cannot be null.
ModalConfiguration({
const ModalConfiguration({
@required this.barrierColor,
@required this.barrierDismissible,
this.barrierLabel,
Expand Down
11 changes: 6 additions & 5 deletions packages/animations/test/fade_scale_transition_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main() {
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration: const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return const _FlutterLogoModal();
},
Expand Down Expand Up @@ -53,7 +53,7 @@ void main() {
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration: const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return _FlutterLogoModal(key: key);
},
Expand Down Expand Up @@ -121,7 +121,7 @@ void main() {
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration: const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return _FlutterLogoModal(key: key);
},
Expand Down Expand Up @@ -186,7 +186,7 @@ void main() {
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration: const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return _FlutterLogoModal(key: key);
},
Expand Down Expand Up @@ -287,7 +287,8 @@ void main() {
onPressed: () {
showModal<void>(
context: context,
configuration: FadeScaleTransitionConfiguration(),
configuration:
const FadeScaleTransitionConfiguration(),
builder: (BuildContext context) {
return _FlutterLogoModal(
key: topKey,
Expand Down