init static method

void init(
  1. Map map,
  2. TTGatewayInitCallback callback,
  3. TTGatewayFailedCallback failedCallback
)

Implementation

static void init(
  Map map,
  TTGatewayInitCallback callback,
  TTGatewayFailedCallback failedCallback,
) {
  if (map["uid"] != null) {
    map["ttlockUid"] = map["uid"];
  }
  if (map["ttlockLoginPassword"] == null) {
    map["ttlockLoginPassword"] = "123456";
  }

  map[TTResponse.addGatewayJsonStr] = convert.jsonEncode(map);
  TTLock.invoke(COMMAND_INIT_GATEWAY, map, callback, fail: failedCallback);
}