getHmsToken static method

Future<String> getHmsToken()

@return Token of Huawei PushKit used by Pushe and empty if anything was wrong or active service wasn't HMS

NOTE: HMS is an optional instance and you need to enable it by adding implementation("co.pushe.plus:hms:$latest") in dependencies {} of android/build.gradle

Implementation

static Future<String> getHmsToken() async {
  if(!Platform.isAndroid) return "";
  return await _channel.invokeMethod("Pushe.getHmsToken") ?? "";
}