build method Null safety

  1. @override
dynamic build(
  1. 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,
    ),
  );
}