Unverified Commit 8cda3bea authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Remove 'must not be null' comments from various libraries. (#134984)

## Description

This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.

This PR removes them from the animation, cupertino, foundation, gestures, semantics, and services libraries.  Each of them only had a few, so I lumped them together.

This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.

In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.

This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).

## Related PRs
- https://github.com/flutter/flutter/pull/134991
- https://github.com/flutter/flutter/pull/134992
- https://github.com/flutter/flutter/pull/134993
- https://github.com/flutter/flutter/pull/134994

## Tests
 - Documentation only change.
parent a1f8c99f
...@@ -230,9 +230,9 @@ class AnimationController extends Animation<double> ...@@ -230,9 +230,9 @@ class AnimationController extends Animation<double>
/// value at which this animation is deemed to be completed. It cannot be /// value at which this animation is deemed to be completed. It cannot be
/// null. /// null.
/// ///
/// * `vsync` is the [TickerProvider] for the current context. It can be /// * `vsync` is the required [TickerProvider] for the current context. It can
/// changed by calling [resync]. It is required and must not be null. See /// be changed by calling [resync]. See [TickerProvider] for advice on
/// [TickerProvider] for advice on obtaining a ticker provider. /// obtaining a ticker provider.
AnimationController({ AnimationController({
double? value, double? value,
this.duration, this.duration,
...@@ -258,9 +258,9 @@ class AnimationController extends Animation<double> ...@@ -258,9 +258,9 @@ class AnimationController extends Animation<double>
/// * [debugLabel] is a string to help identify this animation during /// * [debugLabel] is a string to help identify this animation during
/// debugging (used by [toString]). /// debugging (used by [toString]).
/// ///
/// * `vsync` is the [TickerProvider] for the current context. It can be /// * `vsync` is the required [TickerProvider] for the current context. It can
/// changed by calling [resync]. It is required and must not be null. See /// be changed by calling [resync]. See [TickerProvider] for advice on
/// [TickerProvider] for advice on obtaining a ticker provider. /// obtaining a ticker provider.
/// ///
/// This constructor is most useful for animations that will be driven using a /// This constructor is most useful for animations that will be driven using a
/// physics simulation, especially when the physics simulation has no /// physics simulation, especially when the physics simulation has no
......
...@@ -269,8 +269,6 @@ class ReverseAnimation extends Animation<double> ...@@ -269,8 +269,6 @@ class ReverseAnimation extends Animation<double>
with AnimationLazyListenerMixin, AnimationLocalStatusListenersMixin { with AnimationLazyListenerMixin, AnimationLocalStatusListenersMixin {
/// Creates a reverse animation. /// Creates a reverse animation.
///
/// The parent argument must not be null.
ReverseAnimation(this.parent); ReverseAnimation(this.parent);
/// The animation whose value and direction this animation is reversing. /// The animation whose value and direction this animation is reversing.
...@@ -376,8 +374,6 @@ class ReverseAnimation extends Animation<double> ...@@ -376,8 +374,6 @@ class ReverseAnimation extends Animation<double>
/// [Curve]. /// [Curve].
class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<double> { class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<double> {
/// Creates a curved animation. /// Creates a curved animation.
///
/// The parent and curve arguments must not be null.
CurvedAnimation({ CurvedAnimation({
required this.parent, required this.parent,
required this.curve, required this.curve,
...@@ -631,8 +627,9 @@ class TrainHoppingAnimation extends Animation<double> ...@@ -631,8 +627,9 @@ class TrainHoppingAnimation extends Animation<double>
/// animation otherwise. /// animation otherwise.
abstract class CompoundAnimation<T> extends Animation<T> abstract class CompoundAnimation<T> extends Animation<T>
with AnimationLazyListenerMixin, AnimationLocalListenersMixin, AnimationLocalStatusListenersMixin { with AnimationLazyListenerMixin, AnimationLocalListenersMixin, AnimationLocalStatusListenersMixin {
/// Creates a CompoundAnimation. Both arguments must be non-null. Either can /// Creates a [CompoundAnimation].
/// be a CompoundAnimation itself to combine multiple animations. ///
/// Either argument can be a [CompoundAnimation] itself to combine multiple animations.
CompoundAnimation({ CompoundAnimation({
required this.first, required this.first,
required this.next, required this.next,
...@@ -720,8 +717,8 @@ class AnimationMean extends CompoundAnimation<double> { ...@@ -720,8 +717,8 @@ class AnimationMean extends CompoundAnimation<double> {
class AnimationMax<T extends num> extends CompoundAnimation<T> { class AnimationMax<T extends num> extends CompoundAnimation<T> {
/// Creates an [AnimationMax]. /// Creates an [AnimationMax].
/// ///
/// Both arguments must be non-null. Either can be an [AnimationMax] itself /// Either argument can be an [AnimationMax] itself to combine multiple
/// to combine multiple animations. /// animations.
AnimationMax(Animation<T> first, Animation<T> next) : super(first: first, next: next); AnimationMax(Animation<T> first, Animation<T> next) : super(first: first, next: next);
@override @override
...@@ -735,8 +732,8 @@ class AnimationMax<T extends num> extends CompoundAnimation<T> { ...@@ -735,8 +732,8 @@ class AnimationMax<T extends num> extends CompoundAnimation<T> {
class AnimationMin<T extends num> extends CompoundAnimation<T> { class AnimationMin<T extends num> extends CompoundAnimation<T> {
/// Creates an [AnimationMin]. /// Creates an [AnimationMin].
/// ///
/// Both arguments must be non-null. Either can be an [AnimationMin] itself /// Either argument can be an [AnimationMin] itself to combine multiple
/// to combine multiple animations. /// animations.
AnimationMin(Animation<T> first, Animation<T> next) : super(first: first, next: next); AnimationMin(Animation<T> first, Animation<T> next) : super(first: first, next: next);
@override @override
......
...@@ -127,8 +127,6 @@ class _Linear extends Curve { ...@@ -127,8 +127,6 @@ class _Linear extends Curve {
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_sawtooth.mp4} /// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_sawtooth.mp4}
class SawTooth extends Curve { class SawTooth extends Curve {
/// Creates a sawtooth curve. /// Creates a sawtooth curve.
///
/// The [count] argument must not be null.
const SawTooth(this.count); const SawTooth(this.count);
/// The number of repetitions of the sawtooth pattern in the unit interval. /// The number of repetitions of the sawtooth pattern in the unit interval.
...@@ -157,8 +155,6 @@ class SawTooth extends Curve { ...@@ -157,8 +155,6 @@ class SawTooth extends Curve {
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_interval.mp4} /// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_interval.mp4}
class Interval extends Curve { class Interval extends Curve {
/// Creates an interval curve. /// Creates an interval curve.
///
/// The arguments must not be null.
const Interval(this.begin, this.end, { this.curve = Curves.linear }); const Interval(this.begin, this.end, { this.curve = Curves.linear });
/// The largest value for which this interval is 0.0. /// The largest value for which this interval is 0.0.
...@@ -202,8 +198,6 @@ class Interval extends Curve { ...@@ -202,8 +198,6 @@ class Interval extends Curve {
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_threshold.mp4} /// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_threshold.mp4}
class Threshold extends Curve { class Threshold extends Curve {
/// Creates a threshold curve. /// Creates a threshold curve.
///
/// The [threshold] argument must not be null.
const Threshold(this.threshold); const Threshold(this.threshold);
/// The value before which the curve is 0.0 and after which the curve is 1.0. /// The value before which the curve is 0.0 and after which the curve is 1.0.
...@@ -302,8 +296,6 @@ class Cubic extends Curve { ...@@ -302,8 +296,6 @@ class Cubic extends Curve {
/// ///
/// Rather than creating a new instance, consider using one of the common /// Rather than creating a new instance, consider using one of the common
/// cubic curves in [Curves]. /// cubic curves in [Curves].
///
/// The [a] (x1), [b] (y1), [c] (x2) and [d] (y2) arguments must not be null.
const Cubic(this.a, this.b, this.c, this.d); const Cubic(this.a, this.b, this.c, this.d);
/// The x coordinate of the first control point. /// The x coordinate of the first control point.
...@@ -599,8 +591,6 @@ abstract class Curve2D extends ParametricCurve<Offset> { ...@@ -599,8 +591,6 @@ abstract class Curve2D extends ParametricCurve<Offset> {
/// * [Curve2D], a parametric curve that maps a double parameter to a 2D location. /// * [Curve2D], a parametric curve that maps a double parameter to a 2D location.
class Curve2DSample { class Curve2DSample {
/// Creates an object that holds a sample; used with [Curve2D] subclasses. /// Creates an object that holds a sample; used with [Curve2D] subclasses.
///
/// All arguments must not be null.
const Curve2DSample(this.t, this.value); const Curve2DSample(this.t, this.value);
/// The parametric location of this sample point along the curve. /// The parametric location of this sample point along the curve.
...@@ -659,8 +649,7 @@ class CatmullRomSpline extends Curve2D { ...@@ -659,8 +649,7 @@ class CatmullRomSpline extends Curve2D {
/// control point. The default is chosen so that the slope of the line at the /// control point. The default is chosen so that the slope of the line at the
/// ends matches that of the first or last line segment in the control points. /// ends matches that of the first or last line segment in the control points.
/// ///
/// The `tension` and `controlPoints` arguments must not be null, and the /// The `controlPoints` list must contain at least four control points to
/// `controlPoints` list must contain at least four control points to
/// interpolate. /// interpolate.
/// ///
/// The internal curve data structures are lazily computed the first time /// The internal curve data structures are lazily computed the first time
...@@ -860,8 +849,6 @@ class CatmullRomCurve extends Curve { ...@@ -860,8 +849,6 @@ class CatmullRomCurve extends Curve {
/// [transform] is called. If you would rather pre-compute the curve, use /// [transform] is called. If you would rather pre-compute the curve, use
/// [CatmullRomCurve.precompute] instead. /// [CatmullRomCurve.precompute] instead.
/// ///
/// All of the arguments must not be null.
///
/// See also: /// See also:
/// ///
/// * This [paper on using Catmull-Rom splines](http://faculty.cs.tamu.edu/schaefer/research/cr_cad.pdf). /// * This [paper on using Catmull-Rom splines](http://faculty.cs.tamu.edu/schaefer/research/cr_cad.pdf).
...@@ -1144,8 +1131,6 @@ class CatmullRomCurve extends Curve { ...@@ -1144,8 +1131,6 @@ class CatmullRomCurve extends Curve {
/// * [CurvedAnimation], which can take a separate curve and reverse curve. /// * [CurvedAnimation], which can take a separate curve and reverse curve.
class FlippedCurve extends Curve { class FlippedCurve extends Curve {
/// Creates a flipped curve. /// Creates a flipped curve.
///
/// The [curve] argument must not be null.
const FlippedCurve(this.curve); const FlippedCurve(this.curve);
/// The curve that is being flipped. /// The curve that is being flipped.
......
...@@ -547,8 +547,6 @@ class ConstantTween<T> extends Tween<T> { ...@@ -547,8 +547,6 @@ class ConstantTween<T> extends Tween<T> {
/// [AnimationController]. /// [AnimationController].
class CurveTween extends Animatable<double> { class CurveTween extends Animatable<double> {
/// Creates a curve tween. /// Creates a curve tween.
///
/// The [curve] argument must not be null.
CurveTween({ required this.curve }); CurveTween({ required this.curve });
/// The curve to use when transforming the value of the animation. /// The curve to use when transforming the value of the animation.
......
...@@ -122,7 +122,7 @@ class FlippedTweenSequence extends TweenSequence<double> { ...@@ -122,7 +122,7 @@ class FlippedTweenSequence extends TweenSequence<double> {
class TweenSequenceItem<T> { class TweenSequenceItem<T> {
/// Construct a TweenSequenceItem. /// Construct a TweenSequenceItem.
/// ///
/// The [tween] must not be null and [weight] must be greater than 0.0. /// The [weight] must be greater than 0.0.
const TweenSequenceItem({ const TweenSequenceItem({
required this.tween, required this.tween,
required this.weight, required this.weight,
......
...@@ -67,7 +67,7 @@ class CupertinoActivityIndicator extends StatefulWidget { ...@@ -67,7 +67,7 @@ class CupertinoActivityIndicator extends StatefulWidget {
/// Radius of the spinner widget. /// Radius of the spinner widget.
/// ///
/// Defaults to 10px. Must be positive and cannot be null. /// Defaults to 10 pixels. Must be positive.
final double radius; final double radius;
/// Determines the percentage of spinner ticks that will be shown. Typical usage would /// Determines the percentage of spinner ticks that will be shown. Typical usage would
...@@ -75,7 +75,7 @@ class CupertinoActivityIndicator extends StatefulWidget { ...@@ -75,7 +75,7 @@ class CupertinoActivityIndicator extends StatefulWidget {
/// during pull-to-refresh when the drag-down action shows one tick at a time as /// during pull-to-refresh when the drag-down action shows one tick at a time as
/// the user continues to drag down. /// the user continues to drag down.
/// ///
/// Defaults to 1.0. Must be between 0.0 and 1.0 inclusive, and cannot be null. /// Defaults to one. Must be between zero and one, inclusive.
final double progress; final double progress;
@override @override
......
...@@ -145,8 +145,6 @@ class CupertinoApp extends StatefulWidget { ...@@ -145,8 +145,6 @@ class CupertinoApp extends StatefulWidget {
/// unsupported route. /// unsupported route.
/// ///
/// This class creates an instance of [WidgetsApp]. /// This class creates an instance of [WidgetsApp].
///
/// The boolean arguments, [routes], and [navigatorObservers], must not be null.
const CupertinoApp({ const CupertinoApp({
super.key, super.key,
this.navigatorKey, this.navigatorKey,
......
...@@ -79,8 +79,6 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -79,8 +79,6 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
assert(height >= 0.0); assert(height >= 0.0);
/// The interactive items laid out within the bottom navigation bar. /// The interactive items laid out within the bottom navigation bar.
///
/// Must not be null.
final List<BottomNavigationBarItem> items; final List<BottomNavigationBarItem> items;
/// The callback that is called when a item is tapped. /// The callback that is called when a item is tapped.
...@@ -92,8 +90,7 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -92,8 +90,7 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
/// The index into [items] of the current active item. /// The index into [items] of the current active item.
/// ///
/// Must not be null and must inclusively be between 0 and the number of tabs /// Must be between 0 and the number of tabs minus 1, inclusive.
/// minus 1.
final int currentIndex; final int currentIndex;
/// The background color of the tab bar. If it contains transparency, the /// The background color of the tab bar. If it contains transparency, the
...@@ -113,7 +110,7 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -113,7 +110,7 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
/// in the unselected state. /// in the unselected state.
/// ///
/// Defaults to a [CupertinoDynamicColor] that matches the disabled foreground /// Defaults to a [CupertinoDynamicColor] that matches the disabled foreground
/// color of the native `UITabBar` component. Cannot be null. /// color of the native `UITabBar` component.
final Color inactiveColor; final Color inactiveColor;
/// The size of all of the [BottomNavigationBarItem] icons. /// The size of all of the [BottomNavigationBarItem] icons.
...@@ -121,13 +118,11 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -121,13 +118,11 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
/// This value is used to configure the [IconTheme] for the navigation bar. /// This value is used to configure the [IconTheme] for the navigation bar.
/// When a [BottomNavigationBarItem.icon] widget is not an [Icon] the widget /// When a [BottomNavigationBarItem.icon] widget is not an [Icon] the widget
/// should configure itself to match the icon theme's size and color. /// should configure itself to match the icon theme's size and color.
///
/// Must not be null.
final double iconSize; final double iconSize;
/// The height of the [CupertinoTabBar]. /// The height of the [CupertinoTabBar].
/// ///
/// Defaults to 50.0. Must not be null. /// Defaults to 50.
final double height; final double height;
/// The border of the [CupertinoTabBar]. /// The border of the [CupertinoTabBar].
......
...@@ -95,7 +95,7 @@ class CupertinoButton extends StatefulWidget { ...@@ -95,7 +95,7 @@ class CupertinoButton extends StatefulWidget {
/// Ignored if the [CupertinoButton] doesn't also have a [color]. /// Ignored if the [CupertinoButton] doesn't also have a [color].
/// ///
/// Defaults to [CupertinoColors.quaternarySystemFill] when [color] is /// Defaults to [CupertinoColors.quaternarySystemFill] when [color] is
/// specified. Must not be null. /// specified.
final Color disabledColor; final Color disabledColor;
/// The callback that is called when the button is tapped or otherwise activated. /// The callback that is called when the button is tapped or otherwise activated.
......
...@@ -57,8 +57,6 @@ class CupertinoCheckbox extends StatefulWidget { ...@@ -57,8 +57,6 @@ class CupertinoCheckbox extends StatefulWidget {
/// can only be null if [tristate] is true. /// can only be null if [tristate] is true.
/// * [onChanged], which is called when the value of the checkbox should /// * [onChanged], which is called when the value of the checkbox should
/// change. It can be set to null to disable the checkbox. /// change. It can be set to null to disable the checkbox.
///
/// The values of [tristate] and [autofocus] must not be null.
const CupertinoCheckbox({ const CupertinoCheckbox({
super.key, super.key,
required this.value, required this.value,
......
...@@ -738,8 +738,6 @@ abstract final class CupertinoColors { ...@@ -738,8 +738,6 @@ abstract final class CupertinoColors {
class CupertinoDynamicColor extends Color with Diagnosticable { class CupertinoDynamicColor extends Color with Diagnosticable {
/// Creates an adaptive [Color] that changes its effective color based on the /// Creates an adaptive [Color] that changes its effective color based on the
/// [BuildContext] given. The default effective color is [color]. /// [BuildContext] given. The default effective color is [color].
///
/// All the colors must not be null.
const CupertinoDynamicColor({ const CupertinoDynamicColor({
String? debugLabel, String? debugLabel,
required Color color, required Color color,
...@@ -768,8 +766,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable { ...@@ -768,8 +766,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable {
/// given [BuildContext]'s brightness (from [MediaQueryData.platformBrightness] /// given [BuildContext]'s brightness (from [MediaQueryData.platformBrightness]
/// or [CupertinoThemeData.brightness]) and accessibility contrast setting /// or [CupertinoThemeData.brightness]) and accessibility contrast setting
/// ([MediaQueryData.highContrast]). The default effective color is [color]. /// ([MediaQueryData.highContrast]). The default effective color is [color].
///
/// All the colors must not be null.
const CupertinoDynamicColor.withBrightnessAndContrast({ const CupertinoDynamicColor.withBrightnessAndContrast({
String? debugLabel, String? debugLabel,
required Color color, required Color color,
...@@ -791,8 +787,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable { ...@@ -791,8 +787,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable {
/// Creates an adaptive [Color] that changes its effective color based on the given /// Creates an adaptive [Color] that changes its effective color based on the given
/// [BuildContext]'s brightness (from [MediaQueryData.platformBrightness] or /// [BuildContext]'s brightness (from [MediaQueryData.platformBrightness] or
/// [CupertinoThemeData.brightness]). The default effective color is [color]. /// [CupertinoThemeData.brightness]). The default effective color is [color].
///
/// All the colors must not be null.
const CupertinoDynamicColor.withBrightness({ const CupertinoDynamicColor.withBrightness({
String? debugLabel, String? debugLabel,
required Color color, required Color color,
...@@ -828,8 +822,8 @@ class CupertinoDynamicColor extends Color with Diagnosticable { ...@@ -828,8 +822,8 @@ class CupertinoDynamicColor extends Color with Diagnosticable {
/// The current effective color. /// The current effective color.
/// ///
/// Must not be null. Defaults to [color] if this [CupertinoDynamicColor] has /// Defaults to [color] if this [CupertinoDynamicColor] has never been
/// never been resolved. /// resolved.
final Color _effectiveColor; final Color _effectiveColor;
@override @override
...@@ -1158,8 +1152,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable { ...@@ -1158,8 +1152,6 @@ class CupertinoDynamicColor extends Color with Diagnosticable {
} }
/// Creates a diagnostics property for [CupertinoDynamicColor]. /// Creates a diagnostics property for [CupertinoDynamicColor].
///
/// The [showName], [style], and [level] arguments must not be null.
DiagnosticsProperty<Color> createCupertinoColorProperty( DiagnosticsProperty<Color> createCupertinoColorProperty(
String name, String name,
Color? value, { Color? value, {
......
...@@ -132,9 +132,7 @@ enum _ContextMenuLocation { ...@@ -132,9 +132,7 @@ enum _ContextMenuLocation {
class CupertinoContextMenu extends StatefulWidget { class CupertinoContextMenu extends StatefulWidget {
/// Create a context menu. /// Create a context menu.
/// ///
/// [actions] is required and cannot be null or empty. /// The [actions] parameter cannot be empty.
///
/// [child] is required and cannot be null.
CupertinoContextMenu({ CupertinoContextMenu({
super.key, super.key,
required this.actions, required this.actions,
...@@ -153,9 +151,7 @@ class CupertinoContextMenu extends StatefulWidget { ...@@ -153,9 +151,7 @@ class CupertinoContextMenu extends StatefulWidget {
/// Use instead of the default constructor when it is needed to have a more /// Use instead of the default constructor when it is needed to have a more
/// custom animation. /// custom animation.
/// ///
/// [actions] is required and cannot be null or empty. /// The [actions] parameter cannot be empty.
///
/// [builder] is required.
CupertinoContextMenu.builder({ CupertinoContextMenu.builder({
super.key, super.key,
required this.actions, required this.actions,
...@@ -389,7 +385,7 @@ class CupertinoContextMenu extends StatefulWidget { ...@@ -389,7 +385,7 @@ class CupertinoContextMenu extends StatefulWidget {
/// ///
/// These actions are typically [CupertinoContextMenuAction]s. /// These actions are typically [CupertinoContextMenuAction]s.
/// ///
/// This parameter cannot be null or empty. /// This parameter must not be empty.
final List<Widget> actions; final List<Widget> actions;
/// If true, clicking on the [CupertinoContextMenuAction]s will /// If true, clicking on the [CupertinoContextMenuAction]s will
......
...@@ -237,17 +237,16 @@ class CupertinoDatePicker extends StatefulWidget { ...@@ -237,17 +237,16 @@ class CupertinoDatePicker extends StatefulWidget {
/// to [CupertinoDatePickerMode.dateAndTime]. /// to [CupertinoDatePickerMode.dateAndTime].
/// ///
/// [onDateTimeChanged] is the callback called when the selected date or time /// [onDateTimeChanged] is the callback called when the selected date or time
/// changes and must not be null. When in [CupertinoDatePickerMode.time] mode, /// changes. When in [CupertinoDatePickerMode.time] mode, the year, month and
/// the year, month and day will be the same as [initialDateTime]. When in /// day will be the same as [initialDateTime]. When in
/// [CupertinoDatePickerMode.date] mode, this callback will always report the /// [CupertinoDatePickerMode.date] mode, this callback will always report the
/// start time of the currently selected day. When in /// start time of the currently selected day. When in
/// [CupertinoDatePickerMode.monthYear] mode, the day and time will be the /// [CupertinoDatePickerMode.monthYear] mode, the day and time will be the
/// start time of the first day of the month. /// start time of the first day of the month.
/// ///
/// [initialDateTime] is the initial date time of the picker. Defaults to the /// [initialDateTime] is the initial date time of the picker. Defaults to the
/// present date and time and must not be null. The present must conform to /// present date and time. The present must conform to the intervals set in
/// the intervals set in [minimumDate], [maximumDate], [minimumYear], and /// [minimumDate], [maximumDate], [minimumYear], and [maximumYear].
/// [maximumYear].
/// ///
/// [minimumDate] is the minimum selectable [DateTime] of the picker. When set /// [minimumDate] is the minimum selectable [DateTime] of the picker. When set
/// to null, the picker does not limit the minimum [DateTime] the user can pick. /// to null, the picker does not limit the minimum [DateTime] the user can pick.
...@@ -262,7 +261,7 @@ class CupertinoDatePicker extends StatefulWidget { ...@@ -262,7 +261,7 @@ class CupertinoDatePicker extends StatefulWidget {
/// maximum time the user can pick if it's set to a date later than that. /// maximum time the user can pick if it's set to a date later than that.
/// ///
/// [minimumYear] is the minimum year that the picker can be scrolled to in /// [minimumYear] is the minimum year that the picker can be scrolled to in
/// [CupertinoDatePickerMode.date] mode. Defaults to 1 and must not be null. /// [CupertinoDatePickerMode.date] mode. Defaults to 1.
/// ///
/// [maximumYear] is the maximum year that the picker can be scrolled to in /// [maximumYear] is the maximum year that the picker can be scrolled to in
/// [CupertinoDatePickerMode.date] mode. Null if there's no limit. /// [CupertinoDatePickerMode.date] mode. Null if there's no limit.
...@@ -331,14 +330,14 @@ class CupertinoDatePicker extends StatefulWidget { ...@@ -331,14 +330,14 @@ class CupertinoDatePicker extends StatefulWidget {
); );
} }
/// The mode of the date picker as one of [CupertinoDatePickerMode]. /// The mode of the date picker as one of [CupertinoDatePickerMode]. Defaults
/// Defaults to [CupertinoDatePickerMode.dateAndTime]. Cannot be null and /// to [CupertinoDatePickerMode.dateAndTime]. Value cannot change after
/// value cannot change after initial build. /// initial build.
final CupertinoDatePickerMode mode; final CupertinoDatePickerMode mode;
/// The initial date and/or time of the picker. Defaults to the present date /// The initial date and/or time of the picker. Defaults to the present date
/// and time and must not be null. The present must conform to the intervals /// and time. The present must conform to the intervals set in [minimumDate],
/// set in [minimumDate], [maximumDate], [minimumYear], and [maximumYear]. /// [maximumDate], [minimumYear], and [maximumYear].
/// ///
/// Changing this value after the initial build will not affect the currently /// Changing this value after the initial build will not affect the currently
/// selected date time. /// selected date time.
...@@ -375,7 +374,7 @@ class CupertinoDatePicker extends StatefulWidget { ...@@ -375,7 +374,7 @@ class CupertinoDatePicker extends StatefulWidget {
final DateTime? maximumDate; final DateTime? maximumDate;
/// Minimum year that the picker can be scrolled to in /// Minimum year that the picker can be scrolled to in
/// [CupertinoDatePickerMode.date] mode. Defaults to 1 and must not be null. /// [CupertinoDatePickerMode.date] mode. Defaults to 1.
final int minimumYear; final int minimumYear;
/// Maximum year that the picker can be scrolled to in /// Maximum year that the picker can be scrolled to in
...@@ -399,8 +398,6 @@ class CupertinoDatePicker extends StatefulWidget { ...@@ -399,8 +398,6 @@ class CupertinoDatePicker extends StatefulWidget {
/// Callback called when the selected date and/or time changes. If the new /// Callback called when the selected date and/or time changes. If the new
/// selected [DateTime] is not valid, or is not in the [minimumDate] through /// selected [DateTime] is not valid, or is not in the [minimumDate] through
/// [maximumDate] range, this callback will not be called. /// [maximumDate] range, this callback will not be called.
///
/// Must not be null.
final ValueChanged<DateTime> onDateTimeChanged; final ValueChanged<DateTime> onDateTimeChanged;
/// Background color of date picker. /// Background color of date picker.
...@@ -1890,7 +1887,7 @@ class CupertinoTimerPicker extends StatefulWidget { ...@@ -1890,7 +1887,7 @@ class CupertinoTimerPicker extends StatefulWidget {
/// defaults to [CupertinoTimerPickerMode.hms]. /// defaults to [CupertinoTimerPickerMode.hms].
/// ///
/// [onTimerDurationChanged] is the callback called when the selected duration /// [onTimerDurationChanged] is the callback called when the selected duration
/// changes and must not be null. /// changes.
/// ///
/// [initialTimerDuration] defaults to 0 second and is limited from 0 second /// [initialTimerDuration] defaults to 0 second and is limited from 0 second
/// to 23 hours 59 minutes 59 seconds. /// to 23 hours 59 minutes 59 seconds.
...@@ -1940,7 +1937,7 @@ class CupertinoTimerPicker extends StatefulWidget { ...@@ -1940,7 +1937,7 @@ class CupertinoTimerPicker extends StatefulWidget {
/// Defines how the timer picker should be positioned within its parent. /// Defines how the timer picker should be positioned within its parent.
/// ///
/// This property must not be null. It defaults to [Alignment.center]. /// Defaults to [Alignment.center].
final AlignmentGeometry alignment; final AlignmentGeometry alignment;
/// Background color of timer picker. /// Background color of timer picker.
......
...@@ -31,8 +31,6 @@ const EdgeInsets _kToolbarButtonPadding = EdgeInsets.fromLTRB( ...@@ -31,8 +31,6 @@ const EdgeInsets _kToolbarButtonPadding = EdgeInsets.fromLTRB(
/// A button in the style of the Mac context menu buttons. /// A button in the style of the Mac context menu buttons.
class CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget { class CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget {
/// Creates an instance of CupertinoDesktopTextSelectionToolbarButton. /// Creates an instance of CupertinoDesktopTextSelectionToolbarButton.
///
/// [child] cannot be null.
const CupertinoDesktopTextSelectionToolbarButton({ const CupertinoDesktopTextSelectionToolbarButton({
super.key, super.key,
required this.onPressed, required this.onPressed,
...@@ -51,8 +49,6 @@ class CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget { ...@@ -51,8 +49,6 @@ class CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget {
/// Create an instance of [CupertinoDesktopTextSelectionToolbarButton] from /// Create an instance of [CupertinoDesktopTextSelectionToolbarButton] from
/// the given [ContextMenuButtonItem]. /// the given [ContextMenuButtonItem].
///
/// [buttonItem] cannot be null.
CupertinoDesktopTextSelectionToolbarButton.buttonItem({ CupertinoDesktopTextSelectionToolbarButton.buttonItem({
super.key, super.key,
required ContextMenuButtonItem this.buttonItem, required ContextMenuButtonItem this.buttonItem,
......
...@@ -190,8 +190,6 @@ bool _isInAccessibilityMode(BuildContext context) { ...@@ -190,8 +190,6 @@ bool _isInAccessibilityMode(BuildContext context) {
/// * <https://developer.apple.com/ios/human-interface-guidelines/views/alerts/> /// * <https://developer.apple.com/ios/human-interface-guidelines/views/alerts/>
class CupertinoAlertDialog extends StatefulWidget { class CupertinoAlertDialog extends StatefulWidget {
/// Creates an iOS-style alert dialog. /// Creates an iOS-style alert dialog.
///
/// The [actions] must not be null.
const CupertinoAlertDialog({ const CupertinoAlertDialog({
super.key, super.key,
this.title, this.title,
...@@ -686,8 +684,6 @@ class _CupertinoActionSheetState extends State<CupertinoActionSheet> { ...@@ -686,8 +684,6 @@ class _CupertinoActionSheetState extends State<CupertinoActionSheet> {
/// more choices related to the current context. /// more choices related to the current context.
class CupertinoActionSheetAction extends StatelessWidget { class CupertinoActionSheetAction extends StatelessWidget {
/// Creates an action for an iOS-style action sheet. /// Creates an action for an iOS-style action sheet.
///
/// The [child] and [onPressed] arguments must not be null.
const CupertinoActionSheetAction({ const CupertinoActionSheetAction({
super.key, super.key,
required this.onPressed, required this.onPressed,
...@@ -697,8 +693,6 @@ class CupertinoActionSheetAction extends StatelessWidget { ...@@ -697,8 +693,6 @@ class CupertinoActionSheetAction extends StatelessWidget {
}); });
/// The callback that is called when the button is tapped. /// The callback that is called when the button is tapped.
///
/// This attribute must not be null.
final VoidCallback onPressed; final VoidCallback onPressed;
/// Whether this action is the default choice in the action sheet. /// Whether this action is the default choice in the action sheet.
...@@ -1632,14 +1626,14 @@ class CupertinoDialogAction extends StatelessWidget { ...@@ -1632,14 +1626,14 @@ class CupertinoDialogAction extends StatelessWidget {
/// but more than one action can have this attribute set to true in the same /// but more than one action can have this attribute set to true in the same
/// [CupertinoAlertDialog]. /// [CupertinoAlertDialog].
/// ///
/// This parameters defaults to false and cannot be null. /// This parameters defaults to false.
final bool isDefaultAction; final bool isDefaultAction;
/// Whether this action destroys an object. /// Whether this action destroys an object.
/// ///
/// For example, an action that deletes an email is destructive. /// For example, an action that deletes an email is destructive.
/// ///
/// Defaults to false and cannot be null. /// Defaults to false.
final bool isDestructiveAction; final bool isDestructiveAction;
/// [TextStyle] to apply to any text that appears in this button. /// [TextStyle] to apply to any text that appears in this button.
......
...@@ -193,7 +193,7 @@ class CupertinoFormSection extends StatelessWidget { ...@@ -193,7 +193,7 @@ class CupertinoFormSection extends StatelessWidget {
/// {@macro flutter.material.Material.clipBehavior} /// {@macro flutter.material.Material.clipBehavior}
/// ///
/// Defaults to [Clip.none], and must not be null. /// Defaults to [Clip.none].
final Clip clipBehavior; final Clip clipBehavior;
@override @override
......
...@@ -293,8 +293,6 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer ...@@ -293,8 +293,6 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer
/// 3. Show a back chevron with the previous route's `title` if the current /// 3. Show a back chevron with the previous route's `title` if the current
/// route is a [CupertinoPageRoute] and the previous route is also a /// route is a [CupertinoPageRoute] and the previous route is also a
/// [CupertinoPageRoute]. /// [CupertinoPageRoute].
///
/// This value cannot be null.
/// {@endtemplate} /// {@endtemplate}
final bool automaticallyImplyLeading; final bool automaticallyImplyLeading;
...@@ -303,8 +301,6 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer ...@@ -303,8 +301,6 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer
/// If true and [middle] is null, automatically fill in a [Text] widget with /// If true and [middle] is null, automatically fill in a [Text] widget with
/// the current route's `title` if the route is a [CupertinoPageRoute]. /// the current route's `title` if the route is a [CupertinoPageRoute].
/// If [middle] widget is not null, this parameter has no effect. /// If [middle] widget is not null, this parameter has no effect.
///
/// This value cannot be null.
final bool automaticallyImplyMiddle; final bool automaticallyImplyMiddle;
/// {@template flutter.cupertino.CupertinoNavigationBar.previousPageTitle} /// {@template flutter.cupertino.CupertinoNavigationBar.previousPageTitle}
...@@ -395,7 +391,7 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer ...@@ -395,7 +391,7 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer
/// When set to true, only one navigation bar can be present per route unless /// When set to true, only one navigation bar can be present per route unless
/// [heroTag] is also set. /// [heroTag] is also set.
/// ///
/// This value defaults to true and cannot be null. /// This value defaults to true.
/// {@endtemplate} /// {@endtemplate}
final bool transitionBetweenRoutes; final bool transitionBetweenRoutes;
...@@ -411,8 +407,8 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer ...@@ -411,8 +407,8 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer
/// navigation bars per route or to transition between multiple /// navigation bars per route or to transition between multiple
/// [Navigator]s. /// [Navigator]s.
/// ///
/// Cannot be null. To disable Hero transitions for this navigation bar, /// To disable Hero transitions for this navigation bar, set
/// set [transitionBetweenRoutes] to false. /// [transitionBetweenRoutes] to false.
/// {@endtemplate} /// {@endtemplate}
final Object heroTag; final Object heroTag;
...@@ -577,7 +573,8 @@ class _CupertinoNavigationBarState extends State<CupertinoNavigationBar> { ...@@ -577,7 +573,8 @@ class _CupertinoNavigationBarState extends State<CupertinoNavigationBar> {
class CupertinoSliverNavigationBar extends StatefulWidget { class CupertinoSliverNavigationBar extends StatefulWidget {
/// Creates a navigation bar for scrolling lists. /// Creates a navigation bar for scrolling lists.
/// ///
/// The [largeTitle] argument is required and must not be null. /// If [automaticallyImplyTitle] is false, then the [largeTitle] argument is
/// required.
const CupertinoSliverNavigationBar({ const CupertinoSliverNavigationBar({
super.key, super.key,
this.largeTitle, this.largeTitle,
...@@ -638,8 +635,6 @@ class CupertinoSliverNavigationBar extends StatefulWidget { ...@@ -638,8 +635,6 @@ class CupertinoSliverNavigationBar extends StatefulWidget {
/// If true and [largeTitle] is null, automatically fill in a [Text] widget /// If true and [largeTitle] is null, automatically fill in a [Text] widget
/// with the current route's `title` if the route is a [CupertinoPageRoute]. /// with the current route's `title` if the route is a [CupertinoPageRoute].
/// If [largeTitle] widget is not null, this parameter has no effect. /// If [largeTitle] widget is not null, this parameter has no effect.
///
/// This value cannot be null.
final bool automaticallyImplyTitle; final bool automaticallyImplyTitle;
/// Controls whether [middle] widget should always be visible (even in /// Controls whether [middle] widget should always be visible (even in
...@@ -1402,8 +1397,6 @@ class _NavigationBarStaticComponents { ...@@ -1402,8 +1397,6 @@ class _NavigationBarStaticComponents {
class CupertinoNavigationBarBackButton extends StatelessWidget { class CupertinoNavigationBarBackButton extends StatelessWidget {
/// Construct a [CupertinoNavigationBarBackButton] that can be used to pop /// Construct a [CupertinoNavigationBarBackButton] that can be used to pop
/// the current route. /// the current route.
///
/// The [color] parameter must not be null.
const CupertinoNavigationBarBackButton({ const CupertinoNavigationBarBackButton({
super.key, super.key,
this.color, this.color,
......
...@@ -75,7 +75,7 @@ class CupertinoPageScaffold extends StatefulWidget { ...@@ -75,7 +75,7 @@ class CupertinoPageScaffold extends StatefulWidget {
/// scaffold, the body can be resized to avoid overlapping the keyboard, which /// scaffold, the body can be resized to avoid overlapping the keyboard, which
/// prevents widgets inside the body from being obscured by the keyboard. /// prevents widgets inside the body from being obscured by the keyboard.
/// ///
/// Defaults to true and cannot be null. /// Defaults to true.
final bool resizeToAvoidBottomInset; final bool resizeToAvoidBottomInset;
@override @override
......
...@@ -53,8 +53,7 @@ const double _kOverAndUnderCenterOpacity = 0.447; ...@@ -53,8 +53,7 @@ const double _kOverAndUnderCenterOpacity = 0.447;
class CupertinoPicker extends StatefulWidget { class CupertinoPicker extends StatefulWidget {
/// Creates a picker from a concrete list of children. /// Creates a picker from a concrete list of children.
/// ///
/// The [diameterRatio] and [itemExtent] arguments must not be null. The /// The [itemExtent] must be greater than zero.
/// [itemExtent] must be greater than zero.
/// ///
/// The [backgroundColor] defaults to null, which disables background painting entirely. /// The [backgroundColor] defaults to null, which disables background painting entirely.
/// (i.e. the picker is going to have a completely transparent background), to match /// (i.e. the picker is going to have a completely transparent background), to match
...@@ -99,11 +98,11 @@ class CupertinoPicker extends StatefulWidget { ...@@ -99,11 +98,11 @@ class CupertinoPicker extends StatefulWidget {
/// normally the builder is only called once for each index (except when /// normally the builder is only called once for each index (except when
/// rebuilding - the cache is cleared). /// rebuilding - the cache is cleared).
/// ///
/// The [itemBuilder] argument must not be null. The [childCount] argument /// The [childCount] argument reflects the number of children that will be
/// reflects the number of children that will be provided by the [itemBuilder]. /// provided by the [itemBuilder].
/// {@macro flutter.widgets.ListWheelChildBuilderDelegate.childCount} /// {@macro flutter.widgets.ListWheelChildBuilderDelegate.childCount}
/// ///
/// The [itemExtent] argument must be non-null and positive. /// The [itemExtent] argument must be positive.
/// ///
/// The [backgroundColor] defaults to null, which disables background painting entirely. /// The [backgroundColor] defaults to null, which disables background painting entirely.
/// (i.e. the picker is going to have a completely transparent background), to match /// (i.e. the picker is going to have a completely transparent background), to match
...@@ -134,7 +133,7 @@ class CupertinoPicker extends StatefulWidget { ...@@ -134,7 +133,7 @@ class CupertinoPicker extends StatefulWidget {
/// ///
/// For more details, see [ListWheelScrollView.diameterRatio]. /// For more details, see [ListWheelScrollView.diameterRatio].
/// ///
/// Must not be null and defaults to `1.1` to visually mimic iOS. /// Defaults to 1.1 to visually mimic iOS.
final double diameterRatio; final double diameterRatio;
/// Background color behind the children. /// Background color behind the children.
...@@ -334,13 +333,12 @@ class CupertinoPickerDefaultSelectionOverlay extends StatelessWidget { ...@@ -334,13 +333,12 @@ class CupertinoPickerDefaultSelectionOverlay extends StatelessWidget {
/// area (or the currently selected item, depending on how you described it /// area (or the currently selected item, depending on how you described it
/// elsewhere) of a [CupertinoPicker]. /// elsewhere) of a [CupertinoPicker].
/// ///
/// The [background] argument default value is [CupertinoColors.tertiarySystemFill]. /// The [background] argument default value is
/// It must be non-null. /// [CupertinoColors.tertiarySystemFill].
/// ///
/// The [capStartEdge] and [capEndEdge] arguments decide whether to add a /// The [capStartEdge] and [capEndEdge] arguments decide whether to add a
/// default margin and use rounded corners on the left and right side of the /// default margin and use rounded corners on the left and right side of the
/// rectangular overlay. /// rectangular overlay, and they both default to true.
/// Default to true and must not be null.
const CupertinoPickerDefaultSelectionOverlay({ const CupertinoPickerDefaultSelectionOverlay({
super.key, super.key,
this.background = CupertinoColors.tertiarySystemFill, this.background = CupertinoColors.tertiarySystemFill,
......
...@@ -283,7 +283,7 @@ class CupertinoSliverRefreshControl extends StatefulWidget { ...@@ -283,7 +283,7 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
/// Create a new refresh control for inserting into a list of slivers. /// Create a new refresh control for inserting into a list of slivers.
/// ///
/// The [refreshTriggerPullDistance] and [refreshIndicatorExtent] arguments /// The [refreshTriggerPullDistance] and [refreshIndicatorExtent] arguments
/// must not be null and must be >= 0. /// must be greater than or equal to 0.
/// ///
/// The [builder] argument may be null, in which case no indicator UI will be /// The [builder] argument may be null, in which case no indicator UI will be
/// shown but the [onRefresh] will still be invoked. By default, [builder] /// shown but the [onRefresh] will still be invoked. By default, [builder]
...@@ -307,8 +307,8 @@ class CupertinoSliverRefreshControl extends StatefulWidget { ...@@ -307,8 +307,8 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
/// The amount of overscroll the scrollable must be dragged to trigger a reload. /// The amount of overscroll the scrollable must be dragged to trigger a reload.
/// ///
/// Must not be null, must be larger than 0.0 and larger than /// Must be larger than zero and larger than [refreshIndicatorExtent].
/// [refreshIndicatorExtent]. Defaults to 100px when not specified. /// Defaults to 100 pixels when not specified.
/// ///
/// When overscrolled past this distance, [onRefresh] will be called if not /// When overscrolled past this distance, [onRefresh] will be called if not
/// null and the [builder] will build in the [RefreshIndicatorMode.armed] state. /// null and the [builder] will build in the [RefreshIndicatorMode.armed] state.
...@@ -317,9 +317,9 @@ class CupertinoSliverRefreshControl extends StatefulWidget { ...@@ -317,9 +317,9 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
/// The amount of space the refresh indicator sliver will keep holding while /// The amount of space the refresh indicator sliver will keep holding while
/// [onRefresh]'s [Future] is still running. /// [onRefresh]'s [Future] is still running.
/// ///
/// Must not be null and must be positive, but can be 0.0, in which case the /// Must be a positive number, but can be zero, in which case the sliver will
/// sliver will start retracting back to 0.0 as soon as the refresh is started. /// start retracting back to zero as soon as the refresh is started. Defaults
/// Defaults to 60px when not specified. /// to 60 pixels when not specified.
/// ///
/// Must be smaller than [refreshTriggerPullDistance], since the sliver /// Must be smaller than [refreshTriggerPullDistance], since the sliver
/// shouldn't grow further after triggering the refresh. /// shouldn't grow further after triggering the refresh.
......
...@@ -713,8 +713,6 @@ class _CupertinoBackGestureDetectorState<T> extends State<_CupertinoBackGestureD ...@@ -713,8 +713,6 @@ class _CupertinoBackGestureDetectorState<T> extends State<_CupertinoBackGestureD
/// detector controller is associated. /// detector controller is associated.
class _CupertinoBackGestureController<T> { class _CupertinoBackGestureController<T> {
/// Creates a controller for an iOS-style back gesture. /// Creates a controller for an iOS-style back gesture.
///
/// The [navigator] and [controller] arguments must not be null.
_CupertinoBackGestureController({ _CupertinoBackGestureController({
required this.navigator, required this.navigator,
required this.controller, required this.controller,
......
...@@ -197,51 +197,51 @@ class CupertinoSearchTextField extends StatefulWidget { ...@@ -197,51 +197,51 @@ class CupertinoSearchTextField extends StatefulWidget {
/// Sets the padding insets for the text and placeholder. /// Sets the padding insets for the text and placeholder.
/// ///
/// Cannot be null. Defaults to padding that replicates the /// Defaults to padding that replicates the `UISearchTextField` look. The
/// `UISearchTextField` look. The inset values were determined using the /// inset values were determined using the comparison tool in
/// comparison tool in https://github.com/flutter/platform_tests/. /// https://github.com/flutter/platform_tests/.
final EdgeInsetsGeometry padding; final EdgeInsetsGeometry padding;
/// Sets the color for the suffix and prefix icons. /// Sets the color for the suffix and prefix icons.
/// ///
/// Cannot be null. Defaults to [CupertinoColors.secondaryLabel]. /// Defaults to [CupertinoColors.secondaryLabel].
final Color itemColor; final Color itemColor;
/// Sets the base icon size for the suffix and prefix icons. /// Sets the base icon size for the suffix and prefix icons.
/// ///
/// Cannot be null. The size of the icon is scaled using the accessibility /// The size of the icon is scaled using the accessibility font scale
/// font scale settings. Defaults to `20.0`. /// settings. Defaults to `20.0`.
final double itemSize; final double itemSize;
/// Sets the padding insets for the suffix. /// Sets the padding insets for the suffix.
/// ///
/// Cannot be null. Defaults to padding that replicates the /// Defaults to padding that replicates the `UISearchTextField` suffix look.
/// `UISearchTextField` suffix look. The inset values were determined using /// The inset values were determined using the comparison tool in
/// the comparison tool in https://github.com/flutter/platform_tests/. /// https://github.com/flutter/platform_tests/.
final EdgeInsetsGeometry prefixInsets; final EdgeInsetsGeometry prefixInsets;
/// Sets a prefix widget. /// Sets a prefix widget.
/// ///
/// Cannot be null. Defaults to an [Icon] widget with the [CupertinoIcons.search] icon. /// Defaults to an [Icon] widget with the [CupertinoIcons.search] icon.
final Widget prefixIcon; final Widget prefixIcon;
/// Sets the padding insets for the prefix. /// Sets the padding insets for the prefix.
/// ///
/// Cannot be null. Defaults to padding that replicates the /// Defaults to padding that replicates the `UISearchTextField` prefix look.
/// `UISearchTextField` prefix look. The inset values were determined using /// The inset values were determined using the comparison tool in
/// the comparison tool in https://github.com/flutter/platform_tests/. /// https://github.com/flutter/platform_tests/.
final EdgeInsetsGeometry suffixInsets; final EdgeInsetsGeometry suffixInsets;
/// Sets the suffix widget's icon. /// Sets the suffix widget's icon.
/// ///
/// Cannot be null. Defaults to the X-Mark [CupertinoIcons.xmark_circle_fill]. /// Defaults to the X-Mark [CupertinoIcons.xmark_circle_fill]. "To change the
/// "To change the functionality of the suffix icon, provide a custom /// functionality of the suffix icon, provide a custom onSuffixTap callback
/// onSuffixTap callback and specify an intuitive suffixIcon. /// and specify an intuitive suffixIcon.
final Icon suffixIcon; final Icon suffixIcon;
/// Dictates when the X-Mark (suffix) should be visible. /// Dictates when the X-Mark (suffix) should be visible.
/// ///
/// Cannot be null. Defaults to only on when editing. /// Defaults to only on when editing.
final OverlayVisibilityMode suffixMode; final OverlayVisibilityMode suffixMode;
/// Sets the X-Mark (suffix) action. /// Sets the X-Mark (suffix) action.
......
...@@ -76,9 +76,9 @@ const Duration _kFadeDuration = Duration(milliseconds: 165); ...@@ -76,9 +76,9 @@ const Duration _kFadeDuration = Duration(milliseconds: 165);
class CupertinoSegmentedControl<T extends Object> extends StatefulWidget { class CupertinoSegmentedControl<T extends Object> extends StatefulWidget {
/// Creates an iOS-style segmented control bar. /// Creates an iOS-style segmented control bar.
/// ///
/// The [children] and [onValueChanged] arguments must not be null. The /// The [children] argument must be an ordered [Map] such as a
/// [children] argument must be an ordered [Map] such as a [LinkedHashMap]. /// [LinkedHashMap]. Further, the length of the [children] list must be
/// Further, the length of the [children] list must be greater than one. /// greater than one.
/// ///
/// Each widget value in the map of [children] must have an associated key /// Each widget value in the map of [children] must have an associated key
/// that uniquely identifies this widget. This key is what will be returned /// that uniquely identifies this widget. This key is what will be returned
...@@ -120,8 +120,6 @@ class CupertinoSegmentedControl<T extends Object> extends StatefulWidget { ...@@ -120,8 +120,6 @@ class CupertinoSegmentedControl<T extends Object> extends StatefulWidget {
/// The callback that is called when a new option is tapped. /// The callback that is called when a new option is tapped.
/// ///
/// This attribute must not be null.
///
/// The segmented control passes the newly selected widget's associated key /// The segmented control passes the newly selected widget's associated key
/// to the callback but does not actually change state until the parent /// to the callback but does not actually change state until the parent
/// widget rebuilds the segmented control with the new [groupValue]. /// widget rebuilds the segmented control with the new [groupValue].
......
...@@ -202,8 +202,6 @@ class CupertinoSlider extends StatefulWidget { ...@@ -202,8 +202,6 @@ class CupertinoSlider extends StatefulWidget {
/// The color to use for the thumb of the slider. /// The color to use for the thumb of the slider.
/// ///
/// Thumb color must not be null.
///
/// Defaults to [CupertinoColors.white]. /// Defaults to [CupertinoColors.white].
final Color thumbColor; final Color thumbColor;
......
...@@ -299,9 +299,9 @@ class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProvide ...@@ -299,9 +299,9 @@ class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProvide
class CupertinoSlidingSegmentedControl<T> extends StatefulWidget { class CupertinoSlidingSegmentedControl<T> extends StatefulWidget {
/// Creates an iOS-style segmented control bar. /// Creates an iOS-style segmented control bar.
/// ///
/// The [children] and [onValueChanged] arguments must not be null. The /// The [children] argument must be an ordered [Map] such as a
/// [children] argument must be an ordered [Map] such as a [LinkedHashMap]. /// [LinkedHashMap]. Further, the length of the [children] list must be
/// Further, the length of the [children] list must be greater than one. /// greater than one.
/// ///
/// Each widget value in the map of [children] must have an associated key /// Each widget value in the map of [children] must have an associated key
/// that uniquely identifies this widget. This key is what will be returned /// that uniquely identifies this widget. This key is what will be returned
...@@ -343,8 +343,6 @@ class CupertinoSlidingSegmentedControl<T> extends StatefulWidget { ...@@ -343,8 +343,6 @@ class CupertinoSlidingSegmentedControl<T> extends StatefulWidget {
/// The callback that is called when a new option is tapped. /// The callback that is called when a new option is tapped.
/// ///
/// This attribute must not be null.
///
/// The segmented control passes the newly selected widget's associated key /// The segmented control passes the newly selected widget's associated key
/// to the callback but does not actually change state until the parent /// to the callback but does not actually change state until the parent
/// widget rebuilds the segmented control with the new [groupValue]. /// widget rebuilds the segmented control with the new [groupValue].
...@@ -403,7 +401,7 @@ class CupertinoSlidingSegmentedControl<T> extends StatefulWidget { ...@@ -403,7 +401,7 @@ class CupertinoSlidingSegmentedControl<T> extends StatefulWidget {
/// The amount of space by which to inset the [children]. /// The amount of space by which to inset the [children].
/// ///
/// Must not be null. Defaults to EdgeInsets.symmetric(vertical: 2, horizontal: 3). /// Defaults to `EdgeInsets.symmetric(vertical: 2, horizontal: 3)`.
final EdgeInsetsGeometry padding; final EdgeInsetsGeometry padding;
@override @override
......
...@@ -64,8 +64,7 @@ import 'thumb_painter.dart'; ...@@ -64,8 +64,7 @@ import 'thumb_painter.dart';
class CupertinoSwitch extends StatefulWidget { class CupertinoSwitch extends StatefulWidget {
/// Creates an iOS-style switch. /// Creates an iOS-style switch.
/// ///
/// The [value] parameter must not be null. /// The [dragStartBehavior] parameter defaults to [DragStartBehavior.start].
/// The [dragStartBehavior] parameter defaults to [DragStartBehavior.start] and must not be null.
const CupertinoSwitch({ const CupertinoSwitch({
super.key, super.key,
required this.value, required this.value,
...@@ -84,8 +83,6 @@ class CupertinoSwitch extends StatefulWidget { ...@@ -84,8 +83,6 @@ class CupertinoSwitch extends StatefulWidget {
}); });
/// Whether this switch is on or off. /// Whether this switch is on or off.
///
/// Must not be null.
final bool value; final bool value;
/// Called when the user toggles with switch on or off. /// Called when the user toggles with switch on or off.
......
...@@ -32,8 +32,8 @@ class CupertinoTabController extends ChangeNotifier { ...@@ -32,8 +32,8 @@ class CupertinoTabController extends ChangeNotifier {
/// Creates a [CupertinoTabController] to control the tab index of [CupertinoTabScaffold] /// Creates a [CupertinoTabController] to control the tab index of [CupertinoTabScaffold]
/// and [CupertinoTabBar]. /// and [CupertinoTabBar].
/// ///
/// The [initialIndex] must not be null and defaults to 0. The value must be /// The [initialIndex] defaults to 0. The value must be greater than or equal
/// greater than or equal to 0, and less than the total number of tabs. /// to 0, and less than the total number of tabs.
CupertinoTabController({ int initialIndex = 0 }) CupertinoTabController({ int initialIndex = 0 })
: _index = initialIndex, : _index = initialIndex,
assert(initialIndex >= 0); assert(initialIndex >= 0);
...@@ -123,8 +123,6 @@ class CupertinoTabController extends ChangeNotifier { ...@@ -123,8 +123,6 @@ class CupertinoTabController extends ChangeNotifier {
/// * [iOS human interface guidelines](https://developer.apple.com/design/human-interface-guidelines/ios/bars/tab-bars/). /// * [iOS human interface guidelines](https://developer.apple.com/design/human-interface-guidelines/ios/bars/tab-bars/).
class CupertinoTabScaffold extends StatefulWidget { class CupertinoTabScaffold extends StatefulWidget {
/// Creates a layout for applications with a tab bar at the bottom. /// Creates a layout for applications with a tab bar at the bottom.
///
/// The [tabBar] and [tabBuilder] arguments must not be null.
CupertinoTabScaffold({ CupertinoTabScaffold({
super.key, super.key,
required this.tabBar, required this.tabBar,
...@@ -161,8 +159,6 @@ class CupertinoTabScaffold extends StatefulWidget { ...@@ -161,8 +159,6 @@ class CupertinoTabScaffold extends StatefulWidget {
/// By default [tabBar] disables text scaling to match the native iOS behavior. /// By default [tabBar] disables text scaling to match the native iOS behavior.
/// To override this behavior, wrap each of the [tabBar]'s items inside a /// To override this behavior, wrap each of the [tabBar]'s items inside a
/// [MediaQuery] with the desired [TextScaler]. /// [MediaQuery] with the desired [TextScaler].
///
/// Must not be null.
final CupertinoTabBar tabBar; final CupertinoTabBar tabBar;
/// Controls the currently selected tab index of the [tabBar], as well as the /// Controls the currently selected tab index of the [tabBar], as well as the
...@@ -186,8 +182,6 @@ class CupertinoTabScaffold extends StatefulWidget { ...@@ -186,8 +182,6 @@ class CupertinoTabScaffold extends StatefulWidget {
/// In that case, the child's [BuildContext]'s [MediaQuery] will have a /// In that case, the child's [BuildContext]'s [MediaQuery] will have a
/// bottom padding indicating the area of obstructing overlap from the /// bottom padding indicating the area of obstructing overlap from the
/// [tabBar]. /// [tabBar].
///
/// Must not be null.
final IndexedWidgetBuilder tabBuilder; final IndexedWidgetBuilder tabBuilder;
/// The color of the widget that underlies the entire scaffold. /// The color of the widget that underlies the entire scaffold.
...@@ -201,7 +195,7 @@ class CupertinoTabScaffold extends StatefulWidget { ...@@ -201,7 +195,7 @@ class CupertinoTabScaffold extends StatefulWidget {
/// scaffold, the body can be resized to avoid overlapping the keyboard, which /// scaffold, the body can be resized to avoid overlapping the keyboard, which
/// prevents widgets inside the body from being obscured by the keyboard. /// prevents widgets inside the body from being obscured by the keyboard.
/// ///
/// Defaults to true and cannot be null. /// Defaults to true.
final bool resizeToAvoidBottomInset; final bool resizeToAvoidBottomInset;
/// Restoration ID to save and restore the state of the [CupertinoTabScaffold]. /// Restoration ID to save and restore the state of the [CupertinoTabScaffold].
...@@ -514,8 +508,8 @@ class RestorableCupertinoTabController extends RestorableChangeNotifier<Cupertin ...@@ -514,8 +508,8 @@ class RestorableCupertinoTabController extends RestorableChangeNotifier<Cupertin
/// Creates a [RestorableCupertinoTabController] to control the tab index of /// Creates a [RestorableCupertinoTabController] to control the tab index of
/// [CupertinoTabScaffold] and [CupertinoTabBar]. /// [CupertinoTabScaffold] and [CupertinoTabBar].
/// ///
/// The `initialIndex` must not be null and defaults to 0. The value must be /// The `initialIndex` defaults to zero. The value must be greater than or
/// greater than or equal to 0, and less than the total number of tabs. /// equal to zero, and less than the total number of tabs.
RestorableCupertinoTabController({ int initialIndex = 0 }) RestorableCupertinoTabController({ int initialIndex = 0 })
: assert(initialIndex >= 0), : assert(initialIndex >= 0),
_initialIndex = initialIndex; _initialIndex = initialIndex;
......
...@@ -194,8 +194,7 @@ class CupertinoTextField extends StatefulWidget { ...@@ -194,8 +194,7 @@ class CupertinoTextField extends StatefulWidget {
/// ///
/// The [selectionHeightStyle] and [selectionWidthStyle] properties allow /// The [selectionHeightStyle] and [selectionWidthStyle] properties allow
/// changing the shape of the selection highlighting. These properties default /// changing the shape of the selection highlighting. These properties default
/// to [ui.BoxHeightStyle.tight] and [ui.BoxWidthStyle.tight] respectively and /// to [ui.BoxHeightStyle.tight] and [ui.BoxWidthStyle.tight], respectively.
/// must not be null.
/// ///
/// The [autocorrect], [autofocus], [clearButtonMode], [dragStartBehavior], /// The [autocorrect], [autofocus], [clearButtonMode], [dragStartBehavior],
/// [expands], [obscureText], [prefixMode], [readOnly], [scrollPadding], /// [expands], [obscureText], [prefixMode], [readOnly], [scrollPadding],
...@@ -332,13 +331,7 @@ class CupertinoTextField extends StatefulWidget { ...@@ -332,13 +331,7 @@ class CupertinoTextField extends StatefulWidget {
/// ///
/// The [selectionHeightStyle] and [selectionWidthStyle] properties allow /// The [selectionHeightStyle] and [selectionWidthStyle] properties allow
/// changing the shape of the selection highlighting. These properties default /// changing the shape of the selection highlighting. These properties default
/// to [ui.BoxHeightStyle.tight] and [ui.BoxWidthStyle.tight] respectively and /// to [ui.BoxHeightStyle.tight] and [ui.BoxWidthStyle.tight] respectively.
/// must not be null.
///
/// The [autocorrect], [autofocus], [clearButtonMode], [dragStartBehavior],
/// [expands], [obscureText], [prefixMode], [readOnly], [scrollPadding],
/// [suffixMode], [textAlign], [selectionHeightStyle], [selectionWidthStyle],
/// and [enableSuggestions] properties must not be null.
/// ///
/// See also: /// See also:
/// ///
...@@ -489,7 +482,7 @@ class CupertinoTextField extends StatefulWidget { ...@@ -489,7 +482,7 @@ class CupertinoTextField extends StatefulWidget {
/// Controls the visibility of the [prefix] widget based on the state of /// Controls the visibility of the [prefix] widget based on the state of
/// text entry when the [prefix] argument is not null. /// text entry when the [prefix] argument is not null.
/// ///
/// Defaults to [OverlayVisibilityMode.always] and cannot be null. /// Defaults to [OverlayVisibilityMode.always].
/// ///
/// Has no effect when [prefix] is null. /// Has no effect when [prefix] is null.
final OverlayVisibilityMode prefixMode; final OverlayVisibilityMode prefixMode;
...@@ -500,7 +493,7 @@ class CupertinoTextField extends StatefulWidget { ...@@ -500,7 +493,7 @@ class CupertinoTextField extends StatefulWidget {
/// Controls the visibility of the [suffix] widget based on the state of /// Controls the visibility of the [suffix] widget based on the state of
/// text entry when the [suffix] argument is not null. /// text entry when the [suffix] argument is not null.
/// ///
/// Defaults to [OverlayVisibilityMode.always] and cannot be null. /// Defaults to [OverlayVisibilityMode.always].
/// ///
/// Has no effect when [suffix] is null. /// Has no effect when [suffix] is null.
final OverlayVisibilityMode suffixMode; final OverlayVisibilityMode suffixMode;
...@@ -512,7 +505,7 @@ class CupertinoTextField extends StatefulWidget { ...@@ -512,7 +505,7 @@ class CupertinoTextField extends StatefulWidget {
/// ///
/// Will only appear if no [suffix] widget is appearing. /// Will only appear if no [suffix] widget is appearing.
/// ///
/// Defaults to never appearing and cannot be null. /// Defaults to [OverlayVisibilityMode.never].
final OverlayVisibilityMode clearButtonMode; final OverlayVisibilityMode clearButtonMode;
/// {@macro flutter.widgets.editableText.keyboardType} /// {@macro flutter.widgets.editableText.keyboardType}
......
...@@ -34,8 +34,6 @@ const EdgeInsets _kToolbarButtonPadding = EdgeInsets.symmetric(vertical: 18.0, h ...@@ -34,8 +34,6 @@ const EdgeInsets _kToolbarButtonPadding = EdgeInsets.symmetric(vertical: 18.0, h
/// A button in the style of the iOS text selection toolbar buttons. /// A button in the style of the iOS text selection toolbar buttons.
class CupertinoTextSelectionToolbarButton extends StatefulWidget { class CupertinoTextSelectionToolbarButton extends StatefulWidget {
/// Create an instance of [CupertinoTextSelectionToolbarButton]. /// Create an instance of [CupertinoTextSelectionToolbarButton].
///
/// [child] cannot be null.
const CupertinoTextSelectionToolbarButton({ const CupertinoTextSelectionToolbarButton({
super.key, super.key,
this.onPressed, this.onPressed,
...@@ -54,8 +52,6 @@ class CupertinoTextSelectionToolbarButton extends StatefulWidget { ...@@ -54,8 +52,6 @@ class CupertinoTextSelectionToolbarButton extends StatefulWidget {
/// Create an instance of [CupertinoTextSelectionToolbarButton] from the given /// Create an instance of [CupertinoTextSelectionToolbarButton] from the given
/// [ContextMenuButtonItem]. /// [ContextMenuButtonItem].
///
/// [buttonItem] cannot be null.
CupertinoTextSelectionToolbarButton.buttonItem({ CupertinoTextSelectionToolbarButton.buttonItem({
super.key, super.key,
required ContextMenuButtonItem this.buttonItem, required ContextMenuButtonItem this.buttonItem,
......
...@@ -116,7 +116,7 @@ class CupertinoTextThemeData with Diagnosticable { ...@@ -116,7 +116,7 @@ class CupertinoTextThemeData with Diagnosticable {
/// Create a [CupertinoTextThemeData]. /// Create a [CupertinoTextThemeData].
/// ///
/// The [primaryColor] is used to derive TextStyle defaults of other attributes /// The [primaryColor] is used to derive TextStyle defaults of other attributes
/// such as [navActionTextStyle] and [actionTextStyle], it must not be null when /// such as [navActionTextStyle] and [actionTextStyle]. It must not be null when
/// either [navActionTextStyle] or [actionTextStyle] is null. Defaults to /// either [navActionTextStyle] or [actionTextStyle] is null. Defaults to
/// [CupertinoColors.systemBlue]. /// [CupertinoColors.systemBlue].
/// ///
......
...@@ -47,8 +47,6 @@ const _CupertinoThemeDefaults _kDefaultTheme = _CupertinoThemeDefaults( ...@@ -47,8 +47,6 @@ const _CupertinoThemeDefaults _kDefaultTheme = _CupertinoThemeDefaults(
/// with a [CupertinoThemeData] derived from the Material [ThemeData]. /// with a [CupertinoThemeData] derived from the Material [ThemeData].
class CupertinoTheme extends StatelessWidget { class CupertinoTheme extends StatelessWidget {
/// Creates a [CupertinoTheme] to change descendant Cupertino widgets' styling. /// Creates a [CupertinoTheme] to change descendant Cupertino widgets' styling.
///
/// The [data] and [child] parameters must not be null.
const CupertinoTheme({ const CupertinoTheme({
super.key, super.key,
required this.data, required this.data,
......
...@@ -59,8 +59,6 @@ class CupertinoThumbPainter { ...@@ -59,8 +59,6 @@ class CupertinoThumbPainter {
final Color color; final Color color;
/// The list of [BoxShadow] to paint below the thumb. /// The list of [BoxShadow] to paint below the thumb.
///
/// Must not be null.
final List<BoxShadow> shadows; final List<BoxShadow> shadows;
/// Half the default diameter of the thumb. /// Half the default diameter of the thumb.
......
...@@ -48,8 +48,7 @@ typedef StackTraceDemangler = StackTrace Function(StackTrace details); ...@@ -48,8 +48,7 @@ typedef StackTraceDemangler = StackTrace Function(StackTrace details);
/// * [RepetitiveStackFrameFilter], which uses this class to compare against [StackFrame]s. /// * [RepetitiveStackFrameFilter], which uses this class to compare against [StackFrame]s.
@immutable @immutable
class PartialStackFrame { class PartialStackFrame {
/// Creates a new [PartialStackFrame] instance. All arguments are required and /// Creates a new [PartialStackFrame] instance.
/// must not be null.
const PartialStackFrame({ const PartialStackFrame({
required this.package, required this.package,
required this.className, required this.className,
...@@ -397,9 +396,6 @@ class FlutterErrorDetails with Diagnosticable { ...@@ -397,9 +396,6 @@ class FlutterErrorDetails with Diagnosticable {
/// ///
/// The framework calls this constructor when catching an exception that will /// The framework calls this constructor when catching an exception that will
/// subsequently be reported using [FlutterError.onError]. /// subsequently be reported using [FlutterError.onError].
///
/// The [exception] must not be null; other arguments can be left to
/// their default values.
const FlutterErrorDetails({ const FlutterErrorDetails({
required this.exception, required this.exception,
this.stack, this.stack,
......
...@@ -102,9 +102,8 @@ typedef AsyncValueGetter<T> = Future<T> Function(); ...@@ -102,9 +102,8 @@ typedef AsyncValueGetter<T> = Future<T> Function();
/// also applies to any iterables derived from this one, e.g. as /// also applies to any iterables derived from this one, e.g. as
/// returned by `where`. /// returned by `where`.
class CachingIterable<E> extends IterableBase<E> { class CachingIterable<E> extends IterableBase<E> {
/// Creates a CachingIterable using the given [Iterator] as the /// Creates a [CachingIterable] using the given [Iterator] as the source of
/// source of data. The iterator must be non-null and must not throw /// data. The iterator must not throw exceptions.
/// exceptions.
/// ///
/// Since the argument is an [Iterator], not an [Iterable], it is /// Since the argument is an [Iterator], not an [Iterable], it is
/// guaranteed that the underlying data set will only be walked /// guaranteed that the underlying data set will only be walked
...@@ -229,8 +228,6 @@ class _LazyListIterator<E> implements Iterator<E> { ...@@ -229,8 +228,6 @@ class _LazyListIterator<E> implements Iterator<E> {
/// A factory interface that also reports the type of the created objects. /// A factory interface that also reports the type of the created objects.
class Factory<T> { class Factory<T> {
/// Creates a new factory. /// Creates a new factory.
///
/// The `constructor` parameter must not be null.
const Factory(this.constructor); const Factory(this.constructor);
/// Creates a new object of type T. /// Creates a new object of type T.
......
...@@ -226,8 +226,6 @@ enum DiagnosticsTreeStyle { ...@@ -226,8 +226,6 @@ enum DiagnosticsTreeStyle {
/// to render text art for arbitrary trees of [DiagnosticsNode] objects. /// to render text art for arbitrary trees of [DiagnosticsNode] objects.
class TextTreeConfiguration { class TextTreeConfiguration {
/// Create a configuration object describing how to render a tree as text. /// Create a configuration object describing how to render a tree as text.
///
/// All of the arguments must not be null.
TextTreeConfiguration({ TextTreeConfiguration({
required this.prefixLineOne, required this.prefixLineOne,
required this.prefixOtherLines, required this.prefixOtherLines,
...@@ -1451,8 +1449,6 @@ abstract class DiagnosticsNode { ...@@ -1451,8 +1449,6 @@ abstract class DiagnosticsNode {
/// Diagnostics containing just a string `message` and not a concrete name or /// Diagnostics containing just a string `message` and not a concrete name or
/// value. /// value.
/// ///
/// The [style] and [level] arguments must not be null.
///
/// See also: /// See also:
/// ///
/// * [MessageProperty], which is better suited to messages that are to be /// * [MessageProperty], which is better suited to messages that are to be
...@@ -1829,8 +1825,6 @@ class MessageProperty extends DiagnosticsProperty<void> { ...@@ -1829,8 +1825,6 @@ class MessageProperty extends DiagnosticsProperty<void> {
/// ///
/// Messages have no concrete [value] (so [value] will return null). The /// Messages have no concrete [value] (so [value] will return null). The
/// message is stored as the description. /// message is stored as the description.
///
/// The [name], `message`, and [level] arguments must not be null.
MessageProperty( MessageProperty(
String name, String name,
String message, { String message, {
...@@ -1847,8 +1841,6 @@ class MessageProperty extends DiagnosticsProperty<void> { ...@@ -1847,8 +1841,6 @@ class MessageProperty extends DiagnosticsProperty<void> {
/// instead of describing a property with a string value. /// instead of describing a property with a string value.
class StringProperty extends DiagnosticsProperty<String> { class StringProperty extends DiagnosticsProperty<String> {
/// Create a diagnostics property for strings. /// Create a diagnostics property for strings.
///
/// The [showName], [quoted], [style], and [level] arguments must not be null.
StringProperty( StringProperty(
String super.name, String super.name,
super.value, { super.value, {
...@@ -1956,8 +1948,6 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> { ...@@ -1956,8 +1948,6 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
/// Numeric formatting is optimized for debug message readability. /// Numeric formatting is optimized for debug message readability.
class DoubleProperty extends _NumProperty<double> { class DoubleProperty extends _NumProperty<double> {
/// If specified, [unit] describes the unit for the [value] (e.g. px). /// If specified, [unit] describes the unit for the [value] (e.g. px).
///
/// The [showName], [style], and [level] arguments must not be null.
DoubleProperty( DoubleProperty(
super.name, super.name,
super.value, { super.value, {
...@@ -1974,8 +1964,6 @@ class DoubleProperty extends _NumProperty<double> { ...@@ -1974,8 +1964,6 @@ class DoubleProperty extends _NumProperty<double> {
/// ///
/// Use if computing the property [value] may throw an exception or is /// Use if computing the property [value] may throw an exception or is
/// expensive. /// expensive.
///
/// The [showName] and [level] arguments must not be null.
DoubleProperty.lazy( DoubleProperty.lazy(
super.name, super.name,
super.computeValue, { super.computeValue, {
...@@ -1996,8 +1984,6 @@ class DoubleProperty extends _NumProperty<double> { ...@@ -1996,8 +1984,6 @@ class DoubleProperty extends _NumProperty<double> {
/// Examples of units include 'px' and 'ms'. /// Examples of units include 'px' and 'ms'.
class IntProperty extends _NumProperty<int> { class IntProperty extends _NumProperty<int> {
/// Create a diagnostics property for integers. /// Create a diagnostics property for integers.
///
/// The [showName], [style], and [level] arguments must not be null.
IntProperty( IntProperty(
super.name, super.name,
super.value, { super.value, {
...@@ -2022,8 +2008,6 @@ class PercentProperty extends DoubleProperty { ...@@ -2022,8 +2008,6 @@ class PercentProperty extends DoubleProperty {
/// Setting [showName] to false is often reasonable for [PercentProperty] /// Setting [showName] to false is often reasonable for [PercentProperty]
/// objects, as the fact that the property is shown as a percentage tends to /// objects, as the fact that the property is shown as a percentage tends to
/// be sufficient to disambiguate its meaning. /// be sufficient to disambiguate its meaning.
///
/// The [showName] and [level] arguments must not be null.
PercentProperty( PercentProperty(
super.name, super.name,
super.fraction, { super.fraction, {
...@@ -2096,8 +2080,6 @@ class FlagProperty extends DiagnosticsProperty<bool> { ...@@ -2096,8 +2080,6 @@ class FlagProperty extends DiagnosticsProperty<bool> {
/// ///
/// [showName] defaults to false as typically [ifTrue] and [ifFalse] should /// [showName] defaults to false as typically [ifTrue] and [ifFalse] should
/// be descriptions that make the property name redundant. /// be descriptions that make the property name redundant.
///
/// The [showName] and [level] arguments must not be null.
FlagProperty( FlagProperty(
String name, { String name, {
required bool? value, required bool? value,
...@@ -2196,8 +2178,6 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { ...@@ -2196,8 +2178,6 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
/// empty iterable [value] is not interesting to display similar to how /// empty iterable [value] is not interesting to display similar to how
/// [defaultValue] is used to indicate that a specific concrete value is not /// [defaultValue] is used to indicate that a specific concrete value is not
/// interesting to display. /// interesting to display.
///
/// The [style], [showName], [showSeparator], and [level] arguments must not be null.
IterableProperty( IterableProperty(
String super.name, String super.name,
super.value, { super.value, {
...@@ -2322,8 +2302,7 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> { ...@@ -2322,8 +2302,7 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
/// absent (null), but for which the exact value's [Object.toString] /// absent (null), but for which the exact value's [Object.toString]
/// representation is not very transparent (e.g. a callback). /// representation is not very transparent (e.g. a callback).
/// ///
/// The [showName] and [level] arguments must not be null. Additionally, at /// At least one of [ifPresent] or [ifNull] must be non-null.
/// least one of [ifPresent] and [ifNull] must not be null.
ObjectFlagProperty( ObjectFlagProperty(
String super.name, String super.name,
super.value, { super.value, {
...@@ -2337,8 +2316,6 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> { ...@@ -2337,8 +2316,6 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
/// ///
/// Only use if prefixing the property name with the word 'has' is a good /// Only use if prefixing the property name with the word 'has' is a good
/// flag name. /// flag name.
///
/// The [name] and [level] arguments must not be null.
ObjectFlagProperty.has( ObjectFlagProperty.has(
String super.name, String super.name,
super.value, { super.value, {
...@@ -2515,9 +2492,6 @@ typedef ComputePropertyValueCallback<T> = T? Function(); ...@@ -2515,9 +2492,6 @@ typedef ComputePropertyValueCallback<T> = T? Function();
class DiagnosticsProperty<T> extends DiagnosticsNode { class DiagnosticsProperty<T> extends DiagnosticsNode {
/// Create a diagnostics property. /// Create a diagnostics property.
/// ///
/// The [showName], [showSeparator], [style], [missingIfNull], and [level]
/// arguments must not be null.
///
/// The [level] argument is just a suggestion and can be overridden if /// The [level] argument is just a suggestion and can be overridden if
/// something else about the property causes it to have a lower or higher /// something else about the property causes it to have a lower or higher
/// level. For example, if the property value is null and [missingIfNull] is /// level. For example, if the property value is null and [missingIfNull] is
...@@ -2554,9 +2528,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -2554,9 +2528,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// Use if computing the property [value] may throw an exception or is /// Use if computing the property [value] may throw an exception or is
/// expensive. /// expensive.
/// ///
/// The [showName], [showSeparator], [style], [missingIfNull], and [level]
/// arguments must not be null.
///
/// The [level] argument is just a suggestion and can be overridden /// The [level] argument is just a suggestion and can be overridden
/// if something else about the property causes it to have a lower or higher /// if something else about the property causes it to have a lower or higher
/// level. For example, if calling `computeValue` throws an exception, [level] /// level. For example, if calling `computeValue` throws an exception, [level]
...@@ -2694,8 +2665,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -2694,8 +2665,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// If a [tooltip] is specified, add the tooltip it to the end of `text` /// If a [tooltip] is specified, add the tooltip it to the end of `text`
/// enclosing it parenthesis to disambiguate the tooltip from the rest of /// enclosing it parenthesis to disambiguate the tooltip from the rest of
/// the text. /// the text.
///
/// `text` must not be null.
String _addTooltip(String text) { String _addTooltip(String text) {
return tooltip == null ? text : '$text ($tooltip)'; return tooltip == null ? text : '$text ($tooltip)';
} }
...@@ -2863,8 +2832,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -2863,8 +2832,6 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// to implement [getChildren] and [getProperties]. /// to implement [getChildren] and [getProperties].
class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode { class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode {
/// Create a diagnostics describing a [Diagnosticable] value. /// Create a diagnostics describing a [Diagnosticable] value.
///
/// The [value] argument must not be null.
DiagnosticableNode({ DiagnosticableNode({
super.name, super.name,
required this.value, required this.value,
......
...@@ -22,8 +22,8 @@ import 'object.dart'; ...@@ -22,8 +22,8 @@ import 'object.dart';
class StackFrame { class StackFrame {
/// Creates a new StackFrame instance. /// Creates a new StackFrame instance.
/// ///
/// All parameters must not be null. The [className] may be the empty string /// The [className] may be the empty string if there is no class (e.g. for a
/// if there is no class (e.g. for a top level library method). /// top level library method).
const StackFrame({ const StackFrame({
required this.number, required this.number,
required this.column, required this.column,
......
...@@ -20,8 +20,6 @@ export 'velocity_tracker.dart' show Velocity; ...@@ -20,8 +20,6 @@ export 'velocity_tracker.dart' show Velocity;
/// * [DragEndDetails], the details for [GestureDragEndCallback]. /// * [DragEndDetails], the details for [GestureDragEndCallback].
class DragDownDetails { class DragDownDetails {
/// Creates details for a [GestureDragDownCallback]. /// Creates details for a [GestureDragDownCallback].
///
/// The [globalPosition] argument must not be null.
DragDownDetails({ DragDownDetails({
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
Offset? localPosition, Offset? localPosition,
...@@ -65,8 +63,6 @@ typedef GestureDragDownCallback = void Function(DragDownDetails details); ...@@ -65,8 +63,6 @@ typedef GestureDragDownCallback = void Function(DragDownDetails details);
/// * [DragEndDetails], the details for [GestureDragEndCallback]. /// * [DragEndDetails], the details for [GestureDragEndCallback].
class DragStartDetails { class DragStartDetails {
/// Creates details for a [GestureDragStartCallback]. /// Creates details for a [GestureDragStartCallback].
///
/// The [globalPosition] argument must not be null.
DragStartDetails({ DragStartDetails({
this.sourceTimeStamp, this.sourceTimeStamp,
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
...@@ -128,12 +124,8 @@ typedef GestureDragStartCallback = void Function(DragStartDetails details); ...@@ -128,12 +124,8 @@ typedef GestureDragStartCallback = void Function(DragStartDetails details);
class DragUpdateDetails { class DragUpdateDetails {
/// Creates details for a [GestureDragUpdateCallback]. /// Creates details for a [GestureDragUpdateCallback].
/// ///
/// The [delta] argument must not be null.
///
/// If [primaryDelta] is non-null, then its value must match one of the /// If [primaryDelta] is non-null, then its value must match one of the
/// coordinates of [delta] and the other coordinate must be zero. /// coordinates of [delta] and the other coordinate must be zero.
///
/// The [globalPosition] argument must be provided and must not be null.
DragUpdateDetails({ DragUpdateDetails({
this.sourceTimeStamp, this.sourceTimeStamp,
this.delta = Offset.zero, this.delta = Offset.zero,
...@@ -219,8 +211,6 @@ class DragEndDetails { ...@@ -219,8 +211,6 @@ class DragEndDetails {
/// If [primaryVelocity] is non-null, its value must match one of the /// If [primaryVelocity] is non-null, its value must match one of the
/// coordinates of `velocity.pixelsPerSecond` and the other coordinate /// coordinates of `velocity.pixelsPerSecond` and the other coordinate
/// must be zero. /// must be zero.
///
/// The [velocity] argument must not be null.
DragEndDetails({ DragEndDetails({
this.velocity = Velocity.zero, this.velocity = Velocity.zero,
this.primaryVelocity, this.primaryVelocity,
......
...@@ -819,8 +819,6 @@ mixin _CopyPointerAddedEvent on PointerEvent { ...@@ -819,8 +819,6 @@ mixin _CopyPointerAddedEvent on PointerEvent {
/// made contact with the surface of the device. /// made contact with the surface of the device.
class PointerAddedEvent extends PointerEvent with _PointerEventDescription, _CopyPointerAddedEvent { class PointerAddedEvent extends PointerEvent with _PointerEventDescription, _CopyPointerAddedEvent {
/// Creates a pointer added event. /// Creates a pointer added event.
///
/// All of the arguments must be non-null.
const PointerAddedEvent({ const PointerAddedEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -914,8 +912,6 @@ mixin _CopyPointerRemovedEvent on PointerEvent { ...@@ -914,8 +912,6 @@ mixin _CopyPointerRemovedEvent on PointerEvent {
/// detection range or might have been disconnected from the system entirely. /// detection range or might have been disconnected from the system entirely.
class PointerRemovedEvent extends PointerEvent with _PointerEventDescription, _CopyPointerRemovedEvent { class PointerRemovedEvent extends PointerEvent with _PointerEventDescription, _CopyPointerRemovedEvent {
/// Creates a pointer removed event. /// Creates a pointer removed event.
///
/// All of the arguments must be non-null.
const PointerRemovedEvent({ const PointerRemovedEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1024,8 +1020,6 @@ mixin _CopyPointerHoverEvent on PointerEvent { ...@@ -1024,8 +1020,6 @@ mixin _CopyPointerHoverEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerHoverEvent extends PointerEvent with _PointerEventDescription, _CopyPointerHoverEvent { class PointerHoverEvent extends PointerEvent with _PointerEventDescription, _CopyPointerHoverEvent {
/// Creates a pointer hover event. /// Creates a pointer hover event.
///
/// All of the arguments must be non-null.
const PointerHoverEvent({ const PointerHoverEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1143,8 +1137,6 @@ mixin _CopyPointerEnterEvent on PointerEvent { ...@@ -1143,8 +1137,6 @@ mixin _CopyPointerEnterEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerEnterEvent extends PointerEvent with _PointerEventDescription, _CopyPointerEnterEvent { class PointerEnterEvent extends PointerEvent with _PointerEventDescription, _CopyPointerEnterEvent {
/// Creates a pointer enter event. /// Creates a pointer enter event.
///
/// All of the arguments must be non-null.
const PointerEnterEvent({ const PointerEnterEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1293,8 +1285,6 @@ mixin _CopyPointerExitEvent on PointerEvent { ...@@ -1293,8 +1285,6 @@ mixin _CopyPointerExitEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerExitEvent extends PointerEvent with _PointerEventDescription, _CopyPointerExitEvent { class PointerExitEvent extends PointerEvent with _PointerEventDescription, _CopyPointerExitEvent {
/// Creates a pointer exit event. /// Creates a pointer exit event.
///
/// All of the arguments must be non-null.
const PointerExitEvent({ const PointerExitEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1435,8 +1425,6 @@ mixin _CopyPointerDownEvent on PointerEvent { ...@@ -1435,8 +1425,6 @@ mixin _CopyPointerDownEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerDownEvent extends PointerEvent with _PointerEventDescription, _CopyPointerDownEvent { class PointerDownEvent extends PointerEvent with _PointerEventDescription, _CopyPointerDownEvent {
/// Creates a pointer down event. /// Creates a pointer down event.
///
/// All of the arguments must be non-null.
const PointerDownEvent({ const PointerDownEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1551,8 +1539,6 @@ mixin _CopyPointerMoveEvent on PointerEvent { ...@@ -1551,8 +1539,6 @@ mixin _CopyPointerMoveEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerMoveEvent extends PointerEvent with _PointerEventDescription, _CopyPointerMoveEvent { class PointerMoveEvent extends PointerEvent with _PointerEventDescription, _CopyPointerMoveEvent {
/// Creates a pointer move event. /// Creates a pointer move event.
///
/// All of the arguments must be non-null.
const PointerMoveEvent({ const PointerMoveEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1668,8 +1654,6 @@ mixin _CopyPointerUpEvent on PointerEvent { ...@@ -1668,8 +1654,6 @@ mixin _CopyPointerUpEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerUpEvent extends PointerEvent with _PointerEventDescription, _CopyPointerUpEvent { class PointerUpEvent extends PointerEvent with _PointerEventDescription, _CopyPointerUpEvent {
/// Creates a pointer up event. /// Creates a pointer up event.
///
/// All of the arguments must be non-null.
const PointerUpEvent({ const PointerUpEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1802,8 +1786,6 @@ mixin _CopyPointerScrollEvent on PointerEvent { ...@@ -1802,8 +1786,6 @@ mixin _CopyPointerScrollEvent on PointerEvent {
/// participating agents may disambiguate an event's target. /// participating agents may disambiguate an event's target.
class PointerScrollEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScrollEvent { class PointerScrollEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScrollEvent {
/// Creates a pointer scroll event. /// Creates a pointer scroll event.
///
/// All of the arguments must be non-null.
const PointerScrollEvent({ const PointerScrollEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1905,8 +1887,6 @@ mixin _CopyPointerScrollInertiaCancelEvent on PointerEvent { ...@@ -1905,8 +1887,6 @@ mixin _CopyPointerScrollInertiaCancelEvent on PointerEvent {
/// participating agents may disambiguate an event's target. /// participating agents may disambiguate an event's target.
class PointerScrollInertiaCancelEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScrollInertiaCancelEvent { class PointerScrollInertiaCancelEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScrollInertiaCancelEvent {
/// Creates a pointer scroll-inertia cancel event. /// Creates a pointer scroll-inertia cancel event.
///
/// All of the arguments must be non-null.
const PointerScrollInertiaCancelEvent({ const PointerScrollInertiaCancelEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -1994,8 +1974,6 @@ mixin _CopyPointerScaleEvent on PointerEvent { ...@@ -1994,8 +1974,6 @@ mixin _CopyPointerScaleEvent on PointerEvent {
/// participating agents may disambiguate an event's target. /// participating agents may disambiguate an event's target.
class PointerScaleEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScaleEvent { class PointerScaleEvent extends PointerSignalEvent with _PointerEventDescription, _CopyPointerScaleEvent {
/// Creates a pointer scale event. /// Creates a pointer scale event.
///
/// All of the arguments must be non-null.
const PointerScaleEvent({ const PointerScaleEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -2080,8 +2058,6 @@ mixin _CopyPointerPanZoomStartEvent on PointerEvent { ...@@ -2080,8 +2058,6 @@ mixin _CopyPointerPanZoomStartEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerPanZoomStartEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomStartEvent { class PointerPanZoomStartEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomStartEvent {
/// Creates a pointer pan/zoom start event. /// Creates a pointer pan/zoom start event.
///
/// All of the arguments must be non-null.
const PointerPanZoomStartEvent({ const PointerPanZoomStartEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -2183,8 +2159,6 @@ mixin _CopyPointerPanZoomUpdateEvent on PointerEvent { ...@@ -2183,8 +2159,6 @@ mixin _CopyPointerPanZoomUpdateEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerPanZoomUpdateEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomUpdateEvent { class PointerPanZoomUpdateEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomUpdateEvent {
/// Creates a pointer pan/zoom update event. /// Creates a pointer pan/zoom update event.
///
/// All of the arguments must be non-null.
const PointerPanZoomUpdateEvent({ const PointerPanZoomUpdateEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -2303,8 +2277,6 @@ mixin _CopyPointerPanZoomEndEvent on PointerEvent { ...@@ -2303,8 +2277,6 @@ mixin _CopyPointerPanZoomEndEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerPanZoomEndEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomEndEvent { class PointerPanZoomEndEvent extends PointerEvent with _PointerEventDescription, _CopyPointerPanZoomEndEvent {
/// Creates a pointer pan/zoom end event. /// Creates a pointer pan/zoom end event.
///
/// All of the arguments must be non-null.
const PointerPanZoomEndEvent({ const PointerPanZoomEndEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
...@@ -2397,8 +2369,6 @@ mixin _CopyPointerCancelEvent on PointerEvent { ...@@ -2397,8 +2369,6 @@ mixin _CopyPointerCancelEvent on PointerEvent {
/// events in a widget tree. /// events in a widget tree.
class PointerCancelEvent extends PointerEvent with _PointerEventDescription, _CopyPointerCancelEvent { class PointerCancelEvent extends PointerEvent with _PointerEventDescription, _CopyPointerCancelEvent {
/// Creates a pointer cancel event. /// Creates a pointer cancel event.
///
/// All of the arguments must be non-null.
const PointerCancelEvent({ const PointerCancelEvent({
super.viewId, super.viewId,
super.timeStamp, super.timeStamp,
......
...@@ -46,8 +46,6 @@ enum _ForceState { ...@@ -46,8 +46,6 @@ enum _ForceState {
class ForcePressDetails { class ForcePressDetails {
/// Creates details for a [GestureForcePressStartCallback], /// Creates details for a [GestureForcePressStartCallback],
/// [GestureForcePressPeakCallback] or [GestureForcePressEndCallback]. /// [GestureForcePressPeakCallback] or [GestureForcePressEndCallback].
///
/// The [globalPosition] argument must not be null.
ForcePressDetails({ ForcePressDetails({
required this.globalPosition, required this.globalPosition,
Offset? localPosition, Offset? localPosition,
......
...@@ -107,8 +107,6 @@ typedef GestureLongPressEndCallback = void Function(LongPressEndDetails details) ...@@ -107,8 +107,6 @@ typedef GestureLongPressEndCallback = void Function(LongPressEndDetails details)
class LongPressDownDetails { class LongPressDownDetails {
/// Creates the details for a [GestureLongPressDownCallback]. /// Creates the details for a [GestureLongPressDownCallback].
/// ///
/// The `globalPosition` argument must not be null.
///
/// If the `localPosition` argument is not specified, it will default to the /// If the `localPosition` argument is not specified, it will default to the
/// global position. /// global position.
const LongPressDownDetails({ const LongPressDownDetails({
...@@ -136,8 +134,6 @@ class LongPressDownDetails { ...@@ -136,8 +134,6 @@ class LongPressDownDetails {
/// * [LongPressEndDetails], the details for [GestureLongPressEndCallback]. /// * [LongPressEndDetails], the details for [GestureLongPressEndCallback].
class LongPressStartDetails { class LongPressStartDetails {
/// Creates the details for a [GestureLongPressStartCallback]. /// Creates the details for a [GestureLongPressStartCallback].
///
/// The [globalPosition] argument must not be null.
const LongPressStartDetails({ const LongPressStartDetails({
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
Offset? localPosition, Offset? localPosition,
...@@ -159,8 +155,6 @@ class LongPressStartDetails { ...@@ -159,8 +155,6 @@ class LongPressStartDetails {
/// * [LongPressStartDetails], the details for [GestureLongPressStartCallback]. /// * [LongPressStartDetails], the details for [GestureLongPressStartCallback].
class LongPressMoveUpdateDetails { class LongPressMoveUpdateDetails {
/// Creates the details for a [GestureLongPressMoveUpdateCallback]. /// Creates the details for a [GestureLongPressMoveUpdateCallback].
///
/// The [globalPosition] and [offsetFromOrigin] arguments must not be null.
const LongPressMoveUpdateDetails({ const LongPressMoveUpdateDetails({
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
Offset? localPosition, Offset? localPosition,
...@@ -195,8 +189,6 @@ class LongPressMoveUpdateDetails { ...@@ -195,8 +189,6 @@ class LongPressMoveUpdateDetails {
/// * [LongPressStartDetails], the details for [GestureLongPressStartCallback]. /// * [LongPressStartDetails], the details for [GestureLongPressStartCallback].
class LongPressEndDetails { class LongPressEndDetails {
/// Creates the details for a [GestureLongPressEndCallback]. /// Creates the details for a [GestureLongPressEndCallback].
///
/// The [globalPosition] argument must not be null.
const LongPressEndDetails({ const LongPressEndDetails({
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
Offset? localPosition, Offset? localPosition,
......
...@@ -95,8 +95,6 @@ class PolynomialFit { ...@@ -95,8 +95,6 @@ class PolynomialFit {
/// Uses the least-squares algorithm to fit a polynomial to a set of data. /// Uses the least-squares algorithm to fit a polynomial to a set of data.
class LeastSquaresSolver { class LeastSquaresSolver {
/// Creates a least-squares solver. /// Creates a least-squares solver.
///
/// The [x], [y], and [w] arguments must not be null.
LeastSquaresSolver(this.x, this.y, this.w) LeastSquaresSolver(this.x, this.y, this.w)
: assert(x.length == y.length), : assert(x.length == y.length),
assert(y.length == w.length); assert(y.length == w.length);
......
...@@ -70,8 +70,6 @@ typedef GestureVelocityTrackerBuilder = VelocityTracker Function(PointerEvent ev ...@@ -70,8 +70,6 @@ typedef GestureVelocityTrackerBuilder = VelocityTracker Function(PointerEvent ev
abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
/// Initialize the object. /// Initialize the object.
/// ///
/// [dragStartBehavior] must not be null.
///
/// {@macro flutter.gestures.GestureRecognizer.supportedDevices} /// {@macro flutter.gestures.GestureRecognizer.supportedDevices}
DragGestureRecognizer({ DragGestureRecognizer({
super.debugOwner, super.debugOwner,
......
...@@ -32,8 +32,6 @@ typedef GestureMultiDragStartCallback = Drag? Function(Offset position); ...@@ -32,8 +32,6 @@ typedef GestureMultiDragStartCallback = Drag? Function(Offset position);
/// each pointer is a subclass of [MultiDragPointerState]. /// each pointer is a subclass of [MultiDragPointerState].
abstract class MultiDragPointerState { abstract class MultiDragPointerState {
/// Creates per-pointer state for a [MultiDragGestureRecognizer]. /// Creates per-pointer state for a [MultiDragGestureRecognizer].
///
/// The [initialPosition] argument must not be null.
MultiDragPointerState(this.initialPosition, this.kind, this.gestureSettings) MultiDragPointerState(this.initialPosition, this.kind, this.gestureSettings)
: _velocityTracker = VelocityTracker.withKind(kind); : _velocityTracker = VelocityTracker.withKind(kind);
......
...@@ -96,8 +96,6 @@ class _PointerPanZoomData { ...@@ -96,8 +96,6 @@ class _PointerPanZoomData {
/// Details for [GestureScaleStartCallback]. /// Details for [GestureScaleStartCallback].
class ScaleStartDetails { class ScaleStartDetails {
/// Creates details for [GestureScaleStartCallback]. /// Creates details for [GestureScaleStartCallback].
///
/// The [focalPoint] argument must not be null.
ScaleStartDetails({ ScaleStartDetails({
this.focalPoint = Offset.zero, this.focalPoint = Offset.zero,
Offset? localFocalPoint, Offset? localFocalPoint,
...@@ -139,9 +137,8 @@ class ScaleStartDetails { ...@@ -139,9 +137,8 @@ class ScaleStartDetails {
class ScaleUpdateDetails { class ScaleUpdateDetails {
/// Creates details for [GestureScaleUpdateCallback]. /// Creates details for [GestureScaleUpdateCallback].
/// ///
/// The [focalPoint], [scale], [horizontalScale], [verticalScale], [rotation] /// The [scale], [horizontalScale], and [verticalScale] arguments must be
/// arguments must not be null. The [scale], [horizontalScale], and [verticalScale] /// greater than or equal to zero.
/// argument must be greater than or equal to zero.
ScaleUpdateDetails({ ScaleUpdateDetails({
this.focalPoint = Offset.zero, this.focalPoint = Offset.zero,
Offset? localFocalPoint, Offset? localFocalPoint,
...@@ -243,8 +240,6 @@ class ScaleUpdateDetails { ...@@ -243,8 +240,6 @@ class ScaleUpdateDetails {
/// Details for [GestureScaleEndCallback]. /// Details for [GestureScaleEndCallback].
class ScaleEndDetails { class ScaleEndDetails {
/// Creates details for [GestureScaleEndCallback]. /// Creates details for [GestureScaleEndCallback].
///
/// The [velocity] argument must not be null.
ScaleEndDetails({ this.velocity = Velocity.zero, this.scaleVelocity = 0, this.pointerCount = 0 }); ScaleEndDetails({ this.velocity = Velocity.zero, this.scaleVelocity = 0, this.pointerCount = 0 });
/// The velocity of the last pointer to be lifted off of the screen. /// The velocity of the last pointer to be lifted off of the screen.
......
...@@ -26,8 +26,6 @@ export 'events.dart' show PointerCancelEvent, PointerDownEvent, PointerEvent, Po ...@@ -26,8 +26,6 @@ export 'events.dart' show PointerCancelEvent, PointerDownEvent, PointerEvent, Po
/// * [TapGestureRecognizer], which passes this information to one of its callbacks. /// * [TapGestureRecognizer], which passes this information to one of its callbacks.
class TapDownDetails { class TapDownDetails {
/// Creates details for a [GestureTapDownCallback]. /// Creates details for a [GestureTapDownCallback].
///
/// The [globalPosition] argument must not be null.
TapDownDetails({ TapDownDetails({
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
Offset? localPosition, Offset? localPosition,
...@@ -65,7 +63,7 @@ typedef GestureTapDownCallback = void Function(TapDownDetails details); ...@@ -65,7 +63,7 @@ typedef GestureTapDownCallback = void Function(TapDownDetails details);
/// * [GestureDetector.onTapUp], which receives this information. /// * [GestureDetector.onTapUp], which receives this information.
/// * [TapGestureRecognizer], which passes this information to one of its callbacks. /// * [TapGestureRecognizer], which passes this information to one of its callbacks.
class TapUpDetails { class TapUpDetails {
/// The [globalPosition] argument must not be null. /// Creates a [TapUpDetails] data object.
TapUpDetails({ TapUpDetails({
required this.kind, required this.kind,
this.globalPosition = Offset.zero, this.globalPosition = Offset.zero,
......
...@@ -76,9 +76,6 @@ typedef GestureTapDragDownCallback = void Function(TapDragDownDetails details); ...@@ -76,9 +76,6 @@ typedef GestureTapDragDownCallback = void Function(TapDragDownDetails details);
/// * [TapDragEndDetails], the details for [GestureTapDragEndCallback]. /// * [TapDragEndDetails], the details for [GestureTapDragEndCallback].
class TapDragDownDetails with Diagnosticable { class TapDragDownDetails with Diagnosticable {
/// Creates details for a [GestureTapDragDownCallback]. /// Creates details for a [GestureTapDragDownCallback].
///
/// The [globalPosition], [localPosition], and [consecutiveTapCount]
/// arguments must be provided and must not be null.
TapDragDownDetails({ TapDragDownDetails({
required this.globalPosition, required this.globalPosition,
required this.localPosition, required this.localPosition,
...@@ -130,9 +127,6 @@ typedef GestureTapDragUpCallback = void Function(TapDragUpDetails details); ...@@ -130,9 +127,6 @@ typedef GestureTapDragUpCallback = void Function(TapDragUpDetails details);
/// * [TapDragEndDetails], the details for [GestureTapDragEndCallback]. /// * [TapDragEndDetails], the details for [GestureTapDragEndCallback].
class TapDragUpDetails with Diagnosticable { class TapDragUpDetails with Diagnosticable {
/// Creates details for a [GestureTapDragUpCallback]. /// Creates details for a [GestureTapDragUpCallback].
///
/// The [kind], [globalPosition], [localPosition], and [consecutiveTapCount]
/// arguments must be provided and must not be null.
TapDragUpDetails({ TapDragUpDetails({
required this.kind, required this.kind,
required this.globalPosition, required this.globalPosition,
...@@ -184,9 +178,6 @@ typedef GestureTapDragStartCallback = void Function(TapDragStartDetails details) ...@@ -184,9 +178,6 @@ typedef GestureTapDragStartCallback = void Function(TapDragStartDetails details)
/// * [TapDragEndDetails], the details for [GestureTapDragEndCallback]. /// * [TapDragEndDetails], the details for [GestureTapDragEndCallback].
class TapDragStartDetails with Diagnosticable { class TapDragStartDetails with Diagnosticable {
/// Creates details for a [GestureTapDragStartCallback]. /// Creates details for a [GestureTapDragStartCallback].
///
/// The [globalPosition], [localPosition], and [consecutiveTapCount]
/// arguments must be provided and must not be null.
TapDragStartDetails({ TapDragStartDetails({
this.sourceTimeStamp, this.sourceTimeStamp,
required this.globalPosition, required this.globalPosition,
...@@ -253,13 +244,8 @@ typedef GestureTapDragUpdateCallback = void Function(TapDragUpdateDetails detail ...@@ -253,13 +244,8 @@ typedef GestureTapDragUpdateCallback = void Function(TapDragUpdateDetails detail
class TapDragUpdateDetails with Diagnosticable { class TapDragUpdateDetails with Diagnosticable {
/// Creates details for a [GestureTapDragUpdateCallback]. /// Creates details for a [GestureTapDragUpdateCallback].
/// ///
/// The [delta] argument must not be null.
///
/// If [primaryDelta] is non-null, then its value must match one of the /// If [primaryDelta] is non-null, then its value must match one of the
/// coordinates of [delta] and the other coordinate must be zero. /// coordinates of [delta] and the other coordinate must be zero.
///
/// The [globalPosition], [localPosition], [offsetFromOrigin], [localOffsetFromOrigin],
/// and [consecutiveTapCount] arguments must be provided and must not be null.
TapDragUpdateDetails({ TapDragUpdateDetails({
this.sourceTimeStamp, this.sourceTimeStamp,
this.delta = Offset.zero, this.delta = Offset.zero,
...@@ -378,10 +364,6 @@ typedef GestureTapDragEndCallback = void Function(TapDragEndDetails endDetails); ...@@ -378,10 +364,6 @@ typedef GestureTapDragEndCallback = void Function(TapDragEndDetails endDetails);
/// * [TapDragUpdateDetails], the details for [GestureTapDragUpdateCallback]. /// * [TapDragUpdateDetails], the details for [GestureTapDragUpdateCallback].
class TapDragEndDetails with Diagnosticable { class TapDragEndDetails with Diagnosticable {
/// Creates details for a [GestureTapDragEndCallback]. /// Creates details for a [GestureTapDragEndCallback].
///
/// The [velocity] argument must not be null.
///
/// The [consecutiveTapCount] argument must be provided and must not be null.
TapDragEndDetails({ TapDragEndDetails({
this.velocity = Velocity.zero, this.velocity = Velocity.zero,
this.primaryVelocity, this.primaryVelocity,
......
...@@ -13,9 +13,7 @@ export 'dart:ui' show Offset, PointerDeviceKind; ...@@ -13,9 +13,7 @@ export 'dart:ui' show Offset, PointerDeviceKind;
/// A velocity in two dimensions. /// A velocity in two dimensions.
@immutable @immutable
class Velocity { class Velocity {
/// Creates a velocity. /// Creates a [Velocity].
///
/// The [pixelsPerSecond] argument must not be null.
const Velocity({ const Velocity({
required this.pixelsPerSecond, required this.pixelsPerSecond,
}); });
...@@ -90,8 +88,6 @@ class Velocity { ...@@ -90,8 +88,6 @@ class Velocity {
/// useful velocity operations. /// useful velocity operations.
class VelocityEstimate { class VelocityEstimate {
/// Creates a dimensional velocity estimate. /// Creates a dimensional velocity estimate.
///
/// [pixelsPerSecond], [confidence], [duration], and [offset] must not be null.
const VelocityEstimate({ const VelocityEstimate({
required this.pixelsPerSecond, required this.pixelsPerSecond,
required this.confidence, required this.confidence,
......
...@@ -204,6 +204,9 @@ class TableBorder { ...@@ -204,6 +204,9 @@ class TableBorder {
required Iterable<double> rows, required Iterable<double> rows,
required Iterable<double> columns, required Iterable<double> columns,
}) { }) {
// properties can't be null
// arguments can't be null
assert(rows.isEmpty || (rows.first >= 0.0 && rows.last <= rect.height)); assert(rows.isEmpty || (rows.first >= 0.0 && rows.last <= rect.height));
assert(columns.isEmpty || (columns.first >= 0.0 && columns.last <= rect.width)); assert(columns.isEmpty || (columns.first >= 0.0 && columns.last <= rect.width));
......
...@@ -211,7 +211,7 @@ class ChildSemanticsConfigurationsResultBuilder { ...@@ -211,7 +211,7 @@ class ChildSemanticsConfigurationsResultBuilder {
class CustomSemanticsAction { class CustomSemanticsAction {
/// Creates a new [CustomSemanticsAction]. /// Creates a new [CustomSemanticsAction].
/// ///
/// The [label] must not be null or the empty string. /// The [label] must not be empty.
const CustomSemanticsAction({required String this.label}) const CustomSemanticsAction({required String this.label})
: assert(label != ''), : assert(label != ''),
hint = null, hint = null,
...@@ -220,7 +220,7 @@ class CustomSemanticsAction { ...@@ -220,7 +220,7 @@ class CustomSemanticsAction {
/// Creates a new [CustomSemanticsAction] that overrides a standard semantics /// Creates a new [CustomSemanticsAction] that overrides a standard semantics
/// action. /// action.
/// ///
/// The [hint] must not be null or the empty string. /// The [hint] must not be empty.
const CustomSemanticsAction.overridingAction({required String this.hint, required SemanticsAction this.action}) const CustomSemanticsAction.overridingAction({required String this.hint, required SemanticsAction this.action})
: assert(hint != ''), : assert(hint != ''),
label = null; label = null;
...@@ -411,8 +411,6 @@ class AttributedStringProperty extends DiagnosticsProperty<AttributedString> { ...@@ -411,8 +411,6 @@ class AttributedStringProperty extends DiagnosticsProperty<AttributedString> {
class SemanticsData with Diagnosticable { class SemanticsData with Diagnosticable {
/// Creates a semantics data object. /// Creates a semantics data object.
/// ///
/// The [flags], [actions], [label], and [Rect] arguments must not be null.
///
/// If [label] is not empty, then [textDirection] must also not be null. /// If [label] is not empty, then [textDirection] must also not be null.
SemanticsData({ SemanticsData({
required this.flags, required this.flags,
...@@ -4994,7 +4992,7 @@ abstract class SemanticsSortKey with Diagnosticable implements Comparable<Semant ...@@ -4994,7 +4992,7 @@ abstract class SemanticsSortKey with Diagnosticable implements Comparable<Semant
class OrdinalSortKey extends SemanticsSortKey { class OrdinalSortKey extends SemanticsSortKey {
/// Creates a const semantics sort key that uses a [double] as its key value. /// Creates a const semantics sort key that uses a [double] as its key value.
/// ///
/// The [order] must be a finite number, and must not be null. /// The [order] must be a finite number.
const OrdinalSortKey( const OrdinalSortKey(
this.order, { this.order, {
super.name, super.name,
......
...@@ -90,13 +90,9 @@ class AnnounceSemanticsEvent extends SemanticsEvent { ...@@ -90,13 +90,9 @@ class AnnounceSemanticsEvent extends SemanticsEvent {
: super('announce'); : super('announce');
/// The message to announce. /// The message to announce.
///
/// This property must not be null.
final String message; final String message;
/// Text direction for [message]. /// Text direction for [message].
///
/// This property must not be null.
final TextDirection textDirection; final TextDirection textDirection;
/// Determines whether the announcement should interrupt any existing announcement, /// Determines whether the announcement should interrupt any existing announcement,
......
...@@ -670,15 +670,11 @@ class AutofillConfiguration { ...@@ -670,15 +670,11 @@ class AutofillConfiguration {
/// ///
/// The identifier needs to be unique within the [AutofillScope] for the /// The identifier needs to be unique within the [AutofillScope] for the
/// [AutofillClient] to receive the correct autofill value. /// [AutofillClient] to receive the correct autofill value.
///
/// Must not be null.
final String uniqueIdentifier; final String uniqueIdentifier;
/// A list of strings that helps the autofill service identify the type of the /// A list of strings that helps the autofill service identify the type of the
/// [AutofillClient]. /// [AutofillClient].
/// ///
/// Must not be null.
///
/// {@template flutter.services.AutofillConfiguration.autofillHints} /// {@template flutter.services.AutofillConfiguration.autofillHints}
/// For the best results, hint strings need to be understood by the platform's /// For the best results, hint strings need to be understood by the platform's
/// autofill service. The common values of hint strings can be found in /// autofill service. The common values of hint strings can be found in
...@@ -753,7 +749,7 @@ class AutofillConfiguration { ...@@ -753,7 +749,7 @@ class AutofillConfiguration {
abstract class AutofillClient { abstract class AutofillClient {
/// The unique identifier of this [AutofillClient]. /// The unique identifier of this [AutofillClient].
/// ///
/// Must not be null and the identifier must not be changed. /// The identifier must not be changed.
String get autofillId; String get autofillId;
/// The [TextInputConfiguration] that describes this [AutofillClient]. /// The [TextInputConfiguration] that describes this [AutofillClient].
......
...@@ -102,8 +102,6 @@ class MouseCursorManager { ...@@ -102,8 +102,6 @@ class MouseCursorManager {
/// will no longer be used in the future. /// will no longer be used in the future.
abstract class MouseCursorSession { abstract class MouseCursorSession {
/// Create a session. /// Create a session.
///
/// All arguments must be non-null.
MouseCursorSession(this.cursor, this.device); MouseCursorSession(this.cursor, this.device);
/// The cursor that created this session. /// The cursor that created this session.
...@@ -207,7 +205,7 @@ abstract class MouseCursor with Diagnosticable { ...@@ -207,7 +205,7 @@ abstract class MouseCursor with Diagnosticable {
/// to make debug information more readable. It is returned as the [toString] /// to make debug information more readable. It is returned as the [toString]
/// when the diagnostic level is at or above [DiagnosticLevel.info]. /// when the diagnostic level is at or above [DiagnosticLevel.info].
/// ///
/// The [debugDescription] must not be null or empty string. /// The [debugDescription] must not be empty.
String get debugDescription; String get debugDescription;
@override @override
......
...@@ -44,8 +44,6 @@ typedef PointerHoverEventListener = void Function(PointerHoverEvent event); ...@@ -44,8 +44,6 @@ typedef PointerHoverEventListener = void Function(PointerHoverEvent event);
/// * [MouseTracker], which uses [MouseTrackerAnnotation]. /// * [MouseTracker], which uses [MouseTrackerAnnotation].
class MouseTrackerAnnotation with Diagnosticable { class MouseTrackerAnnotation with Diagnosticable {
/// Creates an immutable [MouseTrackerAnnotation]. /// Creates an immutable [MouseTrackerAnnotation].
///
/// All arguments are optional. The [cursor] must not be null.
const MouseTrackerAnnotation({ const MouseTrackerAnnotation({
this.onEnter, this.onEnter,
this.onExit, this.onExit,
......
...@@ -162,10 +162,11 @@ BinaryMessenger _findBinaryMessenger() { ...@@ -162,10 +162,11 @@ BinaryMessenger _findBinaryMessenger() {
/// ///
/// See: <https://flutter.dev/platform-channels/> /// See: <https://flutter.dev/platform-channels/>
class BasicMessageChannel<T> { class BasicMessageChannel<T> {
/// Creates a [BasicMessageChannel] with the specified [name], [codec] and [binaryMessenger]. /// Creates a [BasicMessageChannel] with the specified [name], [codec] and
/// [binaryMessenger].
/// ///
/// The [name] and [codec] arguments cannot be null. The default [ServicesBinding.defaultBinaryMessenger] /// The default [ServicesBinding.defaultBinaryMessenger] instance is used if
/// instance is used if [binaryMessenger] is null. /// [binaryMessenger] is null.
const BasicMessageChannel(this.name, this.codec, { BinaryMessenger? binaryMessenger }) const BasicMessageChannel(this.name, this.codec, { BinaryMessenger? binaryMessenger })
: _binaryMessenger = binaryMessenger; : _binaryMessenger = binaryMessenger;
...@@ -253,8 +254,8 @@ class MethodChannel { ...@@ -253,8 +254,8 @@ class MethodChannel {
/// The [codec] used will be [StandardMethodCodec], unless otherwise /// The [codec] used will be [StandardMethodCodec], unless otherwise
/// specified. /// specified.
/// ///
/// The [name] and [codec] arguments cannot be null. The default [ServicesBinding.defaultBinaryMessenger] /// The default [ServicesBinding.defaultBinaryMessenger] instance is used if
/// instance is used if [binaryMessenger] is null. /// [binaryMessenger] is null.
const MethodChannel(this.name, [this.codec = const StandardMethodCodec(), BinaryMessenger? binaryMessenger ]) const MethodChannel(this.name, [this.codec = const StandardMethodCodec(), BinaryMessenger? binaryMessenger ])
: _binaryMessenger = binaryMessenger; : _binaryMessenger = binaryMessenger;
......
...@@ -58,7 +58,7 @@ class PlatformViewsRegistry { ...@@ -58,7 +58,7 @@ class PlatformViewsRegistry {
/// Callback signature for when a platform view was created. /// Callback signature for when a platform view was created.
/// ///
/// `id` is the platform view's unique identifier. /// The `id` parameter is the platform view's unique identifier.
typedef PlatformViewCreatedCallback = void Function(int id); typedef PlatformViewCreatedCallback = void Function(int id);
/// Provides access to the platform views service. /// Provides access to the platform views service.
...@@ -92,28 +92,33 @@ class PlatformViewsService { ...@@ -92,28 +92,33 @@ class PlatformViewsService {
/// {@template flutter.services.PlatformViewsService.initAndroidView} /// {@template flutter.services.PlatformViewsService.initAndroidView}
/// Creates a controller for a new Android view. /// Creates a controller for a new Android view.
/// ///
/// `id` is an unused unique identifier generated with [platformViewsRegistry]. /// The `id` argument is an unused unique identifier generated with
/// [platformViewsRegistry].
/// ///
/// `viewType` is the identifier of the Android view type to be created, a /// The `viewType` argument is the identifier of the Android view type to be
/// factory for this view type must have been registered on the platform side. /// created, a factory for this view type must have been registered on the
/// Platform view factories are typically registered by plugin code. /// platform side. Platform view factories are typically registered by plugin
/// Plugins can register a platform view factory with /// code. Plugins can register a platform view factory with
/// [PlatformViewRegistry#registerViewFactory](/javadoc/io/flutter/plugin/platform/PlatformViewRegistry.html#registerViewFactory-java.lang.String-io.flutter.plugin.platform.PlatformViewFactory-). /// [PlatformViewRegistry#registerViewFactory](/javadoc/io/flutter/plugin/platform/PlatformViewRegistry.html#registerViewFactory-java.lang.String-io.flutter.plugin.platform.PlatformViewFactory-).
/// ///
/// `creationParams` will be passed as the args argument of [PlatformViewFactory#create](/javadoc/io/flutter/plugin/platform/PlatformViewFactory.html#create-android.content.Context-int-java.lang.Object-) /// The `creationParams` argument will be passed as the args argument of
/// [PlatformViewFactory#create](/javadoc/io/flutter/plugin/platform/PlatformViewFactory.html#create-android.content.Context-int-java.lang.Object-)
/// ///
/// `creationParamsCodec` is the codec used to encode `creationParams` before sending it to the /// The `creationParamsCodec` argument is the codec used to encode
/// platform side. It should match the codec passed to the constructor of [PlatformViewFactory](/javadoc/io/flutter/plugin/platform/PlatformViewFactory.html#PlatformViewFactory-io.flutter.plugin.common.MessageCodec-). /// `creationParams` before sending it to the platform side. It should match
/// This is typically one of: [StandardMessageCodec], [JSONMessageCodec], [StringCodec], or [BinaryCodec]. /// the codec passed to the constructor of
/// [PlatformViewFactory](/javadoc/io/flutter/plugin/platform/PlatformViewFactory.html#PlatformViewFactory-io.flutter.plugin.common.MessageCodec-).
/// This is typically one of: [StandardMessageCodec], [JSONMessageCodec],
/// [StringCodec], or [BinaryCodec].
/// ///
/// `onFocus` is a callback that will be invoked when the Android View asks to get the /// The `onFocus` argument is a callback that will be invoked when the Android
/// input focus. /// View asks to get the input focus.
/// ///
/// The Android view will only be created after [AndroidViewController.setSize] is called for the /// The Android view will only be created after
/// first time. /// [AndroidViewController.setSize] is called for the first time.
/// ///
/// The `id, `viewType, and `layoutDirection` parameters must not be null. /// If `creationParams` is non null then `creationParamsCodec` must not be
/// If `creationParams` is non null then `creationParamsCodec` must not be null. /// null.
/// {@endtemplate} /// {@endtemplate}
/// ///
/// This attempts to use the newest and most efficient platform view /// This attempts to use the newest and most efficient platform view
...@@ -196,19 +201,23 @@ class PlatformViewsService { ...@@ -196,19 +201,23 @@ class PlatformViewsService {
return controller; return controller;
} }
// TODO(amirh): reference the iOS plugin API for registering a UIView factory once it lands. // TODO(amirh): reference the iOS plugin API for registering a UIView factory
/// This is work in progress, not yet ready to be used, and requires a custom engine build. Creates a controller for a new iOS UIView. // once it lands.
/// This is work in progress, not yet ready to be used, and requires a custom
/// engine build. Creates a controller for a new iOS UIView.
/// ///
/// `id` is an unused unique identifier generated with [platformViewsRegistry]. /// The `id` parameter is an unused unique identifier generated with
/// [platformViewsRegistry].
/// ///
/// `viewType` is the identifier of the iOS view type to be created, a /// The `viewType` parameter is the identifier of the iOS view type to be
/// factory for this view type must have been registered on the platform side. /// created, a factory for this view type must have been registered on the
/// Platform view factories are typically registered by plugin code. /// platform side. Platform view factories are typically registered by plugin
/// code.
/// ///
/// `onFocus` is a callback that will be invoked when the UIKit view asks to /// The `onFocus` parameter is a callback that will be invoked when the UIKit
/// get the input focus. /// view asks to get the input focus. If `creationParams` is non null then
/// The `id, `viewType, and `layoutDirection` parameters must not be null. /// `creationParamsCodec` must not be null.
/// If `creationParams` is non null then `creationParamsCodec` must not be null.
static Future<UiKitViewController> initUiKitView({ static Future<UiKitViewController> initUiKitView({
required int id, required int id,
required String viewType, required String viewType,
...@@ -242,16 +251,17 @@ class PlatformViewsService { ...@@ -242,16 +251,17 @@ class PlatformViewsService {
/// Factory method to create an `AppKitView`. /// Factory method to create an `AppKitView`.
/// ///
/// `id` is an unused unique identifier generated with [platformViewsRegistry]. /// The `id` parameter is an unused unique identifier generated with
/// [platformViewsRegistry].
/// ///
/// `viewType` is the identifier of the iOS view type to be created, a /// The `viewType` parameter is the identifier of the iOS view type to be
/// factory for this view type must have been registered on the platform side. /// created, a factory for this view type must have been registered on the
/// Platform view factories are typically registered by plugin code. /// platform side. Platform view factories are typically registered by plugin
/// code.
/// ///
/// `onFocus` is a callback that will be invoked when the UIKit view asks to /// The `onFocus` parameter is a callback that will be invoked when the UIKit
/// get the input focus. /// view asks to get the input focus. If `creationParams` is non null then
/// The `id, `viewType, and `layoutDirection` parameters must not be null. /// `creationParamsCodec` must not be null.
/// If `creationParams` is non null then `creationParamsCodec` must not be null.
static Future<AppKitViewController> initAppKitView({ static Future<AppKitViewController> initAppKitView({
required int id, required int id,
required String viewType, required String viewType,
...@@ -289,8 +299,6 @@ class PlatformViewsService { ...@@ -289,8 +299,6 @@ class PlatformViewsService {
/// A Dart version of Android's [MotionEvent.PointerProperties](https://developer.android.com/reference/android/view/MotionEvent.PointerProperties). /// A Dart version of Android's [MotionEvent.PointerProperties](https://developer.android.com/reference/android/view/MotionEvent.PointerProperties).
class AndroidPointerProperties { class AndroidPointerProperties {
/// Creates an [AndroidPointerProperties] object. /// Creates an [AndroidPointerProperties] object.
///
/// All parameters must not be null.
const AndroidPointerProperties({ const AndroidPointerProperties({
required this.id, required this.id,
required this.toolType, required this.toolType,
...@@ -331,8 +339,6 @@ class AndroidPointerProperties { ...@@ -331,8 +339,6 @@ class AndroidPointerProperties {
/// A Dart version of Android's [MotionEvent.PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords). /// A Dart version of Android's [MotionEvent.PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords).
class AndroidPointerCoords { class AndroidPointerCoords {
/// Creates an AndroidPointerCoords. /// Creates an AndroidPointerCoords.
///
/// All parameters must not be null.
const AndroidPointerCoords({ const AndroidPointerCoords({
required this.orientation, required this.orientation,
required this.pressure, required this.pressure,
...@@ -413,8 +419,6 @@ class AndroidPointerCoords { ...@@ -413,8 +419,6 @@ class AndroidPointerCoords {
/// * [AndroidViewController.sendMotionEvent], which can be used to send an [AndroidMotionEvent] explicitly. /// * [AndroidViewController.sendMotionEvent], which can be used to send an [AndroidMotionEvent] explicitly.
class AndroidMotionEvent { class AndroidMotionEvent {
/// Creates an AndroidMotionEvent. /// Creates an AndroidMotionEvent.
///
/// All parameters must not be null.
AndroidMotionEvent({ AndroidMotionEvent({
required this.downTime, required this.downTime,
required this.eventTime, required this.eventTime,
...@@ -807,8 +811,8 @@ abstract class AndroidViewController extends PlatformViewController { ...@@ -807,8 +811,8 @@ abstract class AndroidViewController extends PlatformViewController {
/// Sizes the Android View. /// Sizes the Android View.
/// ///
/// [size] is the view's new size in logical pixel, it must not be null and must /// [size] is the view's new size in logical pixel. It must be greater than
/// be bigger than zero. /// zero.
/// ///
/// The first time a size is set triggers the creation of the Android view. /// The first time a size is set triggers the creation of the Android view.
/// ///
......
...@@ -27,9 +27,6 @@ const int _kCombiningCharacterMask = 0x7fffffff; ...@@ -27,9 +27,6 @@ const int _kCombiningCharacterMask = 0x7fffffff;
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataAndroid extends RawKeyEventData { class RawKeyEventDataAndroid extends RawKeyEventData {
/// Creates a key event data structure specific for Android. /// Creates a key event data structure specific for Android.
///
/// The [flags], [codePoint], [keyCode], [scanCode], and [metaState] arguments
/// must not be null.
const RawKeyEventDataAndroid({ const RawKeyEventDataAndroid({
this.flags = 0, this.flags = 0,
this.codePoint = 0, this.codePoint = 0,
......
...@@ -22,8 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey; ...@@ -22,8 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataFuchsia extends RawKeyEventData { class RawKeyEventDataFuchsia extends RawKeyEventData {
/// Creates a key event data structure specific for Fuchsia. /// Creates a key event data structure specific for Fuchsia.
///
/// The [hidUsage], [codePoint], and [modifiers] arguments must not be null.
const RawKeyEventDataFuchsia({ const RawKeyEventDataFuchsia({
this.hidUsage = 0, this.hidUsage = 0,
this.codePoint = 0, this.codePoint = 0,
......
...@@ -22,9 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey; ...@@ -22,9 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataIos extends RawKeyEventData { class RawKeyEventDataIos extends RawKeyEventData {
/// Creates a key event data structure specific for iOS. /// Creates a key event data structure specific for iOS.
///
/// The [characters], [charactersIgnoringModifiers], and [modifiers], arguments
/// must not be null.
const RawKeyEventDataIos({ const RawKeyEventDataIos({
this.characters = '', this.characters = '',
this.charactersIgnoringModifiers = '', this.charactersIgnoringModifiers = '',
......
...@@ -22,9 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey; ...@@ -22,9 +22,6 @@ export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataLinux extends RawKeyEventData { class RawKeyEventDataLinux extends RawKeyEventData {
/// Creates a key event data structure specific for Linux. /// Creates a key event data structure specific for Linux.
///
/// The [keyHelper], [scanCode], [unicodeScalarValues], [keyCode], and [modifiers],
/// arguments must not be null.
const RawKeyEventDataLinux({ const RawKeyEventDataLinux({
required this.keyHelper, required this.keyHelper,
this.unicodeScalarValues = 0, this.unicodeScalarValues = 0,
......
...@@ -33,9 +33,6 @@ int runeToLowerCase(int rune) { ...@@ -33,9 +33,6 @@ int runeToLowerCase(int rune) {
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataMacOs extends RawKeyEventData { class RawKeyEventDataMacOs extends RawKeyEventData {
/// Creates a key event data structure specific for macOS. /// Creates a key event data structure specific for macOS.
///
/// The [characters], [charactersIgnoringModifiers], and [modifiers], arguments
/// must not be null.
const RawKeyEventDataMacOs({ const RawKeyEventDataMacOs({
this.characters = '', this.characters = '',
this.charactersIgnoringModifiers = '', this.charactersIgnoringModifiers = '',
......
...@@ -27,8 +27,6 @@ String? _unicodeChar(String key) { ...@@ -27,8 +27,6 @@ String? _unicodeChar(String key) {
@immutable @immutable
class RawKeyEventDataWeb extends RawKeyEventData { class RawKeyEventDataWeb extends RawKeyEventData {
/// Creates a key event data structure specific for Web. /// Creates a key event data structure specific for Web.
///
/// The [code] and [metaState] arguments must not be null.
const RawKeyEventDataWeb({ const RawKeyEventDataWeb({
required this.code, required this.code,
required this.key, required this.key,
......
...@@ -27,9 +27,6 @@ const int _vkProcessKey = 0xe5; ...@@ -27,9 +27,6 @@ const int _vkProcessKey = 0xe5;
/// * [RawKeyboard], which uses this interface to expose key data. /// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataWindows extends RawKeyEventData { class RawKeyEventDataWindows extends RawKeyEventData {
/// Creates a key event data structure specific for Windows. /// Creates a key event data structure specific for Windows.
///
/// The [keyCode], [scanCode], [characterCodePoint], and [modifiers], arguments
/// must not be null.
const RawKeyEventDataWindows({ const RawKeyEventDataWindows({
this.keyCode = 0, this.keyCode = 0,
this.scanCode = 0, this.scanCode = 0,
......
...@@ -495,8 +495,6 @@ class RestorationBucket { ...@@ -495,8 +495,6 @@ class RestorationBucket {
/// claiming a child from a parent via [claimChild]. If no parent bucket is /// claiming a child from a parent via [claimChild]. If no parent bucket is
/// available, [RestorationManager.rootBucket] may be used as a parent. /// available, [RestorationManager.rootBucket] may be used as a parent.
/// {@endtemplate} /// {@endtemplate}
///
/// The `restorationId` must not be null.
RestorationBucket.empty({ RestorationBucket.empty({
required String restorationId, required String restorationId,
required Object? debugOwner, required Object? debugOwner,
...@@ -529,8 +527,6 @@ class RestorationBucket { ...@@ -529,8 +527,6 @@ class RestorationBucket {
/// ``` /// ```
/// ///
/// {@macro flutter.services.RestorationBucket.empty.bucketCreation} /// {@macro flutter.services.RestorationBucket.empty.bucketCreation}
///
/// The `manager` argument must not be null.
RestorationBucket.root({ RestorationBucket.root({
required RestorationManager manager, required RestorationManager manager,
required Map<Object?, Object?>? rawData, required Map<Object?, Object?>? rawData,
...@@ -551,8 +547,6 @@ class RestorationBucket { ...@@ -551,8 +547,6 @@ class RestorationBucket {
/// [RestorationBucket.empty] and have the parent adopt it via [adoptChild]. /// [RestorationBucket.empty] and have the parent adopt it via [adoptChild].
/// ///
/// {@macro flutter.services.RestorationBucket.empty.bucketCreation} /// {@macro flutter.services.RestorationBucket.empty.bucketCreation}
///
/// The `restorationId` and `parent` argument must not be null.
RestorationBucket.child({ RestorationBucket.child({
required String restorationId, required String restorationId,
required RestorationBucket parent, required RestorationBucket parent,
......
...@@ -12,8 +12,6 @@ export 'dart:ui' show TextAffinity, TextPosition; ...@@ -12,8 +12,6 @@ export 'dart:ui' show TextAffinity, TextPosition;
@immutable @immutable
class TextSelection extends TextRange { class TextSelection extends TextRange {
/// Creates a text selection. /// Creates a text selection.
///
/// The [baseOffset] and [extentOffset] arguments must not be null.
const TextSelection({ const TextSelection({
required this.baseOffset, required this.baseOffset,
required this.extentOffset, required this.extentOffset,
...@@ -29,8 +27,6 @@ class TextSelection extends TextRange { ...@@ -29,8 +27,6 @@ class TextSelection extends TextRange {
/// A collapsed selection starts and ends at the same offset, which means it /// A collapsed selection starts and ends at the same offset, which means it
/// contains zero characters but instead serves as an insertion point in the /// contains zero characters but instead serves as an insertion point in the
/// text. /// text.
///
/// The [offset] argument must not be null.
const TextSelection.collapsed({ const TextSelection.collapsed({
required int offset, required int offset,
this.affinity = TextAffinity.downstream, this.affinity = TextAffinity.downstream,
......
...@@ -56,10 +56,6 @@ bool _debugTextRangeIsValid(TextRange range, String text) { ...@@ -56,10 +56,6 @@ bool _debugTextRangeIsValid(TextRange range, String text) {
/// to true. /// to true.
abstract class TextEditingDelta with Diagnosticable { abstract class TextEditingDelta with Diagnosticable {
/// Creates a delta for a given change to the editing state. /// Creates a delta for a given change to the editing state.
///
/// {@template flutter.services.TextEditingDelta}
/// The [oldText], [selection], and [composing] arguments must not be null.
/// {@endtemplate}
const TextEditingDelta({ const TextEditingDelta({
required this.oldText, required this.oldText,
required this.selection, required this.selection,
...@@ -251,8 +247,6 @@ abstract class TextEditingDelta with Diagnosticable { ...@@ -251,8 +247,6 @@ abstract class TextEditingDelta with Diagnosticable {
class TextEditingDeltaInsertion extends TextEditingDelta { class TextEditingDeltaInsertion extends TextEditingDelta {
/// Creates an insertion delta for a given change to the editing state. /// Creates an insertion delta for a given change to the editing state.
/// ///
/// {@macro flutter.services.TextEditingDelta}
///
/// {@template flutter.services.TextEditingDelta.optIn} /// {@template flutter.services.TextEditingDelta.optIn}
/// See also: /// See also:
/// ///
...@@ -304,8 +298,6 @@ class TextEditingDeltaInsertion extends TextEditingDelta { ...@@ -304,8 +298,6 @@ class TextEditingDeltaInsertion extends TextEditingDelta {
class TextEditingDeltaDeletion extends TextEditingDelta { class TextEditingDeltaDeletion extends TextEditingDelta {
/// Creates a deletion delta for a given change to the editing state. /// Creates a deletion delta for a given change to the editing state.
/// ///
/// {@macro flutter.services.TextEditingDelta}
///
/// {@macro flutter.services.TextEditingDelta.optIn} /// {@macro flutter.services.TextEditingDelta.optIn}
const TextEditingDeltaDeletion({ const TextEditingDeltaDeletion({
required super.oldText, required super.oldText,
...@@ -356,8 +348,6 @@ class TextEditingDeltaReplacement extends TextEditingDelta { ...@@ -356,8 +348,6 @@ class TextEditingDeltaReplacement extends TextEditingDelta {
/// A replacement can occur in cases such as auto-correct, suggestions, and /// A replacement can occur in cases such as auto-correct, suggestions, and
/// when a selection is replaced by a single character. /// when a selection is replaced by a single character.
/// ///
/// {@macro flutter.services.TextEditingDelta}
///
/// {@macro flutter.services.TextEditingDelta.optIn} /// {@macro flutter.services.TextEditingDelta.optIn}
const TextEditingDeltaReplacement({ const TextEditingDeltaReplacement({
required super.oldText, required super.oldText,
...@@ -413,8 +403,6 @@ class TextEditingDeltaNonTextUpdate extends TextEditingDelta { ...@@ -413,8 +403,6 @@ class TextEditingDeltaNonTextUpdate extends TextEditingDelta {
/// handles. There are no changes to the text, but there are updates to the selection /// handles. There are no changes to the text, but there are updates to the selection
/// and potentially the composing region as well. /// and potentially the composing region as well.
/// ///
/// {@macro flutter.services.TextEditingDelta}
///
/// {@macro flutter.services.TextEditingDelta.optIn} /// {@macro flutter.services.TextEditingDelta.optIn}
const TextEditingDeltaNonTextUpdate({ const TextEditingDeltaNonTextUpdate({
required super.oldText, required super.oldText,
......
...@@ -271,9 +271,6 @@ class FilteringTextInputFormatter extends TextInputFormatter { ...@@ -271,9 +271,6 @@ class FilteringTextInputFormatter extends TextInputFormatter {
/// If [allow] is false, then the filter pattern is a deny list, /// If [allow] is false, then the filter pattern is a deny list,
/// and characters that match the pattern are rejected. See also /// and characters that match the pattern are rejected. See also
/// the [FilteringTextInputFormatter.deny] constructor. /// the [FilteringTextInputFormatter.deny] constructor.
///
/// The [filterPattern], [allow], and [replacementString] arguments
/// must not be null.
FilteringTextInputFormatter( FilteringTextInputFormatter(
this.filterPattern, { this.filterPattern, {
required this.allow, required this.allow,
...@@ -281,18 +278,12 @@ class FilteringTextInputFormatter extends TextInputFormatter { ...@@ -281,18 +278,12 @@ class FilteringTextInputFormatter extends TextInputFormatter {
}); });
/// Creates a formatter that only allows characters matching a pattern. /// Creates a formatter that only allows characters matching a pattern.
///
/// The [filterPattern] and [replacementString] arguments
/// must not be null.
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
Pattern filterPattern, { Pattern filterPattern, {
String replacementString = '', String replacementString = '',
}) : this(filterPattern, allow: true, replacementString: replacementString); }) : this(filterPattern, allow: true, replacementString: replacementString);
/// Creates a formatter that blocks characters matching a pattern. /// Creates a formatter that blocks characters matching a pattern.
///
/// The [filterPattern] and [replacementString] arguments
/// must not be null.
FilteringTextInputFormatter.deny( FilteringTextInputFormatter.deny(
Pattern filterPattern, { Pattern filterPattern, {
String replacementString = '', String replacementString = '',
......
...@@ -566,7 +566,7 @@ class TextInputConfiguration { ...@@ -566,7 +566,7 @@ class TextInputConfiguration {
/// [autocorrect], so that suggestions are only shown when [autocorrect] is /// [autocorrect], so that suggestions are only shown when [autocorrect] is
/// true. On Android autocorrection and suggestion are controlled separately. /// true. On Android autocorrection and suggestion are controlled separately.
/// ///
/// Defaults to true. Cannot be null. /// Defaults to true.
/// ///
/// See also: /// See also:
/// ///
...@@ -580,7 +580,7 @@ class TextInputConfiguration { ...@@ -580,7 +580,7 @@ class TextInputConfiguration {
/// change is sent through semantics actions and is directly disabled from /// change is sent through semantics actions and is directly disabled from
/// the widget side. /// the widget side.
/// ///
/// Defaults to true. Cannot be null. /// Defaults to true.
final bool enableInteractiveSelection; final bool enableInteractiveSelection;
/// What text to display in the text input control's action button. /// What text to display in the text input control's action button.
...@@ -612,7 +612,7 @@ class TextInputConfiguration { ...@@ -612,7 +612,7 @@ class TextInputConfiguration {
/// ///
/// This flag only affects Android. On iOS, there is no equivalent flag. /// This flag only affects Android. On iOS, there is no equivalent flag.
/// ///
/// Defaults to true. Cannot be null. /// Defaults to true.
/// ///
/// See also: /// See also:
/// ///
...@@ -684,7 +684,7 @@ class TextInputConfiguration { ...@@ -684,7 +684,7 @@ class TextInputConfiguration {
/// * If [TextInputClient] is implemented then updates for the editing /// * If [TextInputClient] is implemented then updates for the editing
/// state will come through [TextInputClient.updateEditingValue]. /// state will come through [TextInputClient.updateEditingValue].
/// ///
/// Defaults to false. Cannot be null. /// Defaults to false.
final bool enableDeltaModel; final bool enableDeltaModel;
/// Returns a representation of this object as a JSON object. /// Returns a representation of this object as a JSON object.
...@@ -762,9 +762,6 @@ class TextEditingValue { ...@@ -762,9 +762,6 @@ class TextEditingValue {
/// The selection and composing range must be within the text. This is not /// The selection and composing range must be within the text. This is not
/// checked during construction, and must be guaranteed by the caller. /// checked during construction, and must be guaranteed by the caller.
/// ///
/// The [text], [selection], and [composing] arguments must not be null but
/// each have default values.
///
/// The default value of [selection] is `TextSelection.collapsed(offset: -1)`. /// The default value of [selection] is `TextSelection.collapsed(offset: -1)`.
/// This indicates that there is no selection at all. /// This indicates that there is no selection at all.
const TextEditingValue({ const TextEditingValue({
...@@ -1398,8 +1395,8 @@ class TextInputConnection { ...@@ -1398,8 +1395,8 @@ class TextInputConnection {
/// Send the smallest rect that covers the text in the client that's currently /// Send the smallest rect that covers the text in the client that's currently
/// being composed. /// being composed.
/// ///
/// The given `rect` can not be null. If any of the 4 coordinates of the given /// If any of the 4 coordinates of the given [Rect] is not finite, a [Rect] of
/// [Rect] is not finite, a [Rect] of size (-1, -1) will be sent instead. /// size (-1, -1) will be sent instead.
/// ///
/// This information is used for positioning the IME candidates menu on each /// This information is used for positioning the IME candidates menu on each
/// platform. /// platform.
......
...@@ -12,8 +12,6 @@ class WaitForCondition extends Command { ...@@ -12,8 +12,6 @@ class WaitForCondition extends Command {
const WaitForCondition(this.condition, {super.timeout}); const WaitForCondition(this.condition, {super.timeout});
/// Deserializes this command from the value generated by [serialize]. /// Deserializes this command from the value generated by [serialize].
///
/// The [json] argument cannot be null.
WaitForCondition.deserialize(super.json) WaitForCondition.deserialize(super.json)
: condition = _deserialize(json), : condition = _deserialize(json),
super.deserialize(); super.deserialize();
......
...@@ -97,11 +97,11 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator { ...@@ -97,11 +97,11 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
}); });
/// The directory to which golden file URIs will be resolved in [compare] and /// The directory to which golden file URIs will be resolved in [compare] and
/// [update], cannot be null. /// [update].
final Uri basedir; final Uri basedir;
/// A client for uploading image tests and making baseline requests to the /// A client for uploading image tests and making baseline requests to the
/// Flutter Gold Dashboard, cannot be null. /// Flutter Gold Dashboard.
final SkiaGoldClient skiaClient; final SkiaGoldClient skiaClient;
/// The file system used to perform file access. /// The file system used to perform file access.
...@@ -378,8 +378,6 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator { ...@@ -378,8 +378,6 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
}); });
/// Describes the reason for using the [FlutterSkippingFileComparator]. /// Describes the reason for using the [FlutterSkippingFileComparator].
///
/// Cannot be null.
final String reason; final String reason;
/// Creates a new [FlutterSkippingFileComparator] that mirrors the /// Creates a new [FlutterSkippingFileComparator] that mirrors the
......
...@@ -331,8 +331,6 @@ class ComparisonResult { ...@@ -331,8 +331,6 @@ class ComparisonResult {
}); });
/// Indicates whether or not a pixel comparison test has failed. /// Indicates whether or not a pixel comparison test has failed.
///
/// This value cannot be null.
final bool passed; final bool passed;
/// Error message used to describe the cause of the pixel comparison failure. /// Error message used to describe the cause of the pixel comparison failure.
......
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