mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
fix nullability of parameters with redirecting factory constructors (#71547)
This commit is contained in:
parent
4d4d017aa5
commit
8f3a12f144
|
@ -176,31 +176,31 @@ class FlatButton extends MaterialButton {
|
||||||
///
|
///
|
||||||
/// The [icon], [label], and [clipBehavior] arguments must not be null.
|
/// The [icon], [label], and [clipBehavior] arguments must not be null.
|
||||||
factory FlatButton.icon({
|
factory FlatButton.icon({
|
||||||
Key key,
|
Key? key,
|
||||||
required VoidCallback onPressed,
|
required VoidCallback? onPressed,
|
||||||
VoidCallback onLongPress,
|
VoidCallback? onLongPress,
|
||||||
ValueChanged<bool> onHighlightChanged,
|
ValueChanged<bool>? onHighlightChanged,
|
||||||
MouseCursor mouseCursor,
|
MouseCursor? mouseCursor,
|
||||||
ButtonTextTheme textTheme,
|
ButtonTextTheme? textTheme,
|
||||||
Color textColor,
|
Color? textColor,
|
||||||
Color disabledTextColor,
|
Color? disabledTextColor,
|
||||||
Color color,
|
Color? color,
|
||||||
Color disabledColor,
|
Color? disabledColor,
|
||||||
Color focusColor,
|
Color? focusColor,
|
||||||
Color hoverColor,
|
Color? hoverColor,
|
||||||
Color highlightColor,
|
Color? highlightColor,
|
||||||
Color splashColor,
|
Color? splashColor,
|
||||||
Brightness colorBrightness,
|
Brightness? colorBrightness,
|
||||||
EdgeInsetsGeometry padding,
|
EdgeInsetsGeometry? padding,
|
||||||
ShapeBorder shape,
|
ShapeBorder? shape,
|
||||||
Clip clipBehavior,
|
Clip clipBehavior,
|
||||||
FocusNode focusNode,
|
FocusNode? focusNode,
|
||||||
bool autofocus,
|
bool autofocus,
|
||||||
MaterialTapTargetSize materialTapTargetSize,
|
MaterialTapTargetSize? materialTapTargetSize,
|
||||||
required Widget icon,
|
required Widget icon,
|
||||||
required Widget label,
|
required Widget label,
|
||||||
double minWidth,
|
double? minWidth,
|
||||||
double height,
|
double? height,
|
||||||
}) = _FlatButtonWithIcon;
|
}) = _FlatButtonWithIcon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -196,31 +196,31 @@ class RaisedButton extends MaterialButton {
|
||||||
/// The [elevation], [highlightElevation], [disabledElevation], [icon],
|
/// The [elevation], [highlightElevation], [disabledElevation], [icon],
|
||||||
/// [label], and [clipBehavior] arguments must not be null.
|
/// [label], and [clipBehavior] arguments must not be null.
|
||||||
factory RaisedButton.icon({
|
factory RaisedButton.icon({
|
||||||
Key key,
|
Key? key,
|
||||||
required VoidCallback onPressed,
|
required VoidCallback? onPressed,
|
||||||
VoidCallback onLongPress,
|
VoidCallback? onLongPress,
|
||||||
ValueChanged<bool> onHighlightChanged,
|
ValueChanged<bool>? onHighlightChanged,
|
||||||
MouseCursor mouseCursor,
|
MouseCursor? mouseCursor,
|
||||||
ButtonTextTheme textTheme,
|
ButtonTextTheme? textTheme,
|
||||||
Color textColor,
|
Color? textColor,
|
||||||
Color disabledTextColor,
|
Color? disabledTextColor,
|
||||||
Color color,
|
Color? color,
|
||||||
Color disabledColor,
|
Color? disabledColor,
|
||||||
Color focusColor,
|
Color? focusColor,
|
||||||
Color hoverColor,
|
Color? hoverColor,
|
||||||
Color highlightColor,
|
Color? highlightColor,
|
||||||
Color splashColor,
|
Color? splashColor,
|
||||||
Brightness colorBrightness,
|
Brightness? colorBrightness,
|
||||||
double elevation,
|
double? elevation,
|
||||||
double highlightElevation,
|
double? highlightElevation,
|
||||||
double disabledElevation,
|
double? disabledElevation,
|
||||||
ShapeBorder shape,
|
ShapeBorder? shape,
|
||||||
Clip clipBehavior,
|
Clip clipBehavior,
|
||||||
FocusNode focusNode,
|
FocusNode? focusNode,
|
||||||
bool autofocus,
|
bool autofocus,
|
||||||
EdgeInsetsGeometry padding,
|
EdgeInsetsGeometry? padding,
|
||||||
MaterialTapTargetSize materialTapTargetSize,
|
MaterialTapTargetSize? materialTapTargetSize,
|
||||||
Duration animationDuration,
|
Duration? animationDuration,
|
||||||
required Widget icon,
|
required Widget icon,
|
||||||
required Widget label,
|
required Widget label,
|
||||||
}) = _RaisedButtonWithIcon;
|
}) = _RaisedButtonWithIcon;
|
||||||
|
@ -276,7 +276,7 @@ class RaisedButton extends MaterialButton {
|
||||||
class _RaisedButtonWithIcon extends RaisedButton with MaterialButtonWithIconMixin {
|
class _RaisedButtonWithIcon extends RaisedButton with MaterialButtonWithIconMixin {
|
||||||
_RaisedButtonWithIcon({
|
_RaisedButtonWithIcon({
|
||||||
Key? key,
|
Key? key,
|
||||||
required VoidCallback onPressed,
|
required VoidCallback? onPressed,
|
||||||
VoidCallback? onLongPress,
|
VoidCallback? onLongPress,
|
||||||
ValueChanged<bool>? onHighlightChanged,
|
ValueChanged<bool>? onHighlightChanged,
|
||||||
MouseCursor? mouseCursor,
|
MouseCursor? mouseCursor,
|
||||||
|
|
|
@ -96,12 +96,12 @@ class Typography with Diagnosticable {
|
||||||
'This feature was deprecated after v1.13.8.'
|
'This feature was deprecated after v1.13.8.'
|
||||||
)
|
)
|
||||||
factory Typography({
|
factory Typography({
|
||||||
TargetPlatform platform,
|
TargetPlatform? platform,
|
||||||
TextTheme black,
|
TextTheme? black,
|
||||||
TextTheme white,
|
TextTheme? white,
|
||||||
TextTheme englishLike,
|
TextTheme? englishLike,
|
||||||
TextTheme dense,
|
TextTheme? dense,
|
||||||
TextTheme tall,
|
TextTheme? tall,
|
||||||
}) = Typography.material2014;
|
}) = Typography.material2014;
|
||||||
|
|
||||||
/// Creates a typography instance using material design's 2014 defaults.
|
/// Creates a typography instance using material design's 2014 defaults.
|
||||||
|
|
Loading…
Reference in a new issue