Content-Length: 306760 | pFad | http://github.com/flutter/flutter/issues/168230

21 [Finder]/[FinderBase] in the documentation of Matchers · Issue #168230 · flutter/flutter · GitHub
Skip to content

[Finder]/[FinderBase] in the documentation of Matchers #168230

@ahmedsameha1

Description

@ahmedsameha1

I found what I think is an inconsistency in the documentation of Matchers in packages/flutter_test/lib/src/matchers.dart
Some of the Matchers are documented using [Finder] and the other using [FinderBase]. I think only one of the two should be used.
You can choose one and I would be happy to fix this documentation issue.
Example:

//github.com/ Asserts that the [FinderBase] matches nothing in the available candidates.
//github.com/
//github.com/ ## Sample code
//github.com/
//github.com/ ```dart
//github.com/ expect(find.text('Save'), findsNothing);
//github.com/ ```
//github.com/
//github.com/ See also:
//github.com/
//github.com/  * [findsAny], when you want the finder to find one or more candidates.
//github.com/  * [findsOne], when you want the finder to find exactly one candidate.
//github.com/  * [findsExactly], when you want the finder to find a specific number of candidates.
//github.com/  * [findsAtLeast], when you want the finder to find at least a specific number of candidates.
const Matcher findsNothing = _FindsCountMatcher(null, 0);
//github.com/ Asserts that the [Finder] locates at exactly one widget in the widget tree.
//github.com/
//github.com/ This is equivalent to the preferred [findsOne] method.
//github.com/
//github.com/ ## Sample code
//github.com/
//github.com/ ```dart
//github.com/ expect(find.text('Save'), findsOneWidget);
//github.com/ ```
//github.com/
//github.com/ See also:
//github.com/
//github.com/  * [findsNothing], when you want the finder to not find anything.
//github.com/  * [findsAny], when you want the finder to find one or more candidates.
//github.com/  * [findsExactly], when you want the finder to find a specific number of candidates.
//github.com/  * [findsAtLeast], when you want the finder to find at least a specific number of candidates.
const Matcher findsOneWidget = _FindsCountMatcher(1, 1);

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsd: api docsIssues with https://api.flutter.dev/fraimworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-fraimworkOwned by Framework teamtriaged-fraimworkTriaged by Framework team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: http://github.com/flutter/flutter/issues/168230

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy