pill static method

ButtonStyle pill({
  1. Color? background,
  2. Color? foreground,
  3. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
})

Rounded pill-style button

Implementation

static ButtonStyle pill({
  Color? background,
  Color? foreground,
  EdgeInsetsGeometry padding = const EdgeInsets.symmetric(
    horizontal: 24,
    vertical: 14,
  ),
}) {
  return ElevatedButton.styleFrom(
    backgroundColor: background ?? Colors.indigo,
    foregroundColor: foreground ?? Colors.white,
    padding: padding,
    shape: const StadiumBorder(),
  );
}