From 8d89632fdd26dccfc80436b5a925baab94e8fd17 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 11 Aug 2021 14:32:06 -0700 Subject: [PATCH] Notification doc fixes (#87767) --- .../src/widgets/notification_listener.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/flutter/lib/src/widgets/notification_listener.dart b/packages/flutter/lib/src/widgets/notification_listener.dart index fcf7b50b4a5..5ae039b8919 100644 --- a/packages/flutter/lib/src/widgets/notification_listener.dart +++ b/packages/flutter/lib/src/widgets/notification_listener.dart @@ -14,9 +14,20 @@ import 'framework.dart'; /// [NotificationListener] is useful when listening scroll events /// in [ListView],[NestedScrollView],[GridView] or any Scrolling widgets. /// Used by [NotificationListener.onNotification]. - typedef NotificationListenerCallback = bool Function(T notification); +/// A notification that can bubble up the widget tree. +/// +/// You can determine the type of a notification using the `is` operator to +/// check the [runtimeType] of the notification. +/// +/// To listen for notifications in a subtree, use a [NotificationListener]. +/// +/// To send a notification, call [dispatch] on the notification you wish to +/// send. The notification will be delivered to any [NotificationListener] +/// widgets with the appropriate type parameters that are ancestors of the given +/// [BuildContext]. +/// /// {@tool dartpad --template=stateless_widget_material} /// /// This example shows a [NotificationListener] widget @@ -89,17 +100,6 @@ typedef NotificationListenerCallback = bool Function(T n /// * [ScrollEndNotification] which returns the end position of scrolling. /// * [NestedScrollView] which creates a nested scroll view. /// -/// A notification that can bubble up the widget tree. -/// -/// You can determine the type of a notification using the `is` operator to -/// check the [runtimeType] of the notification. -/// -/// To listen for notifications in a subtree, use a [NotificationListener]. -/// -/// To send a notification, call [dispatch] on the notification you wish to -/// send. The notification will be delivered to any [NotificationListener] -/// widgets with the appropriate type parameters that are ancestors of the given -/// [BuildContext]. abstract class Notification { /// Abstract const constructor. This constructor enables subclasses to provide /// const constructors so that they can be used in const expressions.