startUserSession static method

Future<bool> startUserSession(
  1. String userID
)

Starts the user session in the application.

Parameters:

  • userID: The user ID associated with the session.

Returns a Future that completes with a bool value of true if the user session has been started successfully.

Implementation

static Future<bool> startUserSession(String userID) async {
  bool flag = false;
  try {
    flag = await _hyperSnapSDKChannel
        .invokeMethod(HyperSnapSDKConstants.startUserSession, {
      HyperSnapSDKConstants.userId: userID,
    });
  } catch (e) {
    log(e.toString());
  }
  return flag;
}