showTabBarRedDot

Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { showTabBarRedDot } from '@ray-js/ray';

// Promise usage
try {
  const res = await showTabBarRedDot({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
showTabBarRedDot(params: )

Description

Show the red dot at the top-right corner of a tabBar item

Parameters

PropertyTypeRequiredDescription
indexnumberYesWhich tabBar item, counting from the left
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { showTabBarRedDot } from '@ray-js/ray'

showTabBarRedDot({
  index: 0,
  success: data => { console.log(data); },
  fail: error => { console.error(error); },
});