feat: Implement new sign in flow
This commit is contained in:
parent
f7932639e2
commit
4d7f0295ca
19 changed files with 944 additions and 559 deletions
|
|
@ -2,6 +2,7 @@ import 'dart:io';
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:http/http.dart';
|
||||
import 'package:matrix/encryption.dart';
|
||||
|
|
@ -57,6 +58,15 @@ extension LocalizedExceptionExtension on Object {
|
|||
if (this is InvalidPassphraseException) {
|
||||
return L10n.of(context).wrongRecoveryKey;
|
||||
}
|
||||
if (this is PlatformException) {
|
||||
if ((this as PlatformException).code == 'CANCELED') {
|
||||
return L10n.of(context).theProcessWasCanceled;
|
||||
}
|
||||
final message = (this as PlatformException).message;
|
||||
if (message != null) {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
if (this is BadServerLoginTypesException) {
|
||||
final serverVersions = (this as BadServerLoginTypesException)
|
||||
.serverLoginTypes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue