withFontWeight method

  1. @useResult
WidgetSelector<AnyText> withFontWeight(
  1. FontWeight? value
)

Creates a WidgetSelector that finds all AnyText where fontWeight equals (==) value.

Example usage:

spot<AnyText>().withFontWeight(FontWeight.bold).existsOnce();

Implementation

@useResult
WidgetSelector<AnyText> withFontWeight(FontWeight? value) {
  return withDiagnosticProp<FontWeight>(
      'font_weight', (it) => value == null ? it.isNull() : it.equals(value));
}