Skip to content

Commit 0c14dcc

Browse files
committed
Add const to FadeScaleTransitionConfiguration
1 parent a9d3ad0 commit 0c14dcc

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

packages/animations/example/lib/fade_scale_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class _FadeScaleTransitionDemoState extends State<FadeScaleTransitionDemo>
6767
onPressed: () {
6868
showModal<void>(
6969
context: context,
70-
configuration: FadeScaleTransitionConfiguration(),
70+
configuration: const FadeScaleTransitionConfiguration(),
7171
builder: (BuildContext context) {
7272
return _ExampleAlertDialog();
7373
},

packages/animations/lib/src/fade_scale_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class FadeScaleTransitionConfiguration extends ModalConfiguration {
6565
/// scrim dismisses the modal. [barrierLabel] sets the semantic label for
6666
/// a dismissible barrier. [barrierDismissible] cannot be null. If
6767
/// [barrierDismissible] is true, the [barrierLabel] cannot be null.
68-
FadeScaleTransitionConfiguration({
68+
const FadeScaleTransitionConfiguration({
6969
Color barrierColor = Colors.black54,
7070
bool barrierDismissible = true,
7171
Duration transitionDuration = const Duration(milliseconds: 150),

packages/animations/lib/src/modal.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ abstract class ModalConfiguration {
177177
/// duration of the transitions when the modal enters and exits the
178178
/// application. [transitionDuration] and [reverseTransitionDuration]
179179
/// cannot be null.
180-
ModalConfiguration({
180+
const ModalConfiguration({
181181
@required this.barrierColor,
182182
@required this.barrierDismissible,
183183
this.barrierLabel,

packages/animations/test/fade_scale_transition_test.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void main() {
2121
onPressed: () {
2222
showModal<void>(
2323
context: context,
24-
configuration: FadeScaleTransitionConfiguration(),
24+
configuration: const FadeScaleTransitionConfiguration(),
2525
builder: (BuildContext context) {
2626
return const _FlutterLogoModal();
2727
},
@@ -53,7 +53,7 @@ void main() {
5353
onPressed: () {
5454
showModal<void>(
5555
context: context,
56-
configuration: FadeScaleTransitionConfiguration(),
56+
configuration: const FadeScaleTransitionConfiguration(),
5757
builder: (BuildContext context) {
5858
return _FlutterLogoModal(key: key);
5959
},
@@ -121,7 +121,7 @@ void main() {
121121
onPressed: () {
122122
showModal<void>(
123123
context: context,
124-
configuration: FadeScaleTransitionConfiguration(),
124+
configuration: const FadeScaleTransitionConfiguration(),
125125
builder: (BuildContext context) {
126126
return _FlutterLogoModal(key: key);
127127
},
@@ -186,7 +186,7 @@ void main() {
186186
onPressed: () {
187187
showModal<void>(
188188
context: context,
189-
configuration: FadeScaleTransitionConfiguration(),
189+
configuration: const FadeScaleTransitionConfiguration(),
190190
builder: (BuildContext context) {
191191
return _FlutterLogoModal(key: key);
192192
},
@@ -287,7 +287,8 @@ void main() {
287287
onPressed: () {
288288
showModal<void>(
289289
context: context,
290-
configuration: FadeScaleTransitionConfiguration(),
290+
configuration:
291+
const FadeScaleTransitionConfiguration(),
291292
builder: (BuildContext context) {
292293
return _FlutterLogoModal(
293294
key: topKey,

0 commit comments

Comments
 (0)