login method
Logs in with the specified value.
This method invokes the native method login with the provided email.
Throws a PlatformException if the login fails.
value: The email address of the user to log in.
Implementation
Future<void> login(String value) async {
if(Platform.isAndroid){
try {
await methodChannel.invokeMethod('login', {"email": value});
} on PlatformException catch (e) {
print("Failed to send attribute: '${e.message}'.");
}}
else if(Platform.isIOS){
try {
// Sending the identity to the iOS side
await methodChannel.invokeMethod('login', {'email': value});
print("Identity Sent: $value");
} on PlatformException catch (e) {
print("Failed to send identity: '${e.message}'.");
}
}
}