mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #967 from LucasXu0/fix_analysis_issues
Fix analysis issues
This commit is contained in:
@ -21,7 +21,7 @@ and the Flutter guide for
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://i.ibb.co/HNnc1jP/appflowy-editor-example.gif" width = "900"/>
|
<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"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 998 KiB |
@ -1,5 +1,3 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import './path.dart';
|
import './path.dart';
|
||||||
|
|
||||||
class Position {
|
class Position {
|
||||||
@ -21,7 +19,7 @@ class Position {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
final pathHash = hashList(path);
|
final pathHash = Object.hashAll(path);
|
||||||
return Object.hash(pathHash, offset);
|
return Object.hash(pathHash, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import 'dart:math';
|
|||||||
|
|
||||||
import 'package:appflowy_editor/src/document/attributes.dart';
|
import 'package:appflowy_editor/src/document/attributes.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
// constant number: 2^53 - 1
|
// constant number: 2^53 - 1
|
||||||
const int _maxInt = 9007199254740991;
|
const int _maxInt = 9007199254740991;
|
||||||
@ -462,7 +461,7 @@ class Delta extends Iterable<TextOperation> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
return hashList(_operations);
|
return Object.hashAll(_operations);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returned an inverted delta that has the opposite effect of against a base document delta.
|
/// Returned an inverted delta that has the opposite effect of against a base document delta.
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import 'package:appflowy_editor/src/document/path.dart';
|
import 'package:appflowy_editor/src/document/path.dart';
|
||||||
import 'package:appflowy_editor/src/document/position.dart';
|
import 'package:appflowy_editor/src/document/position.dart';
|
||||||
import 'package:appflowy_editor/src/document/selection.dart';
|
import 'package:appflowy_editor/src/document/selection.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@ -75,7 +74,7 @@ void main() {
|
|||||||
final path2 = <int>[1];
|
final path2 = <int>[1];
|
||||||
expect(pathEquals(path1, path2), true);
|
expect(pathEquals(path1, path2), true);
|
||||||
|
|
||||||
expect(hashList(path1), hashList(path2));
|
expect(Object.hashAll(path1), Object.hashAll(path2));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('test path utils 2', () {
|
test('test path utils 2', () {
|
||||||
@ -83,7 +82,7 @@ void main() {
|
|||||||
final path2 = <int>[2];
|
final path2 = <int>[2];
|
||||||
expect(pathEquals(path1, path2), false);
|
expect(pathEquals(path1, path2), false);
|
||||||
|
|
||||||
expect(hashList(path1) != hashList(path2), true);
|
expect(Object.hashAll(path1) != Object.hashAll(path2), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('test position comparator', () {
|
test('test position comparator', () {
|
||||||
|
Reference in New Issue
Block a user