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

Add missing `@required` (#7904)

These arguments are actually required because we assert that they're not null.
parent e46f6e76
......@@ -13,7 +13,7 @@ class DefaultTextStyle extends InheritedWidget {
/// Creates a default text style for the given subtree.
///
/// Consider using [DefaultTextStyle.merge] to inherit styling information
/// from a the current default text style for a given [BuildContext].
/// from the current default text style for a given [BuildContext].
DefaultTextStyle({
Key key,
@required this.style,
......@@ -21,7 +21,7 @@ class DefaultTextStyle extends InheritedWidget {
this.softWrap: true,
this.overflow: TextOverflow.clip,
this.maxLines,
Widget child
@required Widget child,
}) : super(key: key, child: child) {
assert(style != null);
assert(softWrap != null);
......@@ -32,6 +32,9 @@ class DefaultTextStyle extends InheritedWidget {
/// A const-constructible default text style that provides fallback values.
///
/// Returned from [of] when the given [BuildContext] doesn't have an enclosing default text style.
///
/// This constructor creates a [DefaultTextStyle] that lacks a [child], which
/// means the constructed value cannot be incorporated into the tree.
const DefaultTextStyle.fallback()
: style = const TextStyle(),
textAlign = null,
......@@ -53,7 +56,7 @@ class DefaultTextStyle extends InheritedWidget {
bool softWrap,
TextOverflow overflow,
int maxLines,
Widget child
@required Widget child,
}) {
assert(context != null);
assert(child != null);
......
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