login method

Future<bool> login(
  1. String userId,
  2. LoginType operateType
)

用户登录或退出 userId 用户名(也可以是手机号) operateType // 1登录,2退出

Implementation

Future<bool> login(String userId, LoginType operateType) async {
  if (!_supportPlatform || !isInitialize) return false;
  final bool? state = await _channel.invokeMethod<bool>(
      'login', {'userId': userId, 'operateType': operateType.index + 1});
  return state ?? false;
}