Skip to content

Commit 54a6b86

Browse files
committed
chore: fix analysis issue on flutter 3.3.0
1 parent 15ff2ef commit 54a6b86

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

frontend/app_flowy/packages/appflowy_editor/lib/src/document/position.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'package:flutter/material.dart';
2-
31
import './path.dart';
42

53
class Position {
@@ -21,7 +19,7 @@ class Position {
2119

2220
@override
2321
int get hashCode {
24-
final pathHash = hashList(path);
22+
final pathHash = Object.hashAll(path);
2523
return Object.hash(pathHash, offset);
2624
}
2725

frontend/app_flowy/packages/appflowy_editor/lib/src/document/text_delta.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'dart:math';
33

44
import 'package:appflowy_editor/src/document/attributes.dart';
55
import 'package:flutter/foundation.dart';
6-
import 'package:flutter/material.dart';
76

87
// constant number: 2^53 - 1
98
const int _maxInt = 9007199254740991;
@@ -462,7 +461,7 @@ class Delta extends Iterable<TextOperation> {
462461

463462
@override
464463
int get hashCode {
465-
return hashList(_operations);
464+
return Object.hashAll(_operations);
466465
}
467466

468467
/// Returned an inverted delta that has the opposite effect of against a base document delta.

frontend/app_flowy/packages/appflowy_editor/test/legacy/flowy_editor_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:appflowy_editor/src/document/path.dart';
22
import 'package:appflowy_editor/src/document/position.dart';
33
import 'package:appflowy_editor/src/document/selection.dart';
4-
import 'package:flutter/material.dart';
54
import 'package:flutter_test/flutter_test.dart';
65

76
void main() {
@@ -75,15 +74,15 @@ void main() {
7574
final path2 = <int>[1];
7675
expect(pathEquals(path1, path2), true);
7776

78-
expect(hashList(path1), hashList(path2));
77+
expect(Object.hashAll(path1), Object.hashAll(path2));
7978
});
8079

8180
test('test path utils 2', () {
8281
final path1 = <int>[1];
8382
final path2 = <int>[2];
8483
expect(pathEquals(path1, path2), false);
8584

86-
expect(hashList(path1) != hashList(path2), true);
85+
expect(Object.hashAll(path1) != Object.hashAll(path2), true);
8786
});
8887

8988
test('test position comparator', () {

0 commit comments

Comments
 (0)