diff --git a/packages/flutter/lib/src/material/icon_button.dart b/packages/flutter/lib/src/material/icon_button.dart index d3c65a6918..dd8ec4d772 100644 --- a/packages/flutter/lib/src/material/icon_button.dart +++ b/packages/flutter/lib/src/material/icon_button.dart @@ -49,6 +49,26 @@ const double _kMinButtonSize = kMinInteractiveDimension; /// ** See code in examples/api/lib/material/icon_button/icon_button.0.dart ** /// {@end-tool} /// +/// ### Icon sizes +/// +/// When creating an icon button with an [Icon], do not override the +/// icon's size with its [Icon.size] parameter, use the icon button's +/// [iconSize] parameter instead. For example do this: +/// +/// ```dart +/// IconButton(iconSize: 72, icon: Icon(Icons.favorite), ...) +/// ``` +/// +/// Avoid doing this: +/// +/// ```dart +/// IconButton(icon: Icon(Icons.favorite, size: 72), ...) +/// ``` +/// +/// If you do, the button's size will be based on the default icon +/// size, not 72, which may produce unexpected layouts and clipping +/// issues. +/// /// ### Adding a filled background /// /// Icon buttons don't support specifying a background color or other