custom_text 2.0.0 custom_text: ^2.0.0 copied to clipboard
Highly customisable text widget and controller to enable styling and gesture actions.
2.0.0 #
- Breaking:
- Raise minimum Flutter SDK version to 3.2.0. (#47)
- Remove deprecated
textScaleFactor
fromCustomText
and addtextScaler
. (#47) - Change
shownText
andactionText
ofSeletiveDefinition
andbuilder
ofSpanDefinition
to receive aTextElement
object. (#46)- e.g.
// <2.0.0 SelectiveDefinition( matcher: const LinkMatcher(), shownText: (groups) => groups[0]!, actionText: (groups) => groups[1]!, )
// >=2.0.0 SelectiveDefinition( matcher: const LinkMatcher(), shownText: (element) => element.groups[0]!, actionText: (element) => element.groups[1]!, )
- e.g.
- Potentially breaking:
- Change
Definition
to a sealed class.
- Change
- Small refactorings.
- Collapse the details of each example in README.
1.4.4 #
- Fix the bugs where changes in configurations were not fully reflected in the following cases. (#51)
- When both definitions and other configurations were updated.
- When
DefaultTextStyle
changed while there were no other changes.
1.4.2 #
- Add notes about gesture-related parameters to README and examples of
CustomSpan.spans
andpreBuilder
. - Add a note about
decorationColor
in Material 3 to README. - Improve documents of properties of
CustomText
.
1.4.1 #
Retracted due to breaking changes included unintentionally.
- Add notes about gesture-related parameters to README and examples of
CustomSpan.spans
andpreBuilder
. - Add a note about
decorationColor
in Material 3 to README. - Improve documents of properties of
CustomText
.
1.4.0 #
1.3.1 #
- Fix a potential issue where text was not shown quickly if it was given later than initial build.
- Extract span builder as a single class for a feature being planned for a future version.
- Improve span builder to apply gesture callbacks only when necessary.
- Improve handling of DefaultTextStyle.
- Other refactorings.
- Bump text_parser version to 2.2.1.
- Matchers with empty RegExp pattern are now allowed.
1.3.0 #
- Add the CustomText.spans constructor. (#36)
- This is useful if you already have styled spans and want to apply additional decoration.
- Deprecate
textScaleFactor
. (#38)textScaler
will be added at a future major version.
- Bump text_parser version to 2.1.1.
1.2.1 #
- Fix a potential bug that could cause an empty span in edge case.
- Fix bugs of
CustomTextEditingController
.- Text style specified in controller was not used during initial parsing.
- Text style specified in editable text was not used depending on the timing.
- Add an example of how to make real hyperlinks for the web.
1.2.0 #
- Refactor and improve handling of gestures.
- Behaviours triggered by gestures is now more stable and natural.
- e.g. Text style is no longer lost for an instant on tap when hoverStyle is specified and tapStyle is not.
- Behaviours triggered by gestures is now more stable and natural.
- Add parameters to
SpanDefinition
to be equivalent to other definitions. (#34)- Text style, mouse cursor type and gesture handlers are applied to the
InlineSpan
and its children created by thebuilder
function. - Text style is also provided to
WidgetSpan
s viaDefaultTextStyle
.
- Text style, mouse cursor type and gesture handlers are applied to the
- Make text invisible during initial parsing. (#37)
- It should be only a tiny moment, so won't have an impact.
- This does not affect the cases where
preventBlocking
is enabled or onlyTextDefinition
s are used.
- Improve documentation.
1.0.0 #
- Bump text_parser to 2.0.0.
- Contains a breaking change in
UrlMatcher
.UrlMatcher
no longer matches URLs not starting with http(s).- Use the new
UrlLikeMatcher
instead if necessary.
- Contains a breaking change in
- Add support for using an external parser.
- Add typedef for gesture callbacks.
- Improve tests, documentation and example app.
- Update the note about using lookbehind assertions on Safari.
1.0.0-dev.2 #
- Bump text_parser to 1.2.0-dev.2.
- Contains a breaking change in
UrlMatcher
.UrlMatcher
no longer matches URLs not starting with http(s).- Use the new
UrlLikeMatcher
instead if necessary.
- Contains a breaking change in
- Update the example app.
- Update the note about using lookbehind assertions on Safari.
1.0.0-dev.1 #
- Add support for using an external parser.
- Add typedef for gesture callbacks.
- Bump text_parser to 1.2.0-dev.1.
- No workaround is necessary any more to use lookbehind assertions.
- Add and improve tests.
- Improve documentation.
0.8.0 #
- Breaking:
- Raise minimum Flutter SDK version to 3.7.0.
- Remove
CustomText.selectable
that had been deprecated since 0.6.0. (#24) - Handler functions now get
GestureDetails
object instead of matcher type and text. (#25)- This is for supporting wider use cases.
instead ofonTap: (details) { print(details.element.matcherType); print(details.actionText); // or more print(details.shownText); print(details.gestureKind); print(details.globalPosition); ... }
onTap: (type, text) { print(type); print(text); }
- This is for supporting wider use cases.
- Integrate
CustomTextEditingController
intocustom_text.dart
.- Use
instead ofimport 'package:custom_text/custom_text.dart';
import 'package:custom_text/custom_text_editing_controller.dart';
- Use
- New:
- Add
onGesture
. (#27)- This handler supports secondary and tertiary buttons and mouse enter and exit events.
- Add
- Expose the base definition class.
- Expose the typedefs of builders of
SelectiveDefinition
andSpanDefinition
. - Internal refactorings.
0.7.0 #
- Raise minimum Flutter SDK version to 3.3.0.
- Refactor
TextSpanNotifier
to make it easier to add features in future versions. - Remove an inappropriate condition from didUpdateWidget.
- Add screenshots to pubspec.yaml.
0.6.1 #
- Fix
Definition
andParserOptions
to use alsoruntimeType
forhashCode
calculation. - Remove override of
toString()
fromParserOptions
. - Make sure that null is not passed to the following parameters:
labelSelector
of SelectiveDefinitionbuilder
of SpanDefinition
- Use text_parser 0.4.2.
- Update example app.
0.6.0 #
- New:
- Maybe breaking:
- Use
hoverStyle
while being pressed iftapStyle
is not provided.
- Use
- Many bug fixes, improvements and major refactors. (eb0e6f7, 760cb45, #12, #15, etc)
- Please see the history of dev versions for details.
- Require Flutter >=3.0.0.
- Bump text_parser to 0.4.1.
- Depend on meta.
- Update dependencies.
0.6.0-dev.6 #
- Bump text_parser to 0.4.0.
- Fix issue where changes of some properties were not reflected. (#22)
0.6.0-dev.5 #
- Maybe breaking:
- Use
hoverStyle
while being pressed iftapStyle
is not provided.
- Use
- Suppress error caused by updates of value after dispose().
- Add test for behaviour on hover without
hoverStyle
. - Improve documentation, example app, etc.
0.6.0-dev.4 #
- Require Flutter >=3.0.0.
- Deprecate:
CustomText.selectable
constructor is now deprecated. (#19)- Use SelectionArea on Flutter 3.3 and above.
- If SelectionArea is insufficient, use CustomTextEditingController and TextField with
readOnly: true
.
- New (experimental):
- Add
debounceDuration
toCustomTextEditingController
for somewhat better performance with long text. (#20)
- Add
- Fix behaviour of
CustomTextEditingController
when text spans are rebuilt while one of them is hovered/pressed on. - Discard gesture recognizers more thoroughly.
- Add tests for
CustomTextEditingController
. - Minor refactoring.
0.6.0-dev.3 #
- Add tests for
CustomText.selectable
. - Suppress warnings in Flutter 3.
- Minor refactoring.
- Update lint rules.
- Update and improve the example app.
- Improve documentation.
0.6.0-dev.2 #
- Fix issue of persistent hover style.
- Update text_parser to 0.3.3.
- Minor improvements.
0.6.0-dev.1 #
0.5.1 #
- Bump text_parser to 0.3.2.
- Minor improvements.
0.5.0 #
0.4.0 #
- New:
- Add
ParserOptions
for tweaking RegExp settings. - Add
parserOptions
parameter toCustomText
. - Add
LinkMatcher
.
- Add
- Depend on text_parser >=0.2.0.
0.3.1 #
- Fix to allow dynamic update of text.
0.3.0 #
- Breaking change:
- Use the
mouseCursor
property ofTextSpan
for changing the mouse cursor. (#4)cursorOnHover
, which was experimental, was removed fromCustomText
.mouseCursor
was added toTextDefinition
andSelectiveDefinition
.
- Use the
- Deprecate:
onLongTap
is now deprecated; useonLongPress
instead.
- New:
- Add
hoverStyle
toCustomText
,TextDefinition
andSelectiveDefinition
.
- Add
- Refactoring and enhancement:
- Improve management of tap state.
- Prevent unnecessary rebuilds and duplicate recognizer creations.
- Update example project.
0.2.0 #
- Fix the error of undefined
SystemMouseCursor
on Flutter 2.2. (#2)- Requires Flutter >=2.2.0.
- Several minor changes.
0.1.2 #
- Fix and improve documentation.
0.1.1 #
- Fix to properly dispose of
TapGestureRecognizer
. - Remove note on web limitations.
- Refactoring and some improvements.
- New (experimental):
- Add feature to change mouse cursor on hover over clickable element.
0.1.0 #
- Bump text_parser to 0.1.2.
- Migrate to null safety.
0.0.3 #
- Add tests.
- Bump text_parser to 0.0.5.
- Change minimum Dart SDK version to 2.8.1 to match text_parser.
- Workaround for Flutter issue.
- Improve documentation and examples.
0.0.2 #
- Fix broken links in README files.
0.0.1 #
- Initial version.