-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
I am trying to fetch text from RichText widget with driver.getText function on . I am using get text as below :
expect(await world.driver.getText(find.byValueKey(widgetkey)), searchtext);
We are writing RichText code like below example:
_text = RichText(
key: WidgetKeys.XYZScreenText,
text: TextSpan(
children: [
TextSpan(
text: translate(context, StringKeys.xyzInfoText1),
style: appTextTheme(context)
.bodyText2
.apply(color: AMBColors.bodyText)),
TextSpan(
text: translate(context, StringKeys.xyzInfoText2),
style:
TextStyles.body2Bold.apply(color: AMBColors.bodyText)),
],
),
);
I tried it on master as well as stable flutter channel. But still I am facing exception
Exception: DriverError: Error in Flutter application: Uncaught extension error while executing get_text: Unsupported operation: Type RichText is currently not supported by getText
