dart-lang / mockito

Mockito-inspired mock library for Dart
https://pub.dev/packages/mockito
Apache License 2.0
623 stars 160 forks source link

Dart 3.4.3: invocation_matcher.dart Error: The class 'DeepCollectionEquality' can't be extended outside of its library because it's a final class. #758

Open dannnnthemannnn opened 1 week ago

dannnnthemannnn commented 1 week ago

running flutter test --platform chrome (or flutter test) is giving the below issue:

flutter test  --platform chrome                                         
../../../.pub-cache/hosted/pub.dev/mockito-5.4.4/lib/src/invocation_matcher.dart:155:32: Error: The class
'DeepCollectionEquality' can't be extended outside of its library because it's a final class.
class _MatcherEquality extends DeepCollectionEquality /* <Matcher | E> */ {
                               ^
Failed to compile
flutter --version
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (2 weeks ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3
srawlins commented 1 week ago

Thanks for the report! Can you show what version of the collection package is in play (e.g. from your pubspec.lock file)? I cannot find any version of the collection package where DeepCollectionEquality is final.