The ListWheelScrollView Widget
1 min read
If you need to select between a small list of values but have limited vertical space, you can use a ListWheelScrollView.
If you need to select between a small list of values but have limited vertical space, you can use a ListWheelScrollView.
If you want to render fixed width (monospaced) digits, set FontFeature.tabularFigures() inside your TextStyle.
Since Flutter 3.27, you can pass a spacing argument to your Row and Column widgets (rather than using SizedBox).
You can use the Banner widget to place a small diagonal banner over a child widget. For more custom styling, build your own using a custom painter.
To create a stylish Text, use the ShaderMask widget with a shaderCallback that returns a LinearGradient with begin and end points, along with a list of colors.
The easiest way to add a badge to an IconButton is to use the Badge widget. Use this to show a numeric value or a custom label next to an icon.
Since Flutter 3.24, a new CarouselView widget is available. You can set the children's size with itemExtent and shrinkExtent, and use it with any widgets as children.
OverflowBar makes it easy to layout your widgets in a row unless they overflow the available horizontal space, in which case they're arranged as a column.
If you need to return an empty widget, SizedBox.shrink() is more performant than an empty Container.
In Flutter you can use DecoratedBox to set a lot of decoration/styling options to your widgets. Here's how.
A useful tip to write more performant code when using SizedBox as a gap between widgets inside a Row or Column layout.
How to style an ElevatedButton in Flutter, including reusing the same style across all buttons with ThemeData.