fix: use debugPrint instead of print, ignore deprecated value param

This commit is contained in:
fiatcode 2026-04-30 11:55:52 +07:00
parent 07bae466cf
commit cb8c1ab43b
No known key found for this signature in database
2 changed files with 7 additions and 5 deletions

View file

@ -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;
}
}
@ -60,4 +61,4 @@ class LocationBridge {
);
return _locationStream!;
}
}
}