padding property

EdgeInsetsGeometry get padding

Padding for a button's child (typically the button's label).

Defaults to 24.0 on the left and right if textTheme is ButtonTextTheme.primary, 16.0 on the left and right otherwise.

See also:

  • getPadding, which is used to calculate padding for the button's child (typically the button's label).

Implementation

EdgeInsetsGeometry get padding {
  return _padding ?? switch (textTheme) {
    ButtonTextTheme.normal  => const EdgeInsets.symmetric(horizontal: 16.0),
    ButtonTextTheme.accent  => const EdgeInsets.symmetric(horizontal: 16.0),
    ButtonTextTheme.primary => const EdgeInsets.symmetric(horizontal: 24.0),
  };
}