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:
,
This is the mobile view of radio button
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?