From f2c477e89feb0905bb0ece8ecb5a090f8cec64a8 Mon Sep 17 00:00:00 2001 From: Vincent Chan <okcdz@diverse.space> Date: Wed, 13 Jul 2022 16:01:48 +0800 Subject: [PATCH] feat: change attributes map to dynamic --- frontend/app_flowy/packages/flowy_editor/lib/document/node.dart | 2 +- .../packages/flowy_editor/lib/document/text_delta.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {