From d44ab58d69f1561a14f0dddad0a5de716e17daef Mon Sep 17 00:00:00 2001 From: "Mateus Felipe C. C. Pinto" Date: Fri, 2 Apr 2021 00:14:03 -0300 Subject: [PATCH] Remove references to @required in favor of the keyword (#79239) --- .../material/floating_action_button_location.dart | 4 ++-- packages/flutter/lib/src/widgets/framework.dart | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/flutter/lib/src/material/floating_action_button_location.dart b/packages/flutter/lib/src/material/floating_action_button_location.dart index 3589c3ab11..8f7cfaaa1b 100644 --- a/packages/flutter/lib/src/material/floating_action_button_location.dart +++ b/packages/flutter/lib/src/material/floating_action_button_location.dart @@ -874,7 +874,7 @@ abstract class FloatingActionButtonAnimator { /// /// ```dart /// @override - /// Animation getScaleAnimation({@required Animation parent}) { + /// Animation getScaleAnimation({required Animation parent}) { /// // The animations will cross at value 0, and the train will return to 1.0. /// return TrainHoppingAnimation( /// Tween(begin: 1.0, end: -1.0).animate(parent), @@ -896,7 +896,7 @@ abstract class FloatingActionButtonAnimator { /// /// ```dart /// @override - /// Animation getRotationAnimation({@required Animation parent}) { + /// Animation getRotationAnimation({required Animation parent}) { /// return Tween(begin: 0.0, end: 1.0).animate(parent); /// } /// ``` diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index d592024d58..d382a20f84 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -479,10 +479,9 @@ abstract class Widget extends DiagnosticableTree { /// ``` /// {@end-tool} /// -/// By convention, widget constructors only use named arguments. Named arguments -/// can be marked as required using [@required]. Also by convention, the first -/// argument is [key], and the last argument is `child`, `children`, or the -/// equivalent. +/// By convention, widget constructors only use named arguments. Also by +/// convention, the first argument is [key], and the last argument is `child`, +/// `children`, or the equivalent. /// /// See also: /// @@ -716,10 +715,9 @@ abstract class StatelessWidget extends Widget { /// ``` /// {@end-tool} /// -/// By convention, widget constructors only use named arguments. Named arguments -/// can be marked as required using [@required]. Also by convention, the first -/// argument is [key], and the last argument is `child`, `children`, or the -/// equivalent. +/// By convention, widget constructors only use named arguments. Also by +/// convention, the first argument is [key], and the last argument is `child`, +/// `children`, or the equivalent. /// /// See also: ///