setCounterPreferences method

  1. @override
Future<void> setCounterPreferences({
  1. required SMKitCounterPreferences counterPreferences,
  2. void onHandle(
    1. SMKitStatus p1
    )?,
})
override

Implementation

@override
Future<void> setCounterPreferences({
  required SMKitCounterPreferences counterPreferences,
  void Function(SMKitStatus p1)? onHandle,
}) async {
  try {
    final arg = {'counterPreferences': counterPreferences.name};
    // Fire and forget - don't await the result
    methodChannel.invokeMethod('setCounterPreferences', arg);
  } on PlatformException catch (e) {
    debugPrint('PlaformException: ${e.message}');
  }
}