parent
93b90362fd
commit
9b5d1fbe1e
@ -14,7 +14,9 @@ class FractionalOffset {
|
|||||||
/// Creates a fractional offset.
|
/// Creates a fractional offset.
|
||||||
///
|
///
|
||||||
/// The [dx] and [dy] arguments must not be null.
|
/// The [dx] and [dy] arguments must not be null.
|
||||||
const FractionalOffset(this.dx, this.dy);
|
const FractionalOffset(this.dx, this.dy)
|
||||||
|
: assert(dx != null),
|
||||||
|
assert(dy != null);
|
||||||
|
|
||||||
/// The distance fraction in the horizontal direction.
|
/// The distance fraction in the horizontal direction.
|
||||||
///
|
///
|
||||||
|
@ -167,19 +167,18 @@ class Banner extends StatelessWidget {
|
|||||||
/// Creates a banner.
|
/// Creates a banner.
|
||||||
///
|
///
|
||||||
/// The [message] and [location] arguments must not be null.
|
/// The [message] and [location] arguments must not be null.
|
||||||
Banner({
|
const Banner({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
@required this.message,
|
@required this.message,
|
||||||
@required this.location,
|
@required this.location,
|
||||||
this.color: _kColor,
|
this.color: _kColor,
|
||||||
this.textStyle: _kTextStyle,
|
this.textStyle: _kTextStyle,
|
||||||
}) : super(key: key) {
|
}) : assert(message != null),
|
||||||
assert(message != null);
|
assert(location != null),
|
||||||
assert(location != null);
|
assert(color != null),
|
||||||
assert(color != null);
|
assert(textStyle != null),
|
||||||
assert(textStyle != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// The widget to show behind the banner.
|
/// The widget to show behind the banner.
|
||||||
final Widget child;
|
final Widget child;
|
||||||
@ -215,7 +214,7 @@ class Banner extends StatelessWidget {
|
|||||||
/// Does nothing in release mode.
|
/// Does nothing in release mode.
|
||||||
class CheckedModeBanner extends StatelessWidget {
|
class CheckedModeBanner extends StatelessWidget {
|
||||||
/// Creates a checked mode banner.
|
/// Creates a checked mode banner.
|
||||||
CheckedModeBanner({
|
const CheckedModeBanner({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.child
|
@required this.child
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
@ -65,13 +65,12 @@ class Opacity extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// The [opacity] argument must not be null and must be between 0.0 and 1.0
|
/// The [opacity] argument must not be null and must be between 0.0 and 1.0
|
||||||
/// (inclusive).
|
/// (inclusive).
|
||||||
Opacity({
|
const Opacity({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.opacity,
|
@required this.opacity,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(opacity != null && opacity >= 0.0 && opacity <= 1.0),
|
||||||
assert(opacity != null && opacity >= 0.0 && opacity <= 1.0);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The fraction to scale the child's alpha value.
|
/// The fraction to scale the child's alpha value.
|
||||||
///
|
///
|
||||||
@ -108,15 +107,14 @@ class ShaderMask extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that applies a mask generated by a [Shader] to its child.
|
/// Creates a widget that applies a mask generated by a [Shader] to its child.
|
||||||
///
|
///
|
||||||
/// The [shaderCallback] and [blendMode] arguments must not be null.
|
/// The [shaderCallback] and [blendMode] arguments must not be null.
|
||||||
ShaderMask({
|
const ShaderMask({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.shaderCallback,
|
@required this.shaderCallback,
|
||||||
this.blendMode: BlendMode.modulate,
|
this.blendMode: BlendMode.modulate,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(shaderCallback != null),
|
||||||
assert(shaderCallback != null);
|
assert(blendMode != null),
|
||||||
assert(blendMode != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Called to creates the [Shader] that generates the mask.
|
/// Called to creates the [Shader] that generates the mask.
|
||||||
///
|
///
|
||||||
@ -154,13 +152,12 @@ class BackdropFilter extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a backdrop filter.
|
/// Creates a backdrop filter.
|
||||||
///
|
///
|
||||||
/// The [filter] argument must not be null.
|
/// The [filter] argument must not be null.
|
||||||
BackdropFilter({
|
const BackdropFilter({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.filter,
|
@required this.filter,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(filter != null),
|
||||||
assert(filter != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The image filter to apply to the existing painted content before painting the child.
|
/// The image filter to apply to the existing painted content before painting the child.
|
||||||
///
|
///
|
||||||
@ -206,10 +203,9 @@ class BackdropFilter extends SingleChildRenderObjectWidget {
|
|||||||
/// * [Canvas].
|
/// * [Canvas].
|
||||||
class CustomPaint extends SingleChildRenderObjectWidget {
|
class CustomPaint extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that delegates its painting.
|
/// Creates a widget that delegates its painting.
|
||||||
CustomPaint({ Key key, this.painter, this.foregroundPainter, this.size: Size.zero, Widget child })
|
const CustomPaint({ Key key, this.painter, this.foregroundPainter, this.size: Size.zero, Widget child })
|
||||||
: super(key: key, child: child) {
|
: assert(size != null),
|
||||||
assert(size != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The painter that paints before the children.
|
/// The painter that paints before the children.
|
||||||
final CustomPainter painter;
|
final CustomPainter painter;
|
||||||
@ -292,7 +288,7 @@ class ClipRect extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// If [clipper] is null, the clip will match the layout size and position of
|
/// If [clipper] is null, the clip will match the layout size and position of
|
||||||
/// the child.
|
/// the child.
|
||||||
ClipRect({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
const ClipRect({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
/// If non-null, determines which clip to use.
|
/// If non-null, determines which clip to use.
|
||||||
final CustomClipper<Rect> clipper;
|
final CustomClipper<Rect> clipper;
|
||||||
@ -330,14 +326,13 @@ class ClipRRect extends SingleChildRenderObjectWidget {
|
|||||||
/// right-angled corners.
|
/// right-angled corners.
|
||||||
///
|
///
|
||||||
/// If [clipper] is non-null, then [borderRadius] is ignored.
|
/// If [clipper] is non-null, then [borderRadius] is ignored.
|
||||||
ClipRRect({
|
const ClipRRect({
|
||||||
Key key,
|
Key key,
|
||||||
this.borderRadius,
|
this.borderRadius,
|
||||||
this.clipper,
|
this.clipper,
|
||||||
Widget child,
|
Widget child,
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(borderRadius != null || clipper != null),
|
||||||
assert(borderRadius != null || clipper != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The border radius of the rounded corners.
|
/// The border radius of the rounded corners.
|
||||||
///
|
///
|
||||||
@ -379,7 +374,7 @@ class ClipOval extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// If [clipper] is null, the oval will be inscribed into the layout size and
|
/// If [clipper] is null, the oval will be inscribed into the layout size and
|
||||||
/// position of the child.
|
/// position of the child.
|
||||||
ClipOval({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
const ClipOval({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
/// If non-null, determines which clip to use.
|
/// If non-null, determines which clip to use.
|
||||||
///
|
///
|
||||||
@ -425,7 +420,7 @@ class ClipPath extends SingleChildRenderObjectWidget {
|
|||||||
/// size and location of the child. However, rather than use this default,
|
/// size and location of the child. However, rather than use this default,
|
||||||
/// consider using a [ClipRect], which can achieve the same effect more
|
/// consider using a [ClipRect], which can achieve the same effect more
|
||||||
/// efficiently.
|
/// efficiently.
|
||||||
ClipPath({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
const ClipPath({ Key key, this.clipper, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
/// If non-null, determines which clip to use.
|
/// If non-null, determines which clip to use.
|
||||||
///
|
///
|
||||||
@ -451,20 +446,18 @@ class ClipPath extends SingleChildRenderObjectWidget {
|
|||||||
/// A widget representing a physical layer that clips its children to a shape.
|
/// A widget representing a physical layer that clips its children to a shape.
|
||||||
class PhysicalModel extends SingleChildRenderObjectWidget {
|
class PhysicalModel extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a physical model with a rounded-rectangular clip.
|
/// Creates a physical model with a rounded-rectangular clip.
|
||||||
PhysicalModel({
|
const PhysicalModel({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.shape,
|
@required this.shape,
|
||||||
this.borderRadius: BorderRadius.zero,
|
this.borderRadius: BorderRadius.zero,
|
||||||
@required this.elevation,
|
@required this.elevation,
|
||||||
@required this.color,
|
@required this.color,
|
||||||
Widget child,
|
Widget child,
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(shape != null),
|
||||||
if (shape == BoxShape.rectangle)
|
assert(borderRadius != null),
|
||||||
assert(borderRadius != null);
|
assert(elevation != null),
|
||||||
assert(shape != null);
|
assert(color != null),
|
||||||
assert(elevation != null);
|
super(key: key, child: child);
|
||||||
assert(color != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The type of shape.
|
/// The type of shape.
|
||||||
final BoxShape shape;
|
final BoxShape shape;
|
||||||
@ -473,6 +466,8 @@ class PhysicalModel extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// Values are clamped so that horizontal and vertical radii sums do not
|
/// Values are clamped so that horizontal and vertical radii sums do not
|
||||||
/// exceed width/height.
|
/// exceed width/height.
|
||||||
|
///
|
||||||
|
/// This is ignored if the [shape] is not [BoxShape.rectangle].
|
||||||
final BorderRadius borderRadius;
|
final BorderRadius borderRadius;
|
||||||
|
|
||||||
/// The z-coordinate at which to place this physical object.
|
/// The z-coordinate at which to place this physical object.
|
||||||
@ -501,16 +496,15 @@ class Transform extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that transforms its child.
|
/// Creates a widget that transforms its child.
|
||||||
///
|
///
|
||||||
/// The [transform] argument must not be null.
|
/// The [transform] argument must not be null.
|
||||||
Transform({
|
const Transform({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.transform,
|
@required this.transform,
|
||||||
this.origin,
|
this.origin,
|
||||||
this.alignment,
|
this.alignment,
|
||||||
this.transformHitTests: true,
|
this.transformHitTests: true,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(transform != null),
|
||||||
assert(transform != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The matrix to transform the child by during painting.
|
/// The matrix to transform the child by during painting.
|
||||||
final Matrix4 transform;
|
final Matrix4 transform;
|
||||||
@ -554,15 +548,14 @@ class FittedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that scales and positions its child within itself according to [fit].
|
/// Creates a widget that scales and positions its child within itself according to [fit].
|
||||||
///
|
///
|
||||||
/// The [fit] and [alignment] arguments must not be null.
|
/// The [fit] and [alignment] arguments must not be null.
|
||||||
FittedBox({
|
const FittedBox({
|
||||||
Key key,
|
Key key,
|
||||||
this.fit: BoxFit.contain,
|
this.fit: BoxFit.contain,
|
||||||
this.alignment: FractionalOffset.center,
|
this.alignment: FractionalOffset.center,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(fit != null),
|
||||||
assert(fit != null);
|
assert(alignment != null),
|
||||||
assert(alignment != null && alignment.dx != null && alignment.dy != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// How to inscribe the child into the space allocated during layout.
|
/// How to inscribe the child into the space allocated during layout.
|
||||||
final BoxFit fit;
|
final BoxFit fit;
|
||||||
@ -591,14 +584,13 @@ class FractionalTranslation extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that translates its child's painting.
|
/// Creates a widget that translates its child's painting.
|
||||||
///
|
///
|
||||||
/// The [translation] argument must not be null.
|
/// The [translation] argument must not be null.
|
||||||
FractionalTranslation({
|
const FractionalTranslation({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.translation,
|
@required this.translation,
|
||||||
this.transformHitTests: true,
|
this.transformHitTests: true,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(translation != null),
|
||||||
assert(translation != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The offset by which to translate the child, as a multiple of its size.
|
/// The offset by which to translate the child, as a multiple of its size.
|
||||||
final FractionalOffset translation;
|
final FractionalOffset translation;
|
||||||
@ -626,13 +618,12 @@ class RotatedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// A widget that rotates its child.
|
/// A widget that rotates its child.
|
||||||
///
|
///
|
||||||
/// The [quarterTurns] argument must not be null.
|
/// The [quarterTurns] argument must not be null.
|
||||||
RotatedBox({
|
const RotatedBox({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.quarterTurns,
|
@required this.quarterTurns,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(quarterTurns != null),
|
||||||
assert(quarterTurns != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The number of clockwise quarter turns the child should be rotated.
|
/// The number of clockwise quarter turns the child should be rotated.
|
||||||
final int quarterTurns;
|
final int quarterTurns;
|
||||||
@ -656,13 +647,12 @@ class Padding extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that insets its child.
|
/// Creates a widget that insets its child.
|
||||||
///
|
///
|
||||||
/// The [padding] argument must not be null.
|
/// The [padding] argument must not be null.
|
||||||
Padding({
|
const Padding({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.padding,
|
@required this.padding,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(padding != null),
|
||||||
assert(padding != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The amount of space by which to inset the child.
|
/// The amount of space by which to inset the child.
|
||||||
final EdgeInsets padding;
|
final EdgeInsets padding;
|
||||||
@ -703,17 +693,16 @@ class Align extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates an alignment widget.
|
/// Creates an alignment widget.
|
||||||
///
|
///
|
||||||
/// The alignment defaults to [FractionalOffset.center].
|
/// The alignment defaults to [FractionalOffset.center].
|
||||||
Align({
|
const Align({
|
||||||
Key key,
|
Key key,
|
||||||
this.alignment: FractionalOffset.center,
|
this.alignment: FractionalOffset.center,
|
||||||
this.widthFactor,
|
this.widthFactor,
|
||||||
this.heightFactor,
|
this.heightFactor,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(alignment != null),
|
||||||
assert(alignment != null && alignment.dx != null && alignment.dy != null);
|
assert(widthFactor == null || widthFactor >= 0.0),
|
||||||
assert(widthFactor == null || widthFactor >= 0.0);
|
assert(heightFactor == null || heightFactor >= 0.0),
|
||||||
assert(heightFactor == null || heightFactor >= 0.0);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// How to align the child.
|
/// How to align the child.
|
||||||
///
|
///
|
||||||
@ -774,7 +763,7 @@ class Align extends SingleChildRenderObjectWidget {
|
|||||||
/// rather than just centering it.
|
/// rather than just centering it.
|
||||||
class Center extends Align {
|
class Center extends Align {
|
||||||
/// Creates a widget that centers its child.
|
/// Creates a widget that centers its child.
|
||||||
Center({ Key key, double widthFactor, double heightFactor, Widget child })
|
const Center({ Key key, double widthFactor, double heightFactor, Widget child })
|
||||||
: super(key: key, widthFactor: widthFactor, heightFactor: heightFactor, child: child);
|
: super(key: key, widthFactor: widthFactor, heightFactor: heightFactor, child: child);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -798,13 +787,12 @@ class CustomSingleChildLayout extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a custom single child layout.
|
/// Creates a custom single child layout.
|
||||||
///
|
///
|
||||||
/// The [delegate] argument must not be null.
|
/// The [delegate] argument must not be null.
|
||||||
CustomSingleChildLayout({
|
const CustomSingleChildLayout({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.delegate,
|
@required this.delegate,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(delegate != null),
|
||||||
assert(delegate != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The delegate that controls the layout of the child.
|
/// The delegate that controls the layout of the child.
|
||||||
final SingleChildLayoutDelegate delegate;
|
final SingleChildLayoutDelegate delegate;
|
||||||
@ -830,10 +818,9 @@ class LayoutId extends ParentDataWidget<CustomMultiChildLayout> {
|
|||||||
Key key,
|
Key key,
|
||||||
@required this.id,
|
@required this.id,
|
||||||
@required Widget child
|
@required Widget child
|
||||||
}) : super(key: key ?? new ValueKey<Object>(id), child: child) {
|
}) : assert(child != null),
|
||||||
assert(child != null);
|
assert(id != null),
|
||||||
assert(id != null);
|
super(key: key ?? new ValueKey<Object>(id), child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// An object representing the identity of this child.
|
/// An object representing the identity of this child.
|
||||||
final Object id;
|
final Object id;
|
||||||
@ -890,9 +877,8 @@ class CustomMultiChildLayout extends MultiChildRenderObjectWidget {
|
|||||||
Key key,
|
Key key,
|
||||||
@required this.delegate,
|
@required this.delegate,
|
||||||
List<Widget> children: const <Widget>[],
|
List<Widget> children: const <Widget>[],
|
||||||
}) : super(key: key, children: children) {
|
}) : assert(delegate != null),
|
||||||
assert(delegate != null);
|
super(key: key, children: children);
|
||||||
}
|
|
||||||
|
|
||||||
/// The delegate that controls the layout of the children.
|
/// The delegate that controls the layout of the children.
|
||||||
final MultiChildLayoutDelegate delegate;
|
final MultiChildLayoutDelegate delegate;
|
||||||
@ -992,8 +978,8 @@ class ConstrainedBox extends SingleChildRenderObjectWidget {
|
|||||||
Key key,
|
Key key,
|
||||||
@required this.constraints,
|
@required this.constraints,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(constraints != null),
|
||||||
assert(constraints != null);
|
super(key: key, child: child) {
|
||||||
assert(constraints.debugAssertIsValid());
|
assert(constraints.debugAssertIsValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1028,17 +1014,16 @@ class FractionallySizedBox extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// If non-null, the [widthFactor] and [heightFactor] arguments must be
|
/// If non-null, the [widthFactor] and [heightFactor] arguments must be
|
||||||
/// non-negative.
|
/// non-negative.
|
||||||
FractionallySizedBox({
|
const FractionallySizedBox({
|
||||||
Key key,
|
Key key,
|
||||||
this.alignment: FractionalOffset.center,
|
this.alignment: FractionalOffset.center,
|
||||||
this.widthFactor,
|
this.widthFactor,
|
||||||
this.heightFactor,
|
this.heightFactor,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(alignment != null),
|
||||||
assert(alignment != null && alignment.dx != null && alignment.dy != null);
|
assert(widthFactor == null || widthFactor >= 0.0),
|
||||||
assert(widthFactor == null || widthFactor >= 0.0);
|
assert(heightFactor == null || heightFactor >= 0.0),
|
||||||
assert(heightFactor == null || heightFactor >= 0.0);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// If non-null, the fraction of the incoming width given to the child.
|
/// If non-null, the fraction of the incoming width given to the child.
|
||||||
///
|
///
|
||||||
@ -1105,15 +1090,14 @@ class LimitedBox extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// The [maxWidth] and [maxHeight] arguments must not be null and must not be
|
/// The [maxWidth] and [maxHeight] arguments must not be null and must not be
|
||||||
/// negative.
|
/// negative.
|
||||||
LimitedBox({
|
const LimitedBox({
|
||||||
Key key,
|
Key key,
|
||||||
this.maxWidth: double.INFINITY,
|
this.maxWidth: double.INFINITY,
|
||||||
this.maxHeight: double.INFINITY,
|
this.maxHeight: double.INFINITY,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(maxWidth != null && maxWidth >= 0.0),
|
||||||
assert(maxWidth != null && maxWidth >= 0.0);
|
assert(maxHeight != null && maxHeight >= 0.0),
|
||||||
assert(maxHeight != null && maxHeight >= 0.0);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The maximum width limit to apply in the absence of a maxWidth constraint.
|
/// The maximum width limit to apply in the absence of a maxWidth constraint.
|
||||||
final double maxWidth;
|
final double maxWidth;
|
||||||
@ -1150,7 +1134,7 @@ class LimitedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// See [RenderOverflowBox] for details.
|
/// See [RenderOverflowBox] for details.
|
||||||
class OverflowBox extends SingleChildRenderObjectWidget {
|
class OverflowBox extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that lets its child overflow itself.
|
/// Creates a widget that lets its child overflow itself.
|
||||||
OverflowBox({
|
const OverflowBox({
|
||||||
Key key,
|
Key key,
|
||||||
this.alignment: FractionalOffset.center,
|
this.alignment: FractionalOffset.center,
|
||||||
this.minWidth,
|
this.minWidth,
|
||||||
@ -1227,15 +1211,14 @@ class SizedOverflowBox extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget of a given size that lets its child overflow.
|
/// Creates a widget of a given size that lets its child overflow.
|
||||||
///
|
///
|
||||||
/// The [size] argument must not be null.
|
/// The [size] argument must not be null.
|
||||||
SizedOverflowBox({
|
const SizedOverflowBox({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.size,
|
@required this.size,
|
||||||
this.alignment: FractionalOffset.center,
|
this.alignment: FractionalOffset.center,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(size != null),
|
||||||
assert(size != null);
|
assert(alignment != null),
|
||||||
assert(alignment != null && alignment.dx != null && alignment.dy != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// How to align the child.
|
/// How to align the child.
|
||||||
///
|
///
|
||||||
@ -1280,10 +1263,9 @@ class SizedOverflowBox extends SingleChildRenderObjectWidget {
|
|||||||
/// room in the parent.
|
/// room in the parent.
|
||||||
class Offstage extends SingleChildRenderObjectWidget {
|
class Offstage extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that visually hides its child.
|
/// Creates a widget that visually hides its child.
|
||||||
Offstage({ Key key, this.offstage: true, Widget child })
|
const Offstage({ Key key, this.offstage: true, Widget child })
|
||||||
: super(key: key, child: child) {
|
: assert(offstage != null),
|
||||||
assert(offstage != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Whether the child is hidden from the rest of the tree.
|
/// Whether the child is hidden from the rest of the tree.
|
||||||
///
|
///
|
||||||
@ -1355,13 +1337,12 @@ class AspectRatio extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget with a specific aspect ratio.
|
/// Creates a widget with a specific aspect ratio.
|
||||||
///
|
///
|
||||||
/// The [aspectRatio] argument must not be null.
|
/// The [aspectRatio] argument must not be null.
|
||||||
AspectRatio({
|
const AspectRatio({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.aspectRatio,
|
@required this.aspectRatio,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(aspectRatio != null),
|
||||||
assert(aspectRatio != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The aspect ratio to attempt to use.
|
/// The aspect ratio to attempt to use.
|
||||||
///
|
///
|
||||||
@ -1400,7 +1381,7 @@ class IntrinsicWidth extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that sizes its child to the child's intrinsic width.
|
/// Creates a widget that sizes its child to the child's intrinsic width.
|
||||||
///
|
///
|
||||||
/// This class is relatively expensive. Avoid using it where possible.
|
/// This class is relatively expensive. Avoid using it where possible.
|
||||||
IntrinsicWidth({ Key key, this.stepWidth, this.stepHeight, Widget child })
|
const IntrinsicWidth({ Key key, this.stepWidth, this.stepHeight, Widget child })
|
||||||
: super(key: key, child: child);
|
: super(key: key, child: child);
|
||||||
|
|
||||||
/// If non-null, force the child's width to be a multiple of this value.
|
/// If non-null, force the child's width to be a multiple of this value.
|
||||||
@ -1431,7 +1412,7 @@ class IntrinsicHeight extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that sizes its child to the child's intrinsic height.
|
/// Creates a widget that sizes its child to the child's intrinsic height.
|
||||||
///
|
///
|
||||||
/// This class is relatively expensive. Avoid using it where possible.
|
/// This class is relatively expensive. Avoid using it where possible.
|
||||||
IntrinsicHeight({ Key key, Widget child }) : super(key: key, child: child);
|
const IntrinsicHeight({ Key key, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderIntrinsicHeight createRenderObject(BuildContext context) => new RenderIntrinsicHeight();
|
RenderIntrinsicHeight createRenderObject(BuildContext context) => new RenderIntrinsicHeight();
|
||||||
@ -1449,15 +1430,14 @@ class Baseline extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that positions its child according to the child's baseline.
|
/// Creates a widget that positions its child according to the child's baseline.
|
||||||
///
|
///
|
||||||
/// The [baseline] and [baselineType] arguments must not be null.
|
/// The [baseline] and [baselineType] arguments must not be null.
|
||||||
Baseline({
|
const Baseline({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.baseline,
|
@required this.baseline,
|
||||||
@required this.baselineType,
|
@required this.baselineType,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(baseline != null),
|
||||||
assert(baseline != null);
|
assert(baselineType != null),
|
||||||
assert(baselineType != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The number of logical pixels from the top of this box at which to position
|
/// The number of logical pixels from the top of this box at which to position
|
||||||
/// the child's baseline.
|
/// the child's baseline.
|
||||||
@ -1502,7 +1482,7 @@ class Baseline extends SingleChildRenderObjectWidget {
|
|||||||
/// * [SliverGrid], which displays multiple box widgets in arbitrary positions.
|
/// * [SliverGrid], which displays multiple box widgets in arbitrary positions.
|
||||||
class SliverToBoxAdapter extends SingleChildRenderObjectWidget {
|
class SliverToBoxAdapter extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a sliver that contains a single box widget.
|
/// Creates a sliver that contains a single box widget.
|
||||||
SliverToBoxAdapter({
|
const SliverToBoxAdapter({
|
||||||
Key key,
|
Key key,
|
||||||
Widget child,
|
Widget child,
|
||||||
}) : super(key: key, child: child);
|
}) : super(key: key, child: child);
|
||||||
@ -1531,13 +1511,12 @@ class SliverPadding extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a sliver that applies padding on each side of another sliver.
|
/// Creates a sliver that applies padding on each side of another sliver.
|
||||||
///
|
///
|
||||||
/// The [padding] argument must not be null.
|
/// The [padding] argument must not be null.
|
||||||
SliverPadding({
|
const SliverPadding({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.padding,
|
@required this.padding,
|
||||||
Widget sliver,
|
Widget sliver,
|
||||||
}) : super(key: key, child: sliver) {
|
}) : assert(padding != null),
|
||||||
assert(padding != null);
|
super(key: key, child: sliver);
|
||||||
}
|
|
||||||
|
|
||||||
/// The amount of space by which to inset the child sliver.
|
/// The amount of space by which to inset the child sliver.
|
||||||
final EdgeInsets padding;
|
final EdgeInsets padding;
|
||||||
@ -1576,9 +1555,8 @@ class BlockBody extends MultiChildRenderObjectWidget {
|
|||||||
Key key,
|
Key key,
|
||||||
this.mainAxis: Axis.vertical,
|
this.mainAxis: Axis.vertical,
|
||||||
List<Widget> children: const <Widget>[],
|
List<Widget> children: const <Widget>[],
|
||||||
}) : super(key: key, children: children) {
|
}) : assert(mainAxis != null),
|
||||||
assert(mainAxis != null);
|
super(key: key, children: children);
|
||||||
}
|
|
||||||
|
|
||||||
/// The direction to use as the main axis.
|
/// The direction to use as the main axis.
|
||||||
final Axis mainAxis;
|
final Axis mainAxis;
|
||||||
@ -1730,7 +1708,7 @@ class Positioned extends ParentDataWidget<Stack> {
|
|||||||
/// [width]), and only two out of the three vertical values ([top],
|
/// [width]), and only two out of the three vertical values ([top],
|
||||||
/// [bottom], [height]), can be set. In each case, at least one of
|
/// [bottom], [height]), can be set. In each case, at least one of
|
||||||
/// the three must be null.
|
/// the three must be null.
|
||||||
Positioned({
|
const Positioned({
|
||||||
Key key,
|
Key key,
|
||||||
this.left,
|
this.left,
|
||||||
this.top,
|
this.top,
|
||||||
@ -1739,10 +1717,9 @@ class Positioned extends ParentDataWidget<Stack> {
|
|||||||
this.width,
|
this.width,
|
||||||
this.height,
|
this.height,
|
||||||
@required Widget child
|
@required Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(left == null || right == null || width == null),
|
||||||
assert(left == null || right == null || width == null);
|
assert(top == null || bottom == null || height == null),
|
||||||
assert(top == null || bottom == null || height == null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Creates a Positioned object with the values from the given [Rect].
|
/// Creates a Positioned object with the values from the given [Rect].
|
||||||
///
|
///
|
||||||
@ -1956,12 +1933,12 @@ class Flex extends MultiChildRenderObjectWidget {
|
|||||||
this.crossAxisAlignment: CrossAxisAlignment.center,
|
this.crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
this.textBaseline,
|
this.textBaseline,
|
||||||
List<Widget> children: const <Widget>[],
|
List<Widget> children: const <Widget>[],
|
||||||
}) : super(key: key, children: children) {
|
}) : assert(direction != null),
|
||||||
assert(direction != null);
|
assert(mainAxisAlignment != null),
|
||||||
assert(mainAxisAlignment != null);
|
assert(mainAxisSize != null),
|
||||||
assert(mainAxisSize != null);
|
assert(crossAxisAlignment != null),
|
||||||
assert(crossAxisAlignment != null);
|
super(key: key, children: children) {
|
||||||
assert(crossAxisAlignment != CrossAxisAlignment.baseline || textBaseline != null);
|
assert(crossAxisAlignment != CrossAxisAlignment.baseline || textBaseline != null); // https://github.com/dart-lang/sdk/issues/29278
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The direction to use as the main axis.
|
/// The direction to use as the main axis.
|
||||||
@ -2185,7 +2162,7 @@ class Column extends Flex {
|
|||||||
class Flexible extends ParentDataWidget<Flex> {
|
class Flexible extends ParentDataWidget<Flex> {
|
||||||
/// Creates a widget that controls how a child of a [Row], [Column], or [Flex]
|
/// Creates a widget that controls how a child of a [Row], [Column], or [Flex]
|
||||||
/// flexes.
|
/// flexes.
|
||||||
Flexible({
|
const Flexible({
|
||||||
Key key,
|
Key key,
|
||||||
this.flex: 1,
|
this.flex: 1,
|
||||||
this.fit: FlexFit.loose,
|
this.fit: FlexFit.loose,
|
||||||
@ -2257,7 +2234,7 @@ class Flexible extends ParentDataWidget<Flex> {
|
|||||||
class Expanded extends Flexible {
|
class Expanded extends Flexible {
|
||||||
/// Creates a widget that expands a child of a [Row], [Column], or [Flex]
|
/// Creates a widget that expands a child of a [Row], [Column], or [Flex]
|
||||||
/// expand to fill the available space in the main axis.
|
/// expand to fill the available space in the main axis.
|
||||||
Expanded({
|
const Expanded({
|
||||||
Key key,
|
Key key,
|
||||||
int flex: 1,
|
int flex: 1,
|
||||||
@required Widget child,
|
@required Widget child,
|
||||||
@ -2419,9 +2396,9 @@ class Flow extends MultiChildRenderObjectWidget {
|
|||||||
Key key,
|
Key key,
|
||||||
@required this.delegate,
|
@required this.delegate,
|
||||||
List<Widget> children: const <Widget>[],
|
List<Widget> children: const <Widget>[],
|
||||||
}) : super(key: key, children: RepaintBoundary.wrapAll(children)) {
|
}) : assert(delegate != null),
|
||||||
assert(delegate != null);
|
super(key: key, children: RepaintBoundary.wrapAll(children));
|
||||||
}
|
// https://github.com/dart-lang/sdk/issues/29277
|
||||||
|
|
||||||
/// Creates a flow layout.
|
/// Creates a flow layout.
|
||||||
///
|
///
|
||||||
@ -2491,7 +2468,7 @@ class RichText extends LeafRenderObjectWidget {
|
|||||||
/// Creates a paragraph of rich text.
|
/// Creates a paragraph of rich text.
|
||||||
///
|
///
|
||||||
/// The [text], [softWrap], and [overflow] arguments must not be null.
|
/// The [text], [softWrap], and [overflow] arguments must not be null.
|
||||||
RichText({
|
const RichText({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.text,
|
@required this.text,
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
@ -2499,12 +2476,11 @@ class RichText extends LeafRenderObjectWidget {
|
|||||||
this.overflow: TextOverflow.clip,
|
this.overflow: TextOverflow.clip,
|
||||||
this.textScaleFactor: 1.0,
|
this.textScaleFactor: 1.0,
|
||||||
this.maxLines,
|
this.maxLines,
|
||||||
}) : super(key: key) {
|
}) : assert(text != null),
|
||||||
assert(text != null);
|
assert(softWrap != null),
|
||||||
assert(softWrap != null);
|
assert(overflow != null),
|
||||||
assert(overflow != null);
|
assert(textScaleFactor != null),
|
||||||
assert(textScaleFactor != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// The text to display in this widget.
|
/// The text to display in this widget.
|
||||||
final TextSpan text;
|
final TextSpan text;
|
||||||
@ -2564,7 +2540,7 @@ class RawImage extends LeafRenderObjectWidget {
|
|||||||
/// Creates a widget that displays an image.
|
/// Creates a widget that displays an image.
|
||||||
///
|
///
|
||||||
/// The [scale] and [repeat] arguments must not be null.
|
/// The [scale] and [repeat] arguments must not be null.
|
||||||
RawImage({
|
const RawImage({
|
||||||
Key key,
|
Key key,
|
||||||
this.image,
|
this.image,
|
||||||
this.width,
|
this.width,
|
||||||
@ -2575,10 +2551,9 @@ class RawImage extends LeafRenderObjectWidget {
|
|||||||
this.alignment,
|
this.alignment,
|
||||||
this.repeat: ImageRepeat.noRepeat,
|
this.repeat: ImageRepeat.noRepeat,
|
||||||
this.centerSlice
|
this.centerSlice
|
||||||
}) : super(key: key) {
|
}) : assert(scale != null),
|
||||||
assert(scale != null);
|
assert(repeat != null),
|
||||||
assert(repeat != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// The image to display.
|
/// The image to display.
|
||||||
final ui.Image image;
|
final ui.Image image;
|
||||||
@ -2686,14 +2661,13 @@ class DefaultAssetBundle extends InheritedWidget {
|
|||||||
/// Creates a widget that determines the default asset bundle for its descendants.
|
/// Creates a widget that determines the default asset bundle for its descendants.
|
||||||
///
|
///
|
||||||
/// The [bundle] and [child] arguments must not be null.
|
/// The [bundle] and [child] arguments must not be null.
|
||||||
DefaultAssetBundle({
|
const DefaultAssetBundle({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.bundle,
|
@required this.bundle,
|
||||||
@required Widget child
|
@required Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(bundle != null),
|
||||||
assert(bundle != null);
|
assert(child != null),
|
||||||
assert(child != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// The bundle to use as a default.
|
/// The bundle to use as a default.
|
||||||
final AssetBundle bundle;
|
final AssetBundle bundle;
|
||||||
@ -2729,15 +2703,13 @@ class WidgetToRenderBoxAdapter extends LeafRenderObjectWidget {
|
|||||||
/// The [renderBox] argument must not be null.
|
/// The [renderBox] argument must not be null.
|
||||||
WidgetToRenderBoxAdapter({
|
WidgetToRenderBoxAdapter({
|
||||||
@required this.renderBox,
|
@required this.renderBox,
|
||||||
this.onBuild
|
this.onBuild,
|
||||||
}) :
|
}) : assert(renderBox != null),
|
||||||
// WidgetToRenderBoxAdapter objects are keyed to their render box. This
|
// WidgetToRenderBoxAdapter objects are keyed to their render box. This
|
||||||
// prevents the widget being used in the widget hierarchy in two different
|
// prevents the widget being used in the widget hierarchy in two different
|
||||||
// places, which would cause the RenderBox to get inserted in multiple
|
// places, which would cause the RenderBox to get inserted in multiple
|
||||||
// places in the RenderObject tree.
|
// places in the RenderObject tree.
|
||||||
super(key: new GlobalObjectKey(renderBox)) {
|
super(key: new GlobalObjectKey(renderBox));
|
||||||
assert(renderBox != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The render box to place in the widget tree.
|
/// The render box to place in the widget tree.
|
||||||
final RenderBox renderBox;
|
final RenderBox renderBox;
|
||||||
@ -2772,7 +2744,7 @@ class Listener extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that forwards point events to callbacks.
|
/// Creates a widget that forwards point events to callbacks.
|
||||||
///
|
///
|
||||||
/// The [behavior] argument defaults to [HitTestBehavior.deferToChild].
|
/// The [behavior] argument defaults to [HitTestBehavior.deferToChild].
|
||||||
Listener({
|
const Listener({
|
||||||
Key key,
|
Key key,
|
||||||
this.onPointerDown,
|
this.onPointerDown,
|
||||||
this.onPointerMove,
|
this.onPointerMove,
|
||||||
@ -2780,9 +2752,8 @@ class Listener extends SingleChildRenderObjectWidget {
|
|||||||
this.onPointerCancel,
|
this.onPointerCancel,
|
||||||
this.behavior: HitTestBehavior.deferToChild,
|
this.behavior: HitTestBehavior.deferToChild,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(behavior != null),
|
||||||
assert(behavior != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Called when a pointer comes into contact with the screen at this object.
|
/// Called when a pointer comes into contact with the screen at this object.
|
||||||
final PointerDownEventListener onPointerDown;
|
final PointerDownEventListener onPointerDown;
|
||||||
@ -2858,7 +2829,7 @@ class Listener extends SingleChildRenderObjectWidget {
|
|||||||
/// for the surround tree.
|
/// for the surround tree.
|
||||||
class RepaintBoundary extends SingleChildRenderObjectWidget {
|
class RepaintBoundary extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that isolates repaints.
|
/// Creates a widget that isolates repaints.
|
||||||
RepaintBoundary({ Key key, Widget child }) : super(key: key, child: child);
|
const RepaintBoundary({ Key key, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
/// Wraps the given child in a [RepaintBoundary].
|
/// Wraps the given child in a [RepaintBoundary].
|
||||||
///
|
///
|
||||||
@ -2906,14 +2877,13 @@ class IgnorePointer extends SingleChildRenderObjectWidget {
|
|||||||
///
|
///
|
||||||
/// The [ignoring] argument must not be null. If [ignoringSemantics], this
|
/// The [ignoring] argument must not be null. If [ignoringSemantics], this
|
||||||
/// render object will be ignored for semantics if [ignoring] is true.
|
/// render object will be ignored for semantics if [ignoring] is true.
|
||||||
IgnorePointer({
|
const IgnorePointer({
|
||||||
Key key,
|
Key key,
|
||||||
this.ignoring: true,
|
this.ignoring: true,
|
||||||
this.ignoringSemantics,
|
this.ignoringSemantics,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(ignoring != null),
|
||||||
assert(ignoring != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Whether this widget is ignored during hit testing.
|
/// Whether this widget is ignored during hit testing.
|
||||||
///
|
///
|
||||||
@ -2966,13 +2936,12 @@ class AbsorbPointer extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that absorbs pointers during hit testing.
|
/// Creates a widget that absorbs pointers during hit testing.
|
||||||
///
|
///
|
||||||
/// The [absorbing] argument must not be null
|
/// The [absorbing] argument must not be null
|
||||||
AbsorbPointer({
|
const AbsorbPointer({
|
||||||
Key key,
|
Key key,
|
||||||
this.absorbing: true,
|
this.absorbing: true,
|
||||||
Widget child
|
Widget child
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(absorbing != null),
|
||||||
assert(absorbing != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// Whether this widget absorbs pointers during hit testing.
|
/// Whether this widget absorbs pointers during hit testing.
|
||||||
///
|
///
|
||||||
@ -3000,7 +2969,7 @@ class MetaData extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a widget that hold opaque meta data.
|
/// Creates a widget that hold opaque meta data.
|
||||||
///
|
///
|
||||||
/// The [behavior] argument defaults to [HitTestBehavior.deferToChild].
|
/// The [behavior] argument defaults to [HitTestBehavior.deferToChild].
|
||||||
MetaData({
|
const MetaData({
|
||||||
Key key,
|
Key key,
|
||||||
this.metaData,
|
this.metaData,
|
||||||
this.behavior: HitTestBehavior.deferToChild,
|
this.behavior: HitTestBehavior.deferToChild,
|
||||||
@ -3061,15 +3030,14 @@ class Semantics extends SingleChildRenderObjectWidget {
|
|||||||
/// Creates a semantic annotation.
|
/// Creates a semantic annotation.
|
||||||
///
|
///
|
||||||
/// The [container] argument must not be null.
|
/// The [container] argument must not be null.
|
||||||
Semantics({
|
const Semantics({
|
||||||
Key key,
|
Key key,
|
||||||
Widget child,
|
Widget child,
|
||||||
this.container: false,
|
this.container: false,
|
||||||
this.checked,
|
this.checked,
|
||||||
this.label
|
this.label
|
||||||
}) : super(key: key, child: child) {
|
}) : assert(container != null),
|
||||||
assert(container != null);
|
super(key: key, child: child);
|
||||||
}
|
|
||||||
|
|
||||||
/// If 'container' is true, this Widget will introduce a new node in
|
/// If 'container' is true, this Widget will introduce a new node in
|
||||||
/// the semantics tree. Otherwise, the semantics will be merged with
|
/// the semantics tree. Otherwise, the semantics will be merged with
|
||||||
@ -3138,7 +3106,7 @@ class Semantics extends SingleChildRenderObjectWidget {
|
|||||||
/// callbacks.
|
/// callbacks.
|
||||||
class MergeSemantics extends SingleChildRenderObjectWidget {
|
class MergeSemantics extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that merges the semantics of its descendants.
|
/// Creates a widget that merges the semantics of its descendants.
|
||||||
MergeSemantics({ Key key, Widget child }) : super(key: key, child: child);
|
const MergeSemantics({ Key key, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderMergeSemantics createRenderObject(BuildContext context) => new RenderMergeSemantics();
|
RenderMergeSemantics createRenderObject(BuildContext context) => new RenderMergeSemantics();
|
||||||
@ -3152,7 +3120,7 @@ class MergeSemantics extends SingleChildRenderObjectWidget {
|
|||||||
/// redundant with the chip label.
|
/// redundant with the chip label.
|
||||||
class ExcludeSemantics extends SingleChildRenderObjectWidget {
|
class ExcludeSemantics extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that drops all the semantics of its descendants.
|
/// Creates a widget that drops all the semantics of its descendants.
|
||||||
ExcludeSemantics({ Key key, Widget child }) : super(key: key, child: child);
|
const ExcludeSemantics({ Key key, Widget child }) : super(key: key, child: child);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderExcludeSemantics createRenderObject(BuildContext context) => new RenderExcludeSemantics();
|
RenderExcludeSemantics createRenderObject(BuildContext context) => new RenderExcludeSemantics();
|
||||||
@ -3163,12 +3131,11 @@ class ExcludeSemantics extends SingleChildRenderObjectWidget {
|
|||||||
/// Useful for attaching a key to an existing widget.
|
/// Useful for attaching a key to an existing widget.
|
||||||
class KeyedSubtree extends StatelessWidget {
|
class KeyedSubtree extends StatelessWidget {
|
||||||
/// Creates a widget that builds its child.
|
/// Creates a widget that builds its child.
|
||||||
KeyedSubtree({
|
const KeyedSubtree({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.child
|
@required this.child
|
||||||
}) : super(key: key) {
|
}) : assert(child != null),
|
||||||
assert(child != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// The widget below this widget in the tree.
|
/// The widget below this widget in the tree.
|
||||||
final Widget child;
|
final Widget child;
|
||||||
@ -3209,12 +3176,11 @@ class Builder extends StatelessWidget {
|
|||||||
/// Creates a widget that delegates its build to a callback.
|
/// Creates a widget that delegates its build to a callback.
|
||||||
///
|
///
|
||||||
/// The [builder] argument must not be null.
|
/// The [builder] argument must not be null.
|
||||||
Builder({
|
const Builder({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.builder
|
@required this.builder
|
||||||
}) : super(key: key) {
|
}) : assert(builder != null),
|
||||||
assert(builder != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// Called to obtain the child widget.
|
/// Called to obtain the child widget.
|
||||||
///
|
///
|
||||||
@ -3243,12 +3209,11 @@ class StatefulBuilder extends StatefulWidget {
|
|||||||
/// Creates a widget that both has state and delegates its build to a callback.
|
/// Creates a widget that both has state and delegates its build to a callback.
|
||||||
///
|
///
|
||||||
/// The [builder] argument must not be null.
|
/// The [builder] argument must not be null.
|
||||||
StatefulBuilder({
|
const StatefulBuilder({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.builder
|
@required this.builder
|
||||||
}) : super(key: key) {
|
}) : assert(builder != null),
|
||||||
assert(builder != null);
|
super(key: key);
|
||||||
}
|
|
||||||
|
|
||||||
/// Called to obtain the child widget.
|
/// Called to obtain the child widget.
|
||||||
///
|
///
|
||||||
|
@ -1339,9 +1339,9 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
|
|||||||
/// The [children] argument must not be null and must not contain any null
|
/// The [children] argument must not be null and must not contain any null
|
||||||
/// objects.
|
/// objects.
|
||||||
MultiChildRenderObjectWidget({ Key key, this.children: const <Widget>[] })
|
MultiChildRenderObjectWidget({ Key key, this.children: const <Widget>[] })
|
||||||
: super(key: key) {
|
: assert(children != null),
|
||||||
assert(children != null);
|
super(key: key) {
|
||||||
assert(!children.any((Widget child) => child == null));
|
assert(!children.any((Widget child) => child == null)); // https://github.com/dart-lang/sdk/issues/29276
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The widgets below this widget in the tree.
|
/// The widgets below this widget in the tree.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user