refactor: Update sdk

This commit is contained in:
Christian Pauly 2020-12-11 10:27:38 +01:00
commit 11c2a8bb26
8 changed files with 58 additions and 75 deletions

View file

@ -26,7 +26,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
bool loading = false;
bool showPassword = true;
void _signUpAction(BuildContext context, {Map<String, dynamic> auth}) async {
void _signUpAction(BuildContext context, {AuthenticationData auth}) async {
var matrix = Matrix.of(context);
if (passwordController.text.isEmpty) {
setState(() => passwordError = L10n.of(context).pleaseEnterYourPassword);
@ -61,10 +61,13 @@ class _SignUpPasswordState extends State<SignUpPassword> {
true);
if (currentStage == 'm.login.dummy') {
_signUpAction(context, auth: {
'type': currentStage,
'session': exception.session,
});
_signUpAction(
context,
auth: AuthenticationData(
type: currentStage,
session: exception.session,
),
);
} else {
await Navigator.of(context).push(
AppRoute.defaultRoute(
@ -72,9 +75,10 @@ class _SignUpPasswordState extends State<SignUpPassword> {
AuthWebView(
currentStage,
exception.session,
() => _signUpAction(context, auth: {
'session': exception.session,
}),
() => _signUpAction(
context,
auth: AuthenticationData(session: exception.session),
),
),
),
);