flutter_spanned_controller 0.5.0
flutter_spanned_controller: ^0.5.0 copied to clipboard
TextEditingController implementation that allows for rich text styling in Flutter.
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 #
0.5.0 — 2021-3-9 #
-
Added
StringDiff.isEmpty
andStringDiff.isNotEmpty
. -
Added
getSpans
andgetTypedSpans
toSpanList
. -
Added
SpanController.getAppliedSpansWithUnsafeType
. -
Fixed:
GestureRecognizers
on spans are now indexed with their attribute instead of the resolved attribute value, because function object equality does not work with inline lambdas. -
Fixed:
SpannedTextEditingController.buildTextSpan
did not translate composition indices, causing an exception in some cases with characters that take up multiple code units in UTF-16 (like most emoji). -
Changed:
TextAttribute.resolve
now takes aBuildContext
instead of taking anAttributeTheme
directly. -
Changed: made
TextStyle
inbuildTextSpans
optional.
0.4.0-0 — 2020-12-22 #
-
Removed
TextAttribute.simple
. In favor of custom classes, so each attribute has its own type and serialization can use the type to determine which encoder to use. -
Changed: moved
ExpandRules
to be a part of attributes themselves.
0.3.0-0 — 2020-12-18 #
-
Added system to theme
TextAttributes
withAttributeTheme
. -
Added
Range
to avoid confusion withTextRange
.TextRange
is designed to be for indexing intoString
by UTF-16 code units. -
Changed:
TextAttribute
now has a resolve method that returns the actual information for applying the attribute in the form ofTextAttributeValue
. -
Changed: the
characters
library is used to index with grapheme clusters instead of UTF-16 code units. This changes mostString
-based API to useCharacters
instead. -
Changed: use
Range
inAttributeSpan
and related classes to avoid confusion with UTF-16 indices used byTextRange
. -
Changed: renamed
SpanList.spans
toiter
to prevent confusingspans.spans
. -
Changed:
SpannedTextEditingController
takes aSpanList
now instead ofIterable<AttributeSpan>
. -
Changed: renamed
InsertBehavior
toExpandRule
andFullInsertBehavior
toSpanExpandRules
. Finally, I've come up with the right name for this concept :) -
Changed: rename
SpannedString()
toSpannedString.chars()
and let unnamed constructor takeString
. -
Fixed: Changed library name from flutter_span_controller to flutter_spanned_controller.
0.2.0-0 — 2020-12-14 #
- Added:
SpannedStringBuilder
to fluently buildSpannedString
.
0.1.1-0 — 2020-12-14 #
- Changed: Replaced template README with short explanation.
0.1.0-0 — 2020-12-11 #
Initial release.