flutter_fgbg_lego 1.0.2
flutter_fgbg_lego: ^1.0.2 copied to clipboard
lego that notify when the app goes into the background or comes to the foreground
flutter_fgbg_lego #
lego that notify when the app goes into the background or comes to the foreground
Installation #
- open terminal in the lego project root directory, enter the following command for install cli. and create a new lego project if you don't have one.
flutter pub global activate lego_cli
lego create
- in terminal, enter the following command for add lego to project.
lego add flutter_fgbg_lego
Usage #
You can always listen to the app's state changes through the following code.
EasyEventBus.on('App is in foreground', (event) {
// write your code here when the app is in the foreground.
});
EasyEventBus.on('App is in background', (event) {
// write your code here when the app is in the background.
});