overlayButtonStyle static method

ButtonStyle overlayButtonStyle(
  1. BuildContext context, {
  2. Size? minimumSize,
  3. EdgeInsets? padding = const EdgeInsets.symmetric(horizontal: 22.0, vertical: 12.0),
})

Button style for the overlay buttons that are displayed on top of the fleet map and list.

Implementation

static ButtonStyle overlayButtonStyle(
  BuildContext context, {
  Size? minimumSize,
  EdgeInsets? padding = const EdgeInsets.symmetric(
    horizontal: 22.0,
    vertical: 12.0,
  ),
}) {
  final brightness = context.theme.brightness;

  return ElevatedButton.styleFrom(
    foregroundColor: context.colorScheme.inverseSurface,
    backgroundColor: context.colorScheme.onInverseSurface.withOpacity(0.85),
    shape: StadiumBorder(
      side: BorderSide(
        width: 1.0,
        color: brightness.isDark
            ? Colors.black
            : context.colorScheme.outline.withOpacity(0.38),
      ),
    ),
    visualDensity: VisualDensity.standard,
    minimumSize: minimumSize,
    padding: padding,
  );
}