Skip to content

Commit

Permalink
Fix example usage in hasEffectiveMaxLinesWhere documentation (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Welsch <pascal@welsch.dev>
  • Loading branch information
danielmolnar and passsy authored Jan 15, 2024
1 parent 9dcf3c8 commit cc890d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/spot/effective/effective_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import 'package:spot/src/spot/element_extensions.dart';
import 'package:spot/src/spot/selectors.dart';

extension EffectiveTextMatcher on WidgetMatcher<Text> {
/// Matches the [Text] widget when it has the given [maxLines]
/// Matches the [Text] widget when it has the given [maxLines].
///
/// ```dart
/// spotTexts('foo').hasEffectiveMaxLinesWhere((it)=> it.equals(1));
/// spot<Text>().withText('foo').existsOnce()
/// .hasEffectiveMaxLinesWhere((it) => it.equals(1));
/// ```
WidgetMatcher<Text> hasEffectiveMaxLinesWhere(MatchProp<int> match) {
return hasProp(
Expand Down

0 comments on commit cc890d2

Please sign in to comment.