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 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class LocationBridge {
|
||||
|
|
@ -16,7 +17,7 @@ class LocationBridge {
|
|||
final result = await _methodChannel.invokeMethod<bool>('startTracking');
|
||||
return result ?? false;
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to start tracking: ${e.message}');
|
||||
debugPrint('Failed to start tracking: ${e.message}');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +27,7 @@ class LocationBridge {
|
|||
final result = await _methodChannel.invokeMethod<bool>('stopTracking');
|
||||
return result ?? false;
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to stop tracking: ${e.message}');
|
||||
debugPrint('Failed to stop tracking: ${e.message}');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +40,7 @@ class LocationBridge {
|
|||
);
|
||||
return result ?? false;
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to update config: ${e.message}');
|
||||
debugPrint('Failed to update config: ${e.message}');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,7 +50,7 @@ class LocationBridge {
|
|||
final result = await _methodChannel.invokeMethod<Map>('getStatus');
|
||||
return result?.cast<String, dynamic>();
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to get status: ${e.message}');
|
||||
debugPrint('Failed to get status: ${e.message}');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||
|
||||
Widget _buildAccuracyDropdown() {
|
||||
return DropdownButtonFormField<int>(
|
||||
// ignore: deprecated_member_use
|
||||
value: _accuracy,
|
||||
decoration: const InputDecoration(labelText: 'Accuracy'),
|
||||
items: const [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue