getBackgroundColor method Null safety

MaterialStateProperty<Color?>? getBackgroundColor(
  1. BuildContext context
)

Implementation

MaterialStateProperty<Color?>? getBackgroundColor(BuildContext context) {
  return MaterialStateProperty.resolveWith((states) =>
      buttonColor ??
      _getMaterialStyle(context)?.backgroundColor?.resolve(states));
}