getIsHost method

Future<bool> getIsHost()

Determine whether the user is the host.
Return true indicates that the user is the host, otherwise false.

Implementation

Future<bool> getIsHost() async {
  var params = <String, dynamic>{};
  params.putIfAbsent("userId", () => userId);

  return await methodChannel
      .invokeMethod<bool>('isHost', params)
      .then<bool>((bool? value) => value ?? false);
}