build method Null safety
- dynamic context
Implementation
@override
Widget build(BuildContext context) {
final ThemeData themeData = Theme.of(context);
return MaterialButton(
color: buttonColor ?? themeData.colorScheme.primary,
height: height,
minWidth: minWidth,
shape: RoundedRectangleBorder(
borderRadius: borderRadius,
),
onPressed: onPressed,
child: Padding(
padding: padding,
child: child,
),
);
}