chore: format code

This commit is contained in:
fiatcode 2026-04-30 15:39:19 +07:00
parent bbd51d1c35
commit d673f01a2d
No known key found for this signature in database
2 changed files with 45 additions and 18 deletions

View file

@ -91,17 +91,19 @@ class _MainScreenState extends State<MainScreen> {
bool success;
if (newState) {
success = await LocationBridge.startTracking(config: {
'serverUrl': Preferences.serverUrl,
'deviceId': Preferences.deviceId,
'password': Preferences.password,
'accuracy': Preferences.accuracy,
'distanceFilter': Preferences.distanceFilter,
'interval': Preferences.interval,
'heartbeat': Preferences.heartbeat,
'offlineBuffer': Preferences.offlineBuffer,
'stopDetection': Preferences.stopDetection,
});
success = await LocationBridge.startTracking(
config: {
'serverUrl': Preferences.serverUrl,
'deviceId': Preferences.deviceId,
'password': Preferences.password,
'accuracy': Preferences.accuracy,
'distanceFilter': Preferences.distanceFilter,
'interval': Preferences.interval,
'heartbeat': Preferences.heartbeat,
'offlineBuffer': Preferences.offlineBuffer,
'stopDetection': Preferences.stopDetection,
},
);
} else {
success = await LocationBridge.stopTracking();
}
@ -112,7 +114,11 @@ class _MainScreenState extends State<MainScreen> {
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(previousState ? 'Failed to stop tracking' : 'Failed to start tracking'),
content: Text(
previousState
? 'Failed to stop tracking'
: 'Failed to start tracking',
),
),
);
}