From 1305ee3df465da690baf696b792ddbbb2e4cc275 Mon Sep 17 00:00:00 2001 From: em Date: Wed, 15 Jun 2022 16:29:52 +0200 Subject: [PATCH] add Delta.from_operations factory --- 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);