getAccuracy method

  1. @override
Future<int> getAccuracy(
  1. double toleranceCents
)
override

Implementation

@override
Future<int> getAccuracy(double toleranceCents) async {
  try {
    final result = await _methodChannel.invokeMethod<int>('getAccuracy', {
      'toleranceCents': toleranceCents,
    });
    return result ?? 0;
  } on PlatformException catch (e) {
    throw Exception("Failed to get accuracy: ${e.message}");
  }
}