add Delta.from_operations factory (#852)

pull/856/head
em6m6e 3 years ago committed by GitHub
parent 13e3b23934
commit 825964b780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/src/models/quill_delta.dart

@ -190,6 +190,10 @@ class Delta {
factory Delta.from(Delta other) =>
Delta._(List<Operation>.from(other._operations));
/// Creates new [Delta] from a List of Operation
factory Delta.fromOperations(List<Operation> operations) =>
Delta._(operations.toList());
// Placeholder char for embed in diff()
static final String _kNullCharacter = String.fromCharCode(0);

Loading…
Cancel
Save