A simple and reusable FlutterFlow-compatible custom action that detects when your app resumes from the background and executes defined logic.
Built with WidgetsBindingObserver, it provides a debounced, stable lifecycle callback to refresh sessions, reload data, or trigger background syncs automatically.
Features
- Detects app resume events reliably.
- Debounces quick consecutive triggers.
- Works seamlessly within FlutterFlow custom actions.
- Supports easy integration for background handling logic.
Usage
- Call
checkBackgroundResume()afterWidgetsFlutterBinding.ensureInitialized()in your main app initialization. - Add your desired logic inside the
onResumecallback. - Optionally, call
dispose()if you want to stop listening to lifecycle changes.
Example
await checkBackgroundResume();
This page mirrors the repository's own README, with GitHub's boilerplate and its contributor-facing sections removed. Read it at the source ↗