소스 검색

chore: delete unused code

Lucas.Xu 3 년 전
부모
커밋
085cc73ec5

+ 1 - 1
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"

+ 1 - 1
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

+ 0 - 7
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;

+ 0 - 6
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);
   }