feat: Nicer registration form
This commit is contained in:
parent
d3a54c8911
commit
661b740f57
6 changed files with 241 additions and 119 deletions
|
|
@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'uia_request_manager.dart';
|
||||
|
||||
extension LocalizedExceptionExtension on Object {
|
||||
String toLocalizedString(BuildContext context) {
|
||||
if (this is MatrixException) {
|
||||
|
|
@ -48,6 +50,7 @@ extension LocalizedExceptionExtension on Object {
|
|||
if (this is MatrixConnectionException || this is SocketException) {
|
||||
return L10n.of(context).noConnectionToTheServer;
|
||||
}
|
||||
if (this is UiaException) return toString();
|
||||
Logs().w('Something went wrong: ', this);
|
||||
return L10n.of(context).oopsSomethingWentWrong;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue