actionsPadding property

EdgeInsetsGeometry? actionsPadding
final

Padding around the set of actions at the bottom of the dialog.

Typically used to provide padding to the button bar between the button bar and the edges of the dialog.

The buttonPadding may contribute to the padding on the edges of actions as well.

If there are no actions, then no padding will be included.

This is an example of a set of actions aligned with the content widget.

AlertDialog(
  title: const Text('Title'),
  content: Container(width: 200, height: 200, color: Colors.green),
  actions: <Widget>[
    ElevatedButton(onPressed: () {}, child: const Text('Button 1')),
    ElevatedButton(onPressed: () {}, child: const Text('Button 2')),
  ],
  actionsPadding: const EdgeInsets.symmetric(horizontal: 8.0),
)

See also:

Implementation

// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// This is an example of a set of actions aligned with the content widget.
/// ```dart
/// AlertDialog(
///   title: const Text('Title'),
///   content: Container(width: 200, height: 200, color: Colors.green),
///   actions: <Widget>[
///     ElevatedButton(onPressed: () {}, child: const Text('Button 1')),
///     ElevatedButton(onPressed: () {}, child: const Text('Button 2')),
///   ],
///   actionsPadding: const EdgeInsets.symmetric(horizontal: 8.0),
/// )
/// ```
///
/// </callout-box>
///
/// See also:
///
/// * [OverflowBar], which [actions] configures to lay itself out.
final EdgeInsetsGeometry? actionsPadding;