getMobId static method

Future getMobId(
  1. MLSDKScene scene,
  2. dynamic result(
    1. String mobid,
    2. String domain,
    3. MLSDKError error
    )?
)

Implementation

static Future<dynamic> getMobId(MLSDKScene scene,
    Function(String mobid, String domain, MLSDKError error)? result) {
  Map args = {"path": scene.path, "params": scene.params};
  Future? callback = Moblink.sharedInstance()
      ._channel
      ?.invokeMethod(MobLinkMethods.getMobId.name!, args);

  callback?.then((dynamic response) {
    if (result != null) {
      result(response["mobid"], response["domain"],
          MLSDKError(rawData: response["error"]));
    }
  });
  return callback!;
}