getMaxUsers method

Future<int> getMaxUsers()

Asynchronously retrieves the maximum number of users from the native platform.

This method invokes a native method SmartfaceMobile.getMaxUsers and returns the result. If the response indicates a failure (left side), it returns 0. Otherwise, it returns the value from the right side of the response.

Returns:

  • A Future that completes with an int representing the maximum number of users.

Implementation

Future<int> getMaxUsers() async {
  final response = await invokeNativeMethod('SmartfaceMobile.getMaxUsers');

  if (response.isLeft()) {
    return 0;
  }

  return response.asRight;
}