Skip to content

Commit ee98671

Browse files
committed
More super initializers
1 parent 044596a commit ee98671

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

lib/src/effects/custom_effect.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import '../../flutter_animate.dart';
2323
@immutable
2424
class CustomEffect extends Effect<double> {
2525
const CustomEffect({
26-
required this.builder,
27-
Duration? delay,
28-
Duration? duration,
29-
Curve? curve,
26+
super.delay,
27+
super.duration,
28+
super.curve,
3029
double? begin,
3130
double? end,
31+
required this.builder,
3232
}) : super(
3333
begin: begin ?? 0.0, // Should this use "smart" defaults?
3434
end: end ?? 1.0,

lib/src/effects/toggle_effect.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ import '../../flutter_animate.dart';
2222
@immutable
2323
class ToggleEffect extends Effect<void> {
2424
const ToggleEffect({
25-
Duration? delay,
26-
Duration? duration,
25+
super.delay,
26+
super.duration,
27+
super.curve,
2728
required this.builder,
28-
}) : super(
29-
delay: delay,
30-
duration: duration,
31-
);
29+
});
3230

3331
final ToggleEffectBuilder builder;
3432

lib/src/effects/visibility_effect.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ class VisibilityEffect extends Effect<bool> {
1515
static const bool defaultMaintain = true;
1616

1717
const VisibilityEffect({
18-
Duration? delay,
19-
Duration? duration,
18+
super.delay,
19+
super.duration,
20+
super.curve,
2021
bool? end,
2122
bool? maintain,
2223
}) : maintain = maintain ?? defaultMaintain,
2324
super(
24-
delay: delay,
25-
duration: duration,
2625
begin: !(end ?? neutralValue),
2726
end: end ?? neutralValue,
2827
);

0 commit comments

Comments
 (0)