Future<int> waitForAppToSettle({ Duration duration = const Duration(milliseconds: 100), Duration timeout = const Duration(seconds: 30), });