Skip to content

Commit

Permalink
feat: dart format
Browse files Browse the repository at this point in the history
  • Loading branch information
VincePaulin committed Apr 23, 2024
1 parent b52827a commit c746b8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/pages/login/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LoginController extends State<Login> {
HomeserverSummary? loginHomeserverSummary;
bool _supportsFlow(String flowType) =>
loginHomeserverSummary?.loginFlows.any((flow) => flow.type == flowType) ??
false;
false;

bool get supportsSso => _supportsFlow('m.login.sso');

Expand Down Expand Up @@ -71,7 +71,7 @@ class LoginController extends State<Login> {
void checkUserQueueState(String sessionToken) async {
try {
final Map<String, dynamic> queueStatus =
await getQueueStatus(sessionToken);
await getQueueStatus(sessionToken);
final String userState = queueStatus['userState'];

if (userState == 'CREATED') {
Expand Down Expand Up @@ -185,14 +185,14 @@ class LoginController extends State<Login> {

// Creation of an UpdateLoginFlowWithPasswordMethod object with identifiers
final updateLoginFlowWithPasswordMethod =
UpdateLoginFlowWithPasswordMethod((builder) => builder
..identifier = email
..method = 'password'
..password = password);
UpdateLoginFlowWithPasswordMethod((builder) => builder
..identifier = email
..method = 'password'
..password = password);

// Create an UpdateLoginFlowBodyBuilder object and assign it the UpdateLoginFlowWithPasswordMethod object
final updateLoginFlowBody = UpdateLoginFlowBody(
(builder) => builder
(builder) => builder
..oneOf = OneOf.fromValue1(value: updateLoginFlowWithPasswordMethod),
);

Expand Down Expand Up @@ -233,7 +233,7 @@ class LoginController extends State<Login> {
setState(() => passwordError = errorMessage);
} else {
setState(
() => passwordError = L10n.of(context)!.errTryAgain,
() => passwordError = L10n.of(context)!.errTryAgain,
);
}
return setState(() => loading = false);
Expand Down Expand Up @@ -398,4 +398,4 @@ class LoginController extends State<Login> {
return LoginView(this);
}
}
}
}
3 changes: 1 addition & 2 deletions lib/pages/register/register.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class RegisterController extends State<Register> {

// Check that the password matches the regex
if (!_validatePasswordLength(passwordController.text)) {
setState(
() => passwordError = L10n.of(context)?.registerPasswordError);
setState(() => passwordError = L10n.of(context)?.registerPasswordError);
return false;
}

Expand Down

0 comments on commit c746b8f

Please sign in to comment.