fix: use debugPrint instead of print, ignore deprecated value param
This commit is contained in:
parent
07bae466cf
commit
cb8c1ab43b
2 changed files with 7 additions and 5 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class LocationBridge {
|
class LocationBridge {
|
||||||
|
|
@ -16,7 +17,7 @@ class LocationBridge {
|
||||||
final result = await _methodChannel.invokeMethod<bool>('startTracking');
|
final result = await _methodChannel.invokeMethod<bool>('startTracking');
|
||||||
return result ?? false;
|
return result ?? false;
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
print('Failed to start tracking: ${e.message}');
|
debugPrint('Failed to start tracking: ${e.message}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -26,7 +27,7 @@ class LocationBridge {
|
||||||
final result = await _methodChannel.invokeMethod<bool>('stopTracking');
|
final result = await _methodChannel.invokeMethod<bool>('stopTracking');
|
||||||
return result ?? false;
|
return result ?? false;
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
print('Failed to stop tracking: ${e.message}');
|
debugPrint('Failed to stop tracking: ${e.message}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +40,7 @@ class LocationBridge {
|
||||||
);
|
);
|
||||||
return result ?? false;
|
return result ?? false;
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
print('Failed to update config: ${e.message}');
|
debugPrint('Failed to update config: ${e.message}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +50,7 @@ class LocationBridge {
|
||||||
final result = await _methodChannel.invokeMethod<Map>('getStatus');
|
final result = await _methodChannel.invokeMethod<Map>('getStatus');
|
||||||
return result?.cast<String, dynamic>();
|
return result?.cast<String, dynamic>();
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
print('Failed to get status: ${e.message}');
|
debugPrint('Failed to get status: ${e.message}');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -60,4 +61,4 @@ class LocationBridge {
|
||||||
);
|
);
|
||||||
return _locationStream!;
|
return _locationStream!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,6 +139,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||||
|
|
||||||
Widget _buildAccuracyDropdown() {
|
Widget _buildAccuracyDropdown() {
|
||||||
return DropdownButtonFormField<int>(
|
return DropdownButtonFormField<int>(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
value: _accuracy,
|
value: _accuracy,
|
||||||
decoration: const InputDecoration(labelText: 'Accuracy'),
|
decoration: const InputDecoration(labelText: 'Accuracy'),
|
||||||
items: const [
|
items: const [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue