Conversation
i-kumar
left a comment
There was a problem hiding this comment.
You did more than just adjust the auto refreshing. Edit your PR description to include what else changed (like the fact that you had to adjust the android files)
| versionCode = flutter.versionCode | ||
| versionName = flutter.versionName | ||
| resValue("string", "google_maps_api_key", localProperties.getProperty("GOOGLE_MAPS_API_KEY")) | ||
| resValue("string", "google_maps_api_key", localProperties.getProperty("GOOGLE_MAPS_API_KEY") ?: "") |
There was a problem hiding this comment.
why did you change it so that if there's no key, it results in ""? We want the code to only compile if there's a key
|
There is some weird behavior with minimizing the app (tested with android simulator). The timer still ticks once or twice but due to the app being in the background the network request fails. When the app is opened again it shows the failed to load state. If the app is minimized for a while it will immediately refresh upon reopening, but then the timer might fire again before 30s has passed (it happened after 5-ish seconds once for me). I'd recommend starting and stopping the timer based on the state of the app (look at |
This does the refresh automatically for the times when clicking a bus stop:
Added the timer with the function to initialize the state and an override so if you leave the page, it would stop the timer. I also made changes to the build.gradle.kts in the \app file because when I was trying to make my emulator run, it was having issues due to Kotlin not being updated, so I asked Geminai, and that's the file change.