fix los init localization

chore/offband-rebrand
just_stuff_tm 5 months ago
parent ea1d728d4f
commit 515b9c1f29

@ -73,6 +73,7 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
bool _showMarkerLabels = true;
bool _didReceivePositionUpdate = false;
int _losRequestNonce = 0;
bool _initialLosScheduled = false;
@override
void initState() {
@ -83,7 +84,16 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
_end = widget.candidates[1];
}
}
_runLos();
_scheduleInitialRun();
}
void _scheduleInitialRun() {
if (_initialLosScheduled) return;
_initialLosScheduled = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
_runLos();
});
}
@override

@ -1140,4 +1140,4 @@ packages:
version: "3.1.3"
sdks:
dart: ">=3.10.3 <4.0.0"
flutter: ">=3.38.4"
flutter: ">=3.38.4"

Loading…
Cancel
Save

Powered by TurnKey Linux.