getJid static method
Retrieves the JID associated with the given username
.
The username
parameter is the unique identifier of the user.
Returns a Future that completes with the JID as a String on success,
or null
if there's an error or the JID is not found.
Throws an ArgumentError if username
is null
.
Example usage:
String? jid = await Mirrorfly.getJid(username: 'xxxxxx');
if (jid != null) {
print('JID retrieved successfully: $jid');
} else {
print('Failed to retrieve JID for username: $username');
}
Implementation
static Future<String?> getJid({required String username}) {
return FlyChatFlutterPlatform.instance.getJid(username);
}