diff --git a/lib/src/core/base.dart b/lib/src/core/base.dart index 03da61c6..7e3d9562 100644 --- a/lib/src/core/base.dart +++ b/lib/src/core/base.dart @@ -8,7 +8,6 @@ import 'dart:ffi' as ffi; import 'dart:ffi'; import 'dart:io'; -import 'package:equatable/equatable.dart'; import 'package:ffi/ffi.dart'; import "../opencv.g.dart" as cvg; @@ -61,9 +60,19 @@ abstract class ICvStruct extends CvObject { ffi.Pointer ptr; T get ref; + + List get props; + + @override + // ignore: hash_and_equals + bool operator ==(Object other) { + if (other is! ICvStruct) return false; + if (props.length != other.props.length) return false; + return props.indexed.every((e) => other.props[e.$1] == e.$2); + } } -abstract class CvStruct extends ICvStruct with EquatableMixin { +abstract class CvStruct extends ICvStruct { CvStruct.fromPointer(super.ptr) : super.fromPointer(); } diff --git a/pubspec.yaml b/pubspec.yaml index 2c382d61..492b74bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,6 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.1.8 ffi: ^2.1.0 - equatable: ^2.0.5 path: ^1.9.0 args: ^2.5.0 archive: ^3.5.1