Infinite loading after enabling the button

Hi Team,

I am using appium flutter driver with wdio to automate my testScripts for mobile application.

await driver.execute('flutter:waitFor', find.byValueKey('push_notification_false')); // initial state is disable
await driver.elementClick(find.byValueKey(''push_notification_false')); // click to enable the state of notification
await driver.execute('flutter:waitFor', find.byValueKey('push_notification_true'));

For IOS it is not working fine. After performing second command, it goes to infinite loading due to which it is not going to the next line of code.

Any idea how can I solve this issue?
Any inputs will be appreciated :slight_smile:
Thanks!