buildMaterial method
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,
);