captureThat function

Null captureThat(
  1. Matcher matcher,
  2. {String? named}
)

An argument matcher that matches an argument (named or positional) that matches matcher, and captures the argument for later access with VerificationResult.captured. When capturing a named argument, the name of the argument must be passed via named.

See the README section on capturing arguments for examples.

Implementation

/// When capturing a named argument, the name of the argument must be passed via
/// [named].
///
/// See the README section on
/// [capturing arguments](https://pub-web.flutter-io.cn/packages/mockito#capturing-arguments-for-further-assertions)
/// for examples.
Null captureThat(Matcher matcher, {String? named}) =>
    _registerMatcher(matcher, true,
        named: named, argumentMatcher: 'captureThat');