loginWebChatViaQRCode static method
Future<void>
loginWebChatViaQRCode({
- required String barcode,
- required dynamic flyCallBack(
- FlyResponse response
Logs in to web chat using a QR code.
This method allows the user to authenticate a web chat session by scanning a QR code. A callback function is required to handle the response.
Parameters:
barcode(String, required): The scanned QR code data.flyCallBack(Function(FlyResponse response), required): A callback function that receives the login response.
Returns:
A Future<void> that completes once the login process is finished.
Usage example:
Mirrorfly.loginWebChatViaQRCode(
barcode: "scanned_qr_code",
flyCallBack: (response) {
// Handle login response
print("Login Response: ${response.status}");
},
);
Implementation
static Future<void> loginWebChatViaQRCode(
{required String barcode,
required Function(FlyResponse response) flyCallBack}) {
return FlyChatFlutterPlatform.instance
.loginWebChatViaQRCode(barcode, flyCallBack);
}