@@ -38,7 +38,7 @@ Matcher isMapOf(Matcher keyMatcher, Matcher valueMatcher) =>
3838Matcher isOneOf (List <Matcher > choiceMatchers) => _OneOf (choiceMatchers);
3939
4040/// Assert that [actual] matches [matcher] .
41- void outOfTestExpect (actual, Matcher matcher,
41+ void outOfTestExpect (dynamic actual, Matcher matcher,
4242 {String ? reason, skip, bool verbose = false }) {
4343 var matchState = {};
4444 try {
@@ -49,8 +49,8 @@ void outOfTestExpect(actual, Matcher matcher,
4949 fail (_defaultFailFormatter (actual, matcher, reason, matchState, verbose));
5050}
5151
52- String _defaultFailFormatter (
53- actual, Matcher matcher, String ? reason, Map matchState, bool verbose) {
52+ String _defaultFailFormatter (dynamic actual, Matcher matcher, String ? reason,
53+ Map matchState, bool verbose) {
5454 var description = StringDescription ();
5555 description.add ('Expected: ' ).addDescriptionOf (matcher).add ('\n ' );
5656 description.add (' Actual: ' ).addDescriptionOf (actual).add ('\n ' );
@@ -306,7 +306,7 @@ class MatchesJsonObject extends _RecursiveMatcher {
306306 description.add (this .description);
307307
308308 @override
309- void populateMismatches (item, List <MismatchDescriber > mismatches) {
309+ void populateMismatches (dynamic item, List <MismatchDescriber > mismatches) {
310310 if (item is ! Map ) {
311311 mismatches.add (simpleDescription ('is not a map' ));
312312 return ;
@@ -344,7 +344,7 @@ class MatchesJsonObject extends _RecursiveMatcher {
344344 /// Check the type of a field called [key] , having value [value] , using
345345 /// [valueMatcher] . If it doesn't match, record a closure in [mismatches]
346346 /// which can describe the mismatch.
347- void _checkField (String key, value, Matcher valueMatcher,
347+ void _checkField (String key, Object ? value, Matcher valueMatcher,
348348 List <MismatchDescriber > mismatches) {
349349 checkSubstructure (
350350 value,
@@ -757,7 +757,7 @@ abstract class _RecursiveMatcher extends Matcher {
757757 /// the mismatch. [describeSubstructure] is used to describe which
758758 /// substructure did not match.
759759 void checkSubstructure (
760- item,
760+ Object ? item,
761761 Matcher matcher,
762762 List <MismatchDescriber > mismatches,
763763 Description Function (Description description) describeSubstructure) {
@@ -806,7 +806,7 @@ abstract class _RecursiveMatcher extends Matcher {
806806 }
807807
808808 @override
809- bool matches (item, Map matchState) {
809+ bool matches (dynamic item, Map matchState) {
810810 var mismatches = < MismatchDescriber > [];
811811 populateMismatches (item, mismatches);
812812 if (mismatches.isEmpty) {
@@ -819,7 +819,7 @@ abstract class _RecursiveMatcher extends Matcher {
819819
820820 /// Populate [mismatches] with descriptions of all the ways in which [item]
821821 /// does not match.
822- void populateMismatches (item, List <MismatchDescriber > mismatches);
822+ void populateMismatches (dynamic item, List <MismatchDescriber > mismatches);
823823
824824 /// Create a [MismatchDescriber] describing a mismatch with a simple string.
825825 MismatchDescriber simpleDescription (String description) =>
0 commit comments