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.

feat: change attributes map to dynamic

Vincent Chanf2c477e89feb
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 e4ff84b99c..fd93da0bdd 100644
--- a/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart
+++ b/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart
@@ -1,7 +1,7 @@
import 'dart:collection';
import 'package:flowy_editor/document/path.dart';
-typedef Attributes = Map<String, Object>;
+typedef Attributes = Map<String, dynamic>;
class Node extends LinkedListEntry<Node> {
Node? parent;
diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart b/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart
index c53d243137..c799fa65c2 100644
--- a/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart
+++ b/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart
@@ -397,7 +397,7 @@ class Delta {
Attributes? _composeMap(Attributes? a, Attributes? b) {
a ??= {};
b ??= {};
- final attributes = <String, Object>{};
+ final Attributes attributes = {};
attributes.addAll(b);
for (final entry in a.entries) {