TF-1487 Apply linter rule
This commit is contained in:
@@ -27,63 +27,49 @@ class AuthenticationOIDCDataSourceImpl extends AuthenticationOIDCDataSource {
|
||||
return Future.sync(() async {
|
||||
final oidcResponse = await _oidcHttpClient.checkOIDCIsAvailable(oidcRequest);
|
||||
return oidcResponse!;
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<OIDCConfiguration> getOIDCConfiguration(OIDCResponse oidcResponse) {
|
||||
return Future.sync(() async {
|
||||
return await _oidcHttpClient.getOIDCConfiguration(oidcResponse);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<TokenOIDC> getTokenOIDC(String clientId, String redirectUrl, String discoveryUrl, List<String> scopes) {
|
||||
return Future.sync(() async {
|
||||
return await _authenticationClient.getTokenOIDC(clientId, redirectUrl, discoveryUrl, scopes);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<TokenOIDC> getStoredTokenOIDC(String tokenIdHash) {
|
||||
return Future.sync(() async {
|
||||
return await _tokenOidcCacheManager.getTokenOidc(tokenIdHash);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> persistTokenOIDC(TokenOIDC tokenOidc) {
|
||||
return Future.sync(() async {
|
||||
return await _tokenOidcCacheManager.persistOneTokenOidc(tokenOidc);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<OIDCConfiguration> getStoredOidcConfiguration() {
|
||||
return Future.sync(() async {
|
||||
return await _oidcConfigurationCacheManager.getOidcConfiguration();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> persistAuthorityOidc(String authority) {
|
||||
return Future.sync(() async {
|
||||
return await _oidcConfigurationCacheManager.persistAuthorityOidc(authority);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -101,27 +87,21 @@ class AuthenticationOIDCDataSourceImpl extends AuthenticationOIDCDataSource {
|
||||
discoveryUrl,
|
||||
scopes,
|
||||
refreshToken);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> logout(TokenId tokenId, OIDCConfiguration config) {
|
||||
return Future.sync(() async {
|
||||
return await _authenticationClient.logoutOidc(tokenId, config);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteAuthorityOidc() {
|
||||
return Future.sync(() async {
|
||||
return await _oidcConfigurationCacheManager.deleteAuthorityOidc();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -137,26 +117,20 @@ class AuthenticationOIDCDataSourceImpl extends AuthenticationOIDCDataSource {
|
||||
redirectUrl,
|
||||
discoveryUrl,
|
||||
scopes);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getAuthenticationInfo() {
|
||||
return Future.sync(() async {
|
||||
return await _authenticationClient.getAuthenticationInfo();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteTokenOIDC() {
|
||||
return Future.sync(() async {
|
||||
return await _tokenOidcCacheManager.deleteTokenOidc();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
@@ -14,26 +14,20 @@ class HiveAccountDatasourceImpl extends AccountDatasource {
|
||||
Future<Account> getCurrentAccount() {
|
||||
return Future.sync(() async {
|
||||
return await _accountCacheManager.getSelectedAccount();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setCurrentAccount(Account newCurrentAccount) {
|
||||
return Future.sync(() async {
|
||||
return await _accountCacheManager.setSelectedAccount(newCurrentAccount);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteCurrentAccount(String accountId) {
|
||||
return Future.sync(() async {
|
||||
return await _accountCacheManager.deleteSelectedAccount(accountId);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
@@ -24,9 +24,7 @@ class LoginUrlDataSourceImpl implements LoginUrlDataSource {
|
||||
recentLoginUrl.url,
|
||||
recentLoginUrl.toRecentLoginUrlCache());
|
||||
}
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -46,9 +44,7 @@ class LoginUrlDataSourceImpl implements LoginUrlDataSource {
|
||||
: listRecentUrl;
|
||||
|
||||
return newListRecentSUrl;
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
bool _filterRecentUrlCache(RecentLoginUrlCache recentLoginUrlCache, String? pattern) {
|
||||
|
||||
@@ -28,9 +28,7 @@ class LoginUsernameDataSourceImpl implements LoginUsernameDataSource {
|
||||
return listValidRecentUsername.length > newLimit
|
||||
? listValidRecentUsername.sublist(0, newLimit)
|
||||
: listValidRecentUsername;
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -44,9 +42,7 @@ class LoginUsernameDataSourceImpl implements LoginUsernameDataSource {
|
||||
await _recentLoginUsernameCacheClient.insertItem(recentLoginUsername.username,
|
||||
recentLoginUsername.toRecentLoginUsernameCache());
|
||||
}
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
bool _filterRecentLoginUsernameCache(
|
||||
|
||||
@@ -10,7 +10,7 @@ extension OidcConfigurationExtensions on OIDCConfiguration {
|
||||
if (AppConfig.domainRedirectUrl.endsWith('/')) {
|
||||
return AppConfig.domainRedirectUrl + loginRedirectOidcWeb;
|
||||
} else {
|
||||
return AppConfig.domainRedirectUrl + '/' + loginRedirectOidcWeb;
|
||||
return '${AppConfig.domainRedirectUrl}/$loginRedirectOidcWeb';
|
||||
}
|
||||
} else {
|
||||
return redirectOidcMobile;
|
||||
@@ -22,7 +22,7 @@ extension OidcConfigurationExtensions on OIDCConfiguration {
|
||||
if (AppConfig.domainRedirectUrl.endsWith('/')) {
|
||||
return AppConfig.domainRedirectUrl + logoutRedirectOidcWeb;
|
||||
} else {
|
||||
return AppConfig.domainRedirectUrl + '/' + logoutRedirectOidcWeb;
|
||||
return '${AppConfig.domainRedirectUrl}/$logoutRedirectOidcWeb';
|
||||
}
|
||||
} else {
|
||||
return redirectOidcMobile;
|
||||
|
||||
@@ -30,8 +30,8 @@ class LoginView extends BaseLoginView {
|
||||
child: _supportScrollForm(context)
|
||||
? Stack(children: [
|
||||
Center(child: SingleChildScrollView(
|
||||
child: _buildCenterForm(context),
|
||||
scrollDirection: Axis.vertical)),
|
||||
scrollDirection: Axis.vertical,
|
||||
child: _buildCenterForm(context))),
|
||||
Obx(() {
|
||||
if (loginController.loginFormType.value == LoginFormType.credentialForm
|
||||
|| loginController.loginFormType.value == LoginFormType.ssoForm) {
|
||||
@@ -128,7 +128,7 @@ class LoginView extends BaseLoginView {
|
||||
icon: SvgPicture.asset(
|
||||
imagePaths.icBack,
|
||||
alignment: Alignment.center,
|
||||
color: AppColor.primaryColor
|
||||
colorFilter: AppColor.primaryColor.asFilter()
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
@@ -13,7 +13,6 @@ class LoginTextInputBuilder {
|
||||
Key? _key;
|
||||
String? _title;
|
||||
String? _hintText;
|
||||
String? _labelText;
|
||||
String? _prefixText;
|
||||
SetErrorString? _setErrorString;
|
||||
String? _errorText;
|
||||
@@ -44,7 +43,6 @@ class LoginTextInputBuilder {
|
||||
}
|
||||
|
||||
void labelText(String? labelText) {
|
||||
_labelText = labelText;
|
||||
}
|
||||
|
||||
void prefixText(String? prefixText) {
|
||||
|
||||
Reference in New Issue
Block a user