track method

Future<BKTResult<void>> track(
  1. String goalId, {
  2. double? value,
})

Implementation

Future<BKTResult<void>> track(
  String goalId, {
  double? value,
}) async {
  return await statusGuard(
    await _invokeMethod(
      CallMethods.track.name,
      argument: {
        'goalId': goalId,
        'value': value,
      },
    ),
  ).onError((Object error, stackTrace) {
    debugPrint("track fail: ${error.toString()}");
    return error.toBKTResultFailure();
  });
}