processDelta static method
Delta?
processDelta(
- Delta? delta,
- DeltaAttributesOptions options,
- bool overrideAttributesPassedByUser
Implementation
static Delta? processDelta(Delta? delta, qpdf.DeltaAttributesOptions options,
bool overrideAttributesPassedByUser) {
if (delta == null) return null;
if (delta.isEmpty) return delta;
final String json = qpdf
.applyAttributesIfNeeded(
json: jsonEncode(delta.toJson()),
attr: options,
overrideAttributes: overrideAttributesPassedByUser)
.fixCommonErrorInsertsInRawDelta
.withBrackets;
return Delta.fromJson(jsonDecode(json));
}