From 825964b7808a89208010923516bae9b49ac403f9 Mon Sep 17 00:00:00 2001 From: em6m6e <50019687+em6m6e@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:32:59 +0200 Subject: [PATCH] add Delta.from_operations factory (#852) --- lib/src/models/quill_delta.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/models/quill_delta.dart b/lib/src/models/quill_delta.dart index 486e0b1a..a9babf60 100644 --- a/lib/src/models/quill_delta.dart +++ b/lib/src/models/quill_delta.dart @@ -190,6 +190,10 @@ class Delta { factory Delta.from(Delta other) => Delta._(List.from(other._operations)); + /// Creates new [Delta] from a List of Operation + factory Delta.fromOperations(List operations) => + Delta._(operations.toList()); + // Placeholder char for embed in diff() static final String _kNullCharacter = String.fromCharCode(0);