Clarify the whole "CustomPainters default to Size.zero" thing. (#130624)

Fixes https://github.com/flutter/flutter/issues/52707
This commit is contained in:
Ian Hickson
2023-07-16 17:36:30 -07:00
committed by GitHub
parent a1db2fe3bf
commit 5a866a031f

View File

@@ -600,11 +600,13 @@ class BackdropFilter extends SingleChildRenderObjectWidget {
/// `setState` or `markNeedsLayout` during the callback (the layout for this
/// frame has already happened).
///
/// Custom painters normally size themselves to their child. If they do not have
/// a child, they attempt to size themselves to the [size], which defaults to
/// [Size.zero]. [size] must not be null.
/// Custom painters normally size themselves to their [child]. If they do not
/// have a child, they attempt to size themselves to the specified [size], which
/// defaults to [Size.zero]. The parent [may enforce constraints on this
/// size](https://docs.flutter.dev/ui/layout/constraints).
///
/// [isComplex] and [willChange] are hints to the compositor's raster cache.
/// The [isComplex] and [willChange] properties are hints to the compositor's
/// raster cache.
///
/// {@tool snippet}
///