Commit d52c0a8f authored by Adam Barth's avatar Adam Barth Committed by GitHub

Add some `@required` annotations to transitions.dart (#8866)

Fixes #6382
parent 6e20d62b
...@@ -99,10 +99,10 @@ class _AnimatedState extends State<AnimatedWidget> { ...@@ -99,10 +99,10 @@ class _AnimatedState extends State<AnimatedWidget> {
class SlideTransition extends AnimatedWidget { class SlideTransition extends AnimatedWidget {
/// Creates a fractional translation transition. /// Creates a fractional translation transition.
/// ///
/// The [position] argument is required. /// The [position] argument must not be null.
SlideTransition({ SlideTransition({
Key key, Key key,
Animation<FractionalOffset> position, @required Animation<FractionalOffset> position,
this.transformHitTests: true, this.transformHitTests: true,
this.child, this.child,
}) : super(key: key, listenable: position); }) : super(key: key, listenable: position);
...@@ -138,11 +138,11 @@ class SlideTransition extends AnimatedWidget { ...@@ -138,11 +138,11 @@ class SlideTransition extends AnimatedWidget {
class ScaleTransition extends AnimatedWidget { class ScaleTransition extends AnimatedWidget {
/// Creates a scale transition. /// Creates a scale transition.
/// ///
/// The [scale] argument is required. The [alignment] argument defaults to /// The [scale] argument must not be null. The [alignment] argument defaults
/// [FractionalOffset.center]. /// to [FractionalOffset.center].
ScaleTransition({ ScaleTransition({
Key key, Key key,
Animation<double> scale, @required Animation<double> scale,
this.alignment: FractionalOffset.center, this.alignment: FractionalOffset.center,
this.child, this.child,
}) : super(key: key, listenable: scale); }) : super(key: key, listenable: scale);
...@@ -180,10 +180,10 @@ class ScaleTransition extends AnimatedWidget { ...@@ -180,10 +180,10 @@ class ScaleTransition extends AnimatedWidget {
class RotationTransition extends AnimatedWidget { class RotationTransition extends AnimatedWidget {
/// Creates a rotation transition. /// Creates a rotation transition.
/// ///
/// The [turns] argument is required. /// The [turns] argument must not be null.
RotationTransition({ RotationTransition({
Key key, Key key,
Animation<double> turns, @required Animation<double> turns,
this.child, this.child,
}) : super(key: key, listenable: turns); }) : super(key: key, listenable: turns);
...@@ -215,13 +215,13 @@ class RotationTransition extends AnimatedWidget { ...@@ -215,13 +215,13 @@ class RotationTransition extends AnimatedWidget {
class SizeTransition extends AnimatedWidget { class SizeTransition extends AnimatedWidget {
/// Creates a size transition. /// Creates a size transition.
/// ///
/// The [sizeFactor] argument is required. The [axis] argument defaults to /// The [sizeFactor] argument must not be null. The [axis] argument defaults
/// [Axis.vertical]. The [axisAlignment] defaults to 0.5, which centers the /// to [Axis.vertical]. The [axisAlignment] defaults to 0.5, which centers the
/// child along the main axis during the transition. /// child along the main axis during the transition.
SizeTransition({ SizeTransition({
Key key, Key key,
this.axis: Axis.vertical, this.axis: Axis.vertical,
Animation<double> sizeFactor, @required Animation<double> sizeFactor,
this.axisAlignment: 0.5, this.axisAlignment: 0.5,
this.child, this.child,
}) : super(key: key, listenable: sizeFactor) { }) : super(key: key, listenable: sizeFactor) {
...@@ -267,10 +267,10 @@ class SizeTransition extends AnimatedWidget { ...@@ -267,10 +267,10 @@ class SizeTransition extends AnimatedWidget {
class FadeTransition extends AnimatedWidget { class FadeTransition extends AnimatedWidget {
/// Creates an opacity transition. /// Creates an opacity transition.
/// ///
/// The [opacity] argument is required. /// The [opacity] argument must not be null.
FadeTransition({ FadeTransition({
Key key, Key key,
Animation<double> opacity, @required Animation<double> opacity,
this.child, this.child,
}) : super(key: key, listenable: opacity); }) : super(key: key, listenable: opacity);
...@@ -319,10 +319,10 @@ class RelativeRectTween extends Tween<RelativeRect> { ...@@ -319,10 +319,10 @@ class RelativeRectTween extends Tween<RelativeRect> {
class PositionedTransition extends AnimatedWidget { class PositionedTransition extends AnimatedWidget {
/// Creates a transition for [Positioned]. /// Creates a transition for [Positioned].
/// ///
/// The [rect] argument is required. /// The [rect] argument must not be null.
PositionedTransition({ PositionedTransition({
Key key, Key key,
Animation<RelativeRect> rect, @required Animation<RelativeRect> rect,
@required this.child, @required this.child,
}) : super(key: key, listenable: rect); }) : super(key: key, listenable: rect);
...@@ -355,7 +355,7 @@ class RelativePositionedTransition extends AnimatedWidget { ...@@ -355,7 +355,7 @@ class RelativePositionedTransition extends AnimatedWidget {
/// ///
/// Each frame, the [Positioned] widget will be configured to represent the /// Each frame, the [Positioned] widget will be configured to represent the
/// current value of the [rect] argument assuming that the stack has the given /// current value of the [rect] argument assuming that the stack has the given
/// [size]. Both [rect] and [size] must be non-null. /// [size]. Both [rect] and [size] must not be null.
RelativePositionedTransition({ RelativePositionedTransition({
Key key, Key key,
@required Animation<Rect> rect, @required Animation<Rect> rect,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment