I am developing a Flutter app, and I keep seeing this warning in my logs when pressing the back button:
W/WindowOnBackDispatcher(5979): sendCancelIfRunning: isInProgress=false callback=io.flutter.embedding.android.FlutterActivity$1@3957dc5
Questions:
- What does this warning mean?
- How can I resolve it or safely ignore it?
- Does this affect my app’s UI performance?
Flutter Version: (Run flutter doctor -v
and include the output)
Device/Emulator: (Specify if it happens only on an emulator or real device)
Android Version: (Mention the Android OS version you are testing on)
What I Have Tried
- Checked
WillPopScope
implementation:WillPopScope( onWillPop: () async { if (Navigator.of(context).canPop()) { Navigator.of(context).pop(); return false; } return true; }, child: Scaffold( appBar: AppBar(title: Text("Back Handling")), body: Center(child: Text("Press Back")), ), );
- Ran
flutter upgrade
to ensure I have the latest version. - Tried running on both an emulator and a physical device, but the warning still appears.
- Checked
MainActivity.kt
, but I am not overriding any back button behavior.
I am developing a Flutter app, and I keep seeing this warning in my logs when pressing the back button:
W/WindowOnBackDispatcher(5979): sendCancelIfRunning: isInProgress=false callback=io.flutter.embedding.android.FlutterActivity$1@3957dc5
Questions:
- What does this warning mean?
- How can I resolve it or safely ignore it?
- Does this affect my app’s UI performance?
Flutter Version: (Run flutter doctor -v
and include the output)
Device/Emulator: (Specify if it happens only on an emulator or real device)
Android Version: (Mention the Android OS version you are testing on)
What I Have Tried
- Checked
WillPopScope
implementation:WillPopScope( onWillPop: () async { if (Navigator.of(context).canPop()) { Navigator.of(context).pop(); return false; } return true; }, child: Scaffold( appBar: AppBar(title: Text("Back Handling")), body: Center(child: Text("Press Back")), ), );
- Ran
flutter upgrade
to ensure I have the latest version. - Tried running on both an emulator and a physical device, but the warning still appears.
- Checked
MainActivity.kt
, but I am not overriding any back button behavior.
1 Answer
Reset to default 0You can safely ignore this warning unless you notice unexpected behavior in back navigation. It does not affect UI performance and is mainly a log message.
If you want a solution, then:
WillPopScope(
onWillPop: () async {
if (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
} else {
SystemNavigator.pop(); // You can close the app cleanly
}
return false; // Prevents Flutter from processing the back event further
},
child: Scaffold(
appBar: AppBar(title: Text("Back Handling")),
body: Center(child: Text("Press Back")),
),
);
This ensures that when there are no more screens to pop, SystemNavigator.pop()
exits the app gracefully, preventing the warning.