From 5d3b5fe9b34ded18c460c4d3d8f36aa6fe5e4feb Mon Sep 17 00:00:00 2001 From: Niels Rijnberg Date: Mon, 3 Nov 2025 12:51:53 +0100 Subject: [PATCH 1/2] Bump versions and add changelog --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50dce3d..688381a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.0.18 +* Made `AnnotatedText` accessible + ## 0.0.17 * Added debouncer * Added all sizes, paddings, radiusses and dimensions diff --git a/pubspec.yaml b/pubspec.yaml index 77f1cce..2753309 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 From 66ae48108ebed8e713f4e325b7c0439223cac2c0 Mon Sep 17 00:00:00 2001 From: Niels Rijnberg Date: Mon, 3 Nov 2025 12:58:51 +0100 Subject: [PATCH 2/2] Fix tests --- test/ui/annotated_text_test.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/ui/annotated_text_test.dart b/test/ui/annotated_text_test.dart index 9eba988..16baab6 100644 --- a/test/ui/annotated_text_test.dart +++ b/test/ui/annotated_text_test.dart @@ -16,9 +16,9 @@ void main() { ), ); - // Get the only RichText widget in the tree - final richTextWidget = tester.widget(find.byType(RichText)); - final rootSpan = richTextWidget.text as TextSpan; + // Get the Text widget that uses Text.rich + final textWidget = tester.widget(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(); @@ -42,8 +42,8 @@ void main() { ), ); - final richText = tester.widget(find.byType(RichText)); - final rootSpan = richText.text as TextSpan; + final textWidget = tester.widget(find.byType(Text)); + final rootSpan = textWidget.textSpan! as TextSpan; final annotatedSpan = rootSpan.children![1]; // "world" expect((annotatedSpan as TextSpan).style!.color, equals(annotationStyle.color)); @@ -61,9 +61,9 @@ void main() { ), ); - // Get the RichText widget - final richTextWidget = tester.widget(find.byType(RichText)); - final rootSpan = richTextWidget.text as TextSpan; + // Get the Text widget that uses Text.rich + final textWidget = tester.widget(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;