Skip to content
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.0.18
* Made `AnnotatedText` accessible

## 0.0.17
* Added debouncer
* Added all sizes, paddings, radiusses and dimensions
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: dcc_toolkit
description: "Internal toolkit package used by the DCC team."
version: 0.0.17
version: 0.0.18
homepage: https://dutchcodingcompany.com
repository: https://github.com/DutchCodingCompany/dcc_toolkit

Expand Down
16 changes: 8 additions & 8 deletions test/ui/annotated_text_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ void main() {
),
);

// Get the only RichText widget in the tree
final richTextWidget = tester.widget<RichText>(find.byType(RichText));
final rootSpan = richTextWidget.text as TextSpan;
// Get the Text widget that uses Text.rich
final textWidget = tester.widget<Text>(find.byType(Text));
final rootSpan = textWidget.textSpan! as TextSpan;

// Combine all spans into a single string
final fullText = rootSpan.children!.map((span) => (span as TextSpan).text).join();
Expand All @@ -42,8 +42,8 @@ void main() {
),
);

final richText = tester.widget<RichText>(find.byType(RichText));
final rootSpan = richText.text as TextSpan;
final textWidget = tester.widget<Text>(find.byType(Text));
final rootSpan = textWidget.textSpan! as TextSpan;

final annotatedSpan = rootSpan.children![1]; // "world"
expect((annotatedSpan as TextSpan).style!.color, equals(annotationStyle.color));
Expand All @@ -61,9 +61,9 @@ void main() {
),
);

// Get the RichText widget
final richTextWidget = tester.widget<RichText>(find.byType(RichText));
final rootSpan = richTextWidget.text as TextSpan;
// Get the Text widget that uses Text.rich
final textWidget = tester.widget<Text>(find.byType(Text));
final rootSpan = textWidget.textSpan! as TextSpan;

// Locate the annotated span (second span in the children list)
final annotatedSpan = rootSpan.children![1] as TextSpan;
Expand Down