Nnbd docs updates for various widgets (#72389)
This commit is contained in:
parent
32741c0ec8
commit
0f5b79a250
@ -105,7 +105,7 @@ enum DragAnchor {
|
|||||||
///
|
///
|
||||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=QzA4c4QHZCY}
|
/// {@youtube 560 315 https://www.youtube.com/watch?v=QzA4c4QHZCY}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateful_widget_scaffold_no_null_safety}
|
/// {@tool dartpad --template=stateful_widget_scaffold}
|
||||||
///
|
///
|
||||||
/// The following example has a [Draggable] widget along with a [DragTarget]
|
/// The following example has a [Draggable] widget along with a [DragTarget]
|
||||||
/// in a row demonstrating an incremented `acceptedData` integer value when
|
/// in a row demonstrating an incremented `acceptedData` integer value when
|
||||||
|
@ -28,7 +28,7 @@ import 'framework.dart';
|
|||||||
/// changed. When it returns true, the dependents are marked as needing to be
|
/// changed. When it returns true, the dependents are marked as needing to be
|
||||||
/// rebuilt this frame.
|
/// rebuilt this frame.
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateful_widget_material_ticker_no_null_safety}
|
/// {@tool dartpad --template=stateful_widget_material_ticker}
|
||||||
///
|
///
|
||||||
/// This example shows three spinning squares that use the value of the notifier
|
/// This example shows three spinning squares that use the value of the notifier
|
||||||
/// on an ancestor [InheritedNotifier] (`SpinModel`) to give them their
|
/// on an ancestor [InheritedNotifier] (`SpinModel`) to give them their
|
||||||
@ -50,13 +50,13 @@ import 'framework.dart';
|
|||||||
/// ```dart preamble
|
/// ```dart preamble
|
||||||
/// class SpinModel extends InheritedNotifier<AnimationController> {
|
/// class SpinModel extends InheritedNotifier<AnimationController> {
|
||||||
/// SpinModel({
|
/// SpinModel({
|
||||||
/// Key key,
|
/// Key? key,
|
||||||
/// AnimationController notifier,
|
/// AnimationController? notifier,
|
||||||
/// Widget child,
|
/// required Widget child,
|
||||||
/// }) : super(key: key, notifier: notifier, child: child);
|
/// }) : super(key: key, notifier: notifier, child: child);
|
||||||
///
|
///
|
||||||
/// static double of(BuildContext context) {
|
/// static double of(BuildContext context) {
|
||||||
/// return context.dependOnInheritedWidgetOfExactType<SpinModel>().notifier.value;
|
/// return context.dependOnInheritedWidgetOfExactType<SpinModel>()!.notifier!.value;
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
@ -81,7 +81,7 @@ import 'framework.dart';
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// AnimationController _controller;
|
/// late AnimationController _controller;
|
||||||
///
|
///
|
||||||
/// @override
|
/// @override
|
||||||
/// void initState() {
|
/// void initState() {
|
||||||
|
@ -17,7 +17,7 @@ import 'framework.dart';
|
|||||||
|
|
||||||
typedef NotificationListenerCallback<T extends Notification> = bool Function(T notification);
|
typedef NotificationListenerCallback<T extends Notification> = bool Function(T notification);
|
||||||
|
|
||||||
/// {@tool dartpad --template=stateless_widget_material_no_null_safety}
|
/// {@tool dartpad --template=stateless_widget_material}
|
||||||
///
|
///
|
||||||
/// This example shows a [NotificationListener] widget
|
/// This example shows a [NotificationListener] widget
|
||||||
/// that listens for [ScrollNotification] notifications. When a scroll
|
/// that listens for [ScrollNotification] notifications. When a scroll
|
||||||
|
@ -46,7 +46,7 @@ import 'ticker_provider.dart';
|
|||||||
/// [OverscrollIndicatorNotification.paintOffset] to the
|
/// [OverscrollIndicatorNotification.paintOffset] to the
|
||||||
/// notification, or use a [NestedScrollView].
|
/// notification, or use a [NestedScrollView].
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
|
/// {@tool dartpad --template=stateless_widget_scaffold}
|
||||||
///
|
///
|
||||||
/// This example demonstrates how to use a [NotificationListener] to manipulate
|
/// This example demonstrates how to use a [NotificationListener] to manipulate
|
||||||
/// the placement of a [GlowingOverscrollIndicator] when building a
|
/// the placement of a [GlowingOverscrollIndicator] when building a
|
||||||
@ -81,7 +81,7 @@ import 'ticker_provider.dart';
|
|||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
|
/// {@tool dartpad --template=stateless_widget_scaffold}
|
||||||
///
|
///
|
||||||
/// This example demonstrates how to use a [NestedScrollView] to manipulate the
|
/// This example demonstrates how to use a [NestedScrollView] to manipulate the
|
||||||
/// placement of a [GlowingOverscrollIndicator] when building a
|
/// placement of a [GlowingOverscrollIndicator] when building a
|
||||||
|
@ -386,7 +386,7 @@ class ShortcutManager extends ChangeNotifier with Diagnosticable {
|
|||||||
/// when invoking an [Action] via a keyboard key combination that maps to an
|
/// when invoking an [Action] via a keyboard key combination that maps to an
|
||||||
/// [Intent].
|
/// [Intent].
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateful_widget_scaffold_center_no_null_safety}
|
/// {@tool dartpad --template=stateful_widget_scaffold_center}
|
||||||
///
|
///
|
||||||
/// Here, we will use a [Shortcuts] and [Actions] widget to add and remove from a counter.
|
/// Here, we will use a [Shortcuts] and [Actions] widget to add and remove from a counter.
|
||||||
/// This can be done by creating a child widget that is focused and pressing the logical key
|
/// This can be done by creating a child widget that is focused and pressing the logical key
|
||||||
|
@ -81,7 +81,7 @@ class _TableElementRow {
|
|||||||
///
|
///
|
||||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=_lbE0wsVZSw}
|
/// {@youtube 560 315 https://www.youtube.com/watch?v=_lbE0wsVZSw}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
|
/// {@tool dartpad --template=stateless_widget_scaffold}
|
||||||
///
|
///
|
||||||
/// This sample shows a `Table` with borders, multiple types of column widths and different vertical cell alignments.
|
/// This sample shows a `Table` with borders, multiple types of column widths and different vertical cell alignments.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user