static Future setUserId(String userId) async { try { await _channel.invokeMethod('setUserId', {"userId": userId}); } on PlatformException catch (e) { print("Got error: $e"); } }