Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: delete unused code

Lucas.Xu085cc73ec544
diff --git a/frontend/app_flowy/packages/flowy_editor/example/pubspec.lock b/frontend/app_flowy/packages/flowy_editor/example/pubspec.lock
index 63ade5e65c..1420c9b23d 100644
--- a/frontend/app_flowy/packages/flowy_editor/example/pubspec.lock
+++ b/frontend/app_flowy/packages/flowy_editor/example/pubspec.lock
@@ -185,5 +185,5 @@ packages:
source: hosted
version: "2.1.2"
sdks:
- dart: ">=2.17.3 <3.0.0"
+ dart: ">=2.17.0 <3.0.0"
flutter: ">=1.17.0"
diff --git a/frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml b/frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml
index 1a788cfb7d..d514607eac 100644
--- a/frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml
+++ b/frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml
@@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
- sdk: ">=2.17.3 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart b/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart
index 1e951f4d79..ad49d9c8a2 100644
--- a/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart
+++ b/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart
@@ -84,13 +84,6 @@ class Node extends ChangeNotifier with LinkedListEntry<Node> {
return childAtIndex(path.first)?.childAtPath(path.sublist(1));
}
- Node root() {
- if (parent != null) {
- return parent!.root();
- }
- return this;
- }
-
Path path([Path previous = const []]) {
if (parent == null) {
return previous;
diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart b/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart
index 8f7f99aa13..af343f54a0 100644
--- a/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart
+++ b/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart
@@ -16,12 +16,6 @@ class StateTree {
return StateTree(root: root);
}
- // Path pathForNode(Node node) {
- // var nodeRoot = node.root();
- // assert(nodeRoot == root, "Every node's root must be same as root");
-
- // }
-
Node? nodeAtPath(Path path) {
return root.childAtPath(path);
}