Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.3.3
* bugfix: correct printing of unicode/emoji chars

## 0.3.2
* bugfix: avoid an exception when adding a new `TextItem`

## 0.3.1
* Added null safety

Expand Down
6 changes: 3 additions & 3 deletions lib/circular_text/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class _CircularTextPainter extends CustomPainter {
canvas.save();
List<TextPainter> _charPainters = [];
Text text = textItem.text;
for (final char in text.data!.split("")) {
for (final int rune in text.data!.runes) {
_charPainters.add(TextPainter(
text: TextSpan(text: char, style: text.style),
text: TextSpan(text: String.fromCharCode(rune), style: text.style),
textDirection: textDirection)
..layout());
}
Expand Down Expand Up @@ -151,7 +151,7 @@ class _CircularTextPainter extends CustomPainter {
bool isTextItemsChanged() {
bool isChanged = false;
for (int i = 0; i < children.length; i++) {
if (children[i].isChanged(oldDelegate.children[i])) {
if (i >= oldDelegate.children.length || children[i].isChanged(oldDelegate.children[i])) {
isChanged = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_circular_text
description: Flutter package which places text in a curved circular path.
version: 0.3.1
version: 0.3.3
homepage: https://github.com/faob-dev/flutter_circular_text

environment:
Expand Down