Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created September 9, 2025 08:32
Show Gist options
  • Select an option

  • Save YonatanKra/0d240d70e05568678ccb1586607ef882 to your computer and use it in GitHub Desktop.

Select an option

Save YonatanKra/0d240d70e05568678ccb1586607ef882 to your computer and use it in GitHub Desktop.
getBigCardText
String? getBigCardText(WidgetTester tester) {
final bigCard = find.byType(BigCard);
// Find the Text widget inside the BigCard
final textWidget = find.descendant(
of: bigCard,
matching: find.byType(Text),
);
// Get the actual text content from the rendered widget
final textWidgetInstance = tester.widget<Text>(textWidget);
return textWidgetInstance.data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment