Fix some lint warnings

This commit is contained in:
Ming Ming 2024-09-02 01:19:19 +08:00
parent 7bd6605dea
commit d9fcd3ace1
6 changed files with 14 additions and 12 deletions

View file

@ -15,7 +15,7 @@ class Exif with EquatableMixin {
@override
// ignore: hash_and_equals
bool operator ==(Object? other) => equals(other, isDeep: true);
bool operator ==(Object other) => equals(other, isDeep: true);
/// Compare two Exif objects
///

View file

@ -97,7 +97,7 @@ class Metadata with EquatableMixin {
@override
// ignore: hash_and_equals
bool operator ==(Object? other) => equals(other, isDeep: true);
bool operator ==(Object other) => equals(other, isDeep: true);
bool equals(Object? other, {bool isDeep = false}) {
if (other is Metadata) {
@ -326,7 +326,7 @@ class File with EquatableMixin implements FileDescriptor {
@override
// ignore: hash_and_equals
bool operator ==(Object? other) => equals(other, isDeep: true);
bool operator ==(Object other) => equals(other, isDeep: true);
bool equals(Object? other, {bool isDeep = false}) {
if (other is File) {

View file

@ -11,7 +11,7 @@ class SizeInt {
SizeInt.square(int dimension) : this(dimension, dimension);
@override
bool operator ==(Object? other) {
bool operator ==(Object other) {
return other is SizeInt && width == other.width && height == other.height;
}

View file

@ -77,7 +77,7 @@ class _VisibleItem implements Comparable<_VisibleItem> {
const _VisibleItem(this.index, this.item);
@override
bool operator ==(Object? other) =>
bool operator ==(Object other) =>
other is _VisibleItem && index == other.index;
@override

View file

@ -80,9 +80,10 @@ class Draggable<T extends Object> extends StatelessWidget {
return buildIndicator(AlignmentDirectional.centerStart,
candidateItems.isNotEmpty);
},
onAccept: (item) {
_log.fine("[build] Dropping $item before $data");
onDropBefore!(item);
onAcceptWithDetails: (details) {
_log.fine(
"[build] Dropping ${details.data} before $data");
onDropBefore!(details.data);
},
),
),
@ -93,9 +94,10 @@ class Draggable<T extends Object> extends StatelessWidget {
return buildIndicator(AlignmentDirectional.centerEnd,
candidateItems.isNotEmpty);
},
onAccept: (item) {
_log.fine("[build] Dropping $item after $data");
onDropAfter!(item);
onAcceptWithDetails: (details) {
_log.fine(
"[build] Dropping ${details.data} after $data");
onDropAfter!(details.data);
},
),
),

View file

@ -142,7 +142,7 @@ class _VisibleDate implements Comparable<_VisibleDate> {
const _VisibleDate(this.id, this.date);
@override
bool operator ==(Object? other) => other is _VisibleDate && id == other.id;
bool operator ==(Object other) => other is _VisibleDate && id == other.id;
@override
int compareTo(_VisibleDate other) => id.compareTo(other.id);