Skip to content

Commit 1b9f096

Browse files
authored
Merge pull request #967 from LucasXu0/fix_analysis_issues
Fix analysis issues
2 parents 15ff2ef + 110dc8c commit 1b9f096

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

frontend/app_flowy/packages/appflowy_editor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ and the Flutter guide for
2121
</p>
2222

2323
<div align="center">
24-
<img src="https://i.ibb.co/HNnc1jP/appflowy-editor-example.gif" width = "900"/>
24+
<img src="https://github.com/AppFlowy-IO/AppFlowy/blob/main/frontend/app_flowy/packages/appflowy_editor/example/documentation/images/appflowy-editor-example.gif?raw=true" width = "900"/>
2525
</div>
2626

2727
## Key Features
998 KB
Loading

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)