inner class StateObserver : LifecycleObserver
A LifeCycleObserver that ensures our program looks and behaves correctly with lifecycle changes i.e. ensure the right FloatingActionButton icon is set and ensure we don't flash when the user leaves the app
| StateObserver()A LifeCycleObserver that ensures our program looks and behaves correctly with lifecycle changes i.e. ensure the right FloatingActionButton icon is set and ensure we don't flash when the user leaves the app | 
| fun onPause(): UnitOn pausing make sure we stop flashing | |
| fun onResume(): UnitOn resuming we reset the drawable image to its correct icon |