buildMaterial method

  1. @override
Widget buildMaterial(
  1. BuildContext context
)
override

Builds the Material Design (Android) variant of this widget.

Implementation

@override
Widget buildMaterial(BuildContext context) => TextButton(
  onPressed: () => onPressed?.call(context),
  style: !isDestructiveAction
      ? null
      : TextButton.styleFrom(
          foregroundColor: ButtonTheme.of(context).colorScheme?.error ?? Colors.red,
        ),
  child: child,
);