refactor: Added and applied require_trailing_commas linter rule
This commit is contained in:
parent
adb3f766e5
commit
ec7acc5385
112 changed files with 3466 additions and 2855 deletions
|
|
@ -118,8 +118,9 @@ class ConnectPageController extends State<ConnectPage> {
|
|||
List<IdentityProvider>? get identityProviders {
|
||||
final loginTypes = _rawLoginTypes;
|
||||
if (loginTypes == null) return null;
|
||||
final rawProviders = loginTypes.tryGetList('flows')!.singleWhere((flow) =>
|
||||
flow['type'] == AuthenticationTypes.sso)['identity_providers'];
|
||||
final rawProviders = loginTypes.tryGetList('flows')!.singleWhere(
|
||||
(flow) => flow['type'] == AuthenticationTypes.sso,
|
||||
)['identity_providers'];
|
||||
final list = (rawProviders as List)
|
||||
.map((json) => IdentityProvider.fromJson(json))
|
||||
.toList();
|
||||
|
|
@ -163,9 +164,11 @@ class ConnectPageController extends State<ConnectPage> {
|
|||
RequestType.GET,
|
||||
'/client/r0/login',
|
||||
)
|
||||
.then((loginTypes) => setState(() {
|
||||
_rawLoginTypes = loginTypes;
|
||||
}));
|
||||
.then(
|
||||
(loginTypes) => setState(() {
|
||||
_rawLoginTypes = loginTypes;
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,17 +174,20 @@ class ConnectPageView extends StatelessWidget {
|
|||
)
|
||||
: Image.network(
|
||||
Uri.parse(identityProviders.single.icon!)
|
||||
.getDownloadLink(Matrix.of(context)
|
||||
.getLoginClient())
|
||||
.getDownloadLink(
|
||||
Matrix.of(context).getLoginClient(),
|
||||
)
|
||||
.toString(),
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
onPressed: () => controller
|
||||
.ssoLoginAction(identityProviders.single.id!),
|
||||
label: Text(identityProviders.single.name ??
|
||||
identityProviders.single.brand ??
|
||||
L10n.of(context)!.loginWithOneClick),
|
||||
label: Text(
|
||||
identityProviders.single.name ??
|
||||
identityProviders.single.brand ??
|
||||
L10n.of(context)!.loginWithOneClick,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Wrap(
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ class SsoButton extends StatelessWidget {
|
|||
: Image.network(
|
||||
Uri.parse(identityProvider.icon!)
|
||||
.getDownloadLink(
|
||||
Matrix.of(context).getLoginClient())
|
||||
Matrix.of(context).getLoginClient(),
|
||||
)
|
||||
.toString(),
|
||||
width: 32,
|
||||
height: 32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue