hasBackgroundColor method

WidgetMatcher<FloatingActionButton> hasBackgroundColor(
  1. Color? value
)

Expects that backgroundColor of FloatingActionButton equals (==) value.

Example usage:

spot<FloatingActionButton>().existsOnce().hasBackgroundColor(Colors.red);

Implementation

WidgetMatcher<FloatingActionButton> hasBackgroundColor(Color? value) {
  return hasDiagnosticProp<Color>('backgroundColor',
      (it) => value == null ? it.isNull() : it.equals(value));
}