Reference SizeChangedLayoutNotifier from SizeChangedLayoutNotification (#8887)
Fixes #7520
This commit is contained in:
parent
d1f73fd0ad
commit
1c69fa7eac
@ -9,12 +9,26 @@ import 'package:flutter/widgets.dart';
|
|||||||
/// this notification has changed, and that therefore any assumptions about that
|
/// this notification has changed, and that therefore any assumptions about that
|
||||||
/// layout are no longer valid.
|
/// layout are no longer valid.
|
||||||
///
|
///
|
||||||
|
/// For example, sent by [SizeChangedLayoutNotifier] whenever
|
||||||
|
/// [SizeChangedLayoutNotifier] changes size.
|
||||||
|
///
|
||||||
|
/// This notification for triggering repaints, but if you use this notification
|
||||||
|
/// to trigger rebuilds or relayouts, you'll create a backwards dependency in
|
||||||
|
/// the frame pipeline because [SizeChangedLayoutNotification]s are generated
|
||||||
|
/// during layout, which is after the build phase and in the middle of the
|
||||||
|
/// layout phase. This backwards dependency can lead to visual corruption or
|
||||||
|
/// lags.
|
||||||
|
///
|
||||||
/// See [LayoutChangedNotification] for additional discussion of layout
|
/// See [LayoutChangedNotification] for additional discussion of layout
|
||||||
/// notifications such as this one.
|
/// notifications such as this one.
|
||||||
|
///
|
||||||
|
/// See also:
|
||||||
|
///
|
||||||
|
/// * [SizeChangedLayoutNotifier], which sends this notification.
|
||||||
class SizeChangedLayoutNotification extends LayoutChangedNotification { }
|
class SizeChangedLayoutNotification extends LayoutChangedNotification { }
|
||||||
|
|
||||||
/// A widget that automatically dispatches a [SizeChangedLayoutNotifier] when
|
/// A widget that automatically dispatches a [SizeChangedLayoutNotification]
|
||||||
/// the layout of its child changes.
|
/// when the layout of its child changes.
|
||||||
///
|
///
|
||||||
/// Useful especially when having some complex, layout-changing animation within
|
/// Useful especially when having some complex, layout-changing animation within
|
||||||
/// [Material] that is also interactive.
|
/// [Material] that is also interactive.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user