Unverified Commit 0b8fe017 authored by Leigha Jarett's avatar Leigha Jarett Committed by GitHub

Advise developers to use OverflowBar instead of ButtonBar (#128437)

Fixes https://github.com/flutter/flutter/issues/128430
parent 7c15a26e
......@@ -12,6 +12,37 @@ import 'dialog.dart';
/// An end-aligned row of buttons, laying out into a column if there is not
/// enough horizontal space.
///
/// ## Updating to [OverflowBar]
///
/// [ButtonBar] has been replace by a more efficient widget, [OverflowBar].
///
/// ```dart
/// // Before
/// ButtonBar(
/// alignment: MainAxisAlignment.spaceEvenly,
/// children: <Widget>[
/// TextButton( child: const Text('Button 1'), onPressed: () {}),
/// TextButton( child: const Text('Button 2'), onPressed: () {}),
/// TextButton( child: const Text('Button 3'), onPressed: () {}),
/// ],
/// );
/// ```
/// ```dart
/// // After
/// OverflowBar(
/// alignment: MainAxisAlignment.spaceEvenly,
/// children: <Widget>[
/// TextButton( child: const Text('Button 1'), onPressed: () {}),
/// TextButton( child: const Text('Button 2'), onPressed: () {}),
/// TextButton( child: const Text('Button 3'), onPressed: () {}),
/// ],
/// );
/// ```
///
/// See the [OverflowBar] documentation for more details.
///
/// ## Using [ButtonBar]
///
/// Places the buttons horizontally according to the [buttonPadding]. The
/// children are laid out in a [Row] with [MainAxisAlignment.end]. When the
/// [Directionality] is [TextDirection.ltr], the button bar's children are
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment