Refactor the type of `Delta().toJson()`

pull/1694/head
Cierra_Runis 1 year ago
parent 97a5ed1a1b
commit 9241f4c413
No known key found for this signature in database
GPG Key ID: 6A879A1FDB3BF78
  1. 3
      dart_quill_delta/lib/src/delta/delta.dart

@ -122,7 +122,8 @@ class Delta {
List<Operation> toList() => List.from(operations);
/// Returns JSON-serializable version of this delta.
List toJson() => toList().map((operation) => operation.toJson()).toList();
List<Map<String, dynamic>> toJson() =>
toList().map((operation) => operation.toJson()).toList();
/// Returns `true` if this delta is empty.
bool get isEmpty => operations.isEmpty;

Loading…
Cancel
Save