easy_attribution_text 1.1.1
easy_attribution_text: ^1.1.1 copied to clipboard
Easily add metadata attributes to your text and modify your fragments
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
1.1.1 12 / 09 / 2025 #
Added #
toDeltaandtoOperationinEasyTextto retrieveDeltaelements.toDeltaandfromDeltabuilders inEasyTextListto retrieveDeltaelements.invertmethod inEasyAttributeStyles.deepClonemethod inEasyAttributeStylesto allow making a full clone of the styles.fromListJsonconstructor toEasyTextList.fromJsonandtoJsonfunctions toEasyText.
BREAKING CHANGES #
oldValuewas replaced bydeltainEasyTextChangethat represents the actual operation applied.newValuewas replaced byinvertedinEasyTextChangethat represents the inverted operation that we made.- removed nullability on
lenproperty informatRangemethod ofEasyText.
1.1.0 12 / 07 / 2025 #
Changed #
- The
insert,delete, andformatRangemethods ofEasyTextnow return anEasyTextChangeobject describing the affected range, the previous text, and the new text resulting from the operation (like aDelta).
Added #
- Helper
queryinEasyTextListto retrieveEasyTextelements by specified range.
1.0.6 11 / 27 / 2025 #
Added #
- implemented
getByType<T>inEasyAttributeStylesto get attributes by a type easily.
1.0.5 09 / 24 / 2025 #
Fixes #
- Inserting text into instances that contains same
stylesproperty than the passed ininsertmethod should be merged without unlink it.
1.0.4 09 / 10 / 2025 #
Changed #
- Removed nullability in
before,between,aftermethods. - Renamed
_splitExactRangesmethod toextractAt.
1.0.3 9 / 04 / 2025 #
Changed #
idproperty now is available onconstructorsandcopyWithmethod.deepEqualswas deprecated since does not fit with the new customhashCodemethod
Added #
- Added
charAt,toLowerCase,toUpperCase, andsplitshortcuts to avoid callingtextproperty unnecessarily onEasyTextinstances. - Added
strictEqualsandstrictHashCodefor cases where we need more control on the equality of twoEasyTextinstances.
Fixes #
- README code samples show an old usage of the API.
- Code samples in
delete,insertandformatRangemethods were using wrong constructors.
1.0.2 9 / 03 / 2025 #
Changed #
-
Removed
textproperty fromEasyTextListsince we cannot make a properly caching and update of this value. -
Removed
insertTextandremoveTextmethods fromEasyTextList. -
Removed
invalidateParentCachemethod fromEasyTextclass. -
Updated README to include
EasyTextListimplementation.
Added #
- New constructors for
EasyTextListclass:EasyTextList list = EasyTextList.from(<EasyText>[]); EasyTextList list2 = EasyTextList.easy(EasyText.fromStr(text: '')); EasyTextList list3 = EasyTextList.fromStr('');
1.0.1 8 / 27 / 2025 #
Fixes #
EasyAttributeStylesdoes not recognizeboldor other unknown attributes.keyin FontSizeAttribute is referencing FontFamily `key.mergemethod fromEasyAttributeStylesis not applyingexclusiverules.- Bad relative imports for attributes.
Added #
- Support to use
UnknownAttributeinstead throwing anassertion errorduringEasyAttributeStyles.fromJsoncall is being executed, - Support to use
EasyAttributes.alternativesNamesof someEasyAttributesthat can are used by other libraries. - Support for missing
ScriptAttribute. strmethod toEasyTextclass to getStringeasily.
1.0.0 8 / 24 / 2025 #
- Feat: released package