checkSocials method
Implementation
Future<List<Social>> checkSocials() async {
try {
_dio.options.headers['content-Type'] = 'application/json';
var response = await _dio.get('$baseUrl/frontegg/identity/resources/sso/v2');
final List<Social> res = response.data.map<Social>((e) => Social.fromJson(e)).toList();
return res;
} catch (e) {
if (e is DioError && e.response != null) {
throw e.response!.data['errors'][0];
}
throw tr('something_went_wrong');
}
}