0

In flutter integration test i want to verify if certain radio button is selected.

Here is my app code of the radio button looks like: enter image description here

,

This is the mobile view of radio button

enter image description here

And here is how i'm accessing that widget and printing its groupValue in my flutter integration test.

testWidgets('TC_22 Verify app security UI', (tester) async {
.....
    Radio<bool> appSecurityRadio = find
        .byKey(const ValueKey(WidgetKeys.appSecurityRadio))
        .at(0)
        .evaluate()
        .single
        .widget as Radio<bool>;
    SLogger.i('appSecurityRadio.groupValue: ${appSecurityRadio.groupValue}');
}

But its printing always false.

Can anybody help on how to tackle with this?

Jagadeesh
  • 358
  • 5
  • 17

0 Answers0