Commit b21959d
fix: add error handling for launchUrl in Map screen
The OpenStreetMap attribution link in map_screen.dart called
launchUrl() directly with no canLaunchUrl check and no error
handling. If the URL fails to launch for any reason, the app
throws an unhandled exception and crashes.
Added canLaunchUrl check and logger.e() for the failure case,
consistent with how the same issue is already handled in
about_us_screen.dart, faq_screen.dart and connect_device_screen.dart.
Fixes #34001 parent 8983e11 commit b21959d
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
0 commit comments