getSocialMediaAccounts method
get Social media accounts
Implementation
Future<void> getSocialMediaAccounts() async {
try {
var facebookResponse = await _linkingRepository.getFacebookAccounts();
var instagramResponse = await _linkingRepository.getInstagramAccounts();
var twitterResponse = await _linkingRepository.getTwitterAccounts();
var whatsappResponse = await _linkingRepository.getWhatsappAccounts();
GetSocialAccountData acc = GetSocialAccountData(
facebook: facebookResponse.data,
instagram: instagramResponse.data,
twitter: twitterResponse.data,
whatsapp: whatsappResponse.data);
GetSocialAccounts().getSocialAccountData.copyWith(
facebook: facebookResponse.data,
instagram: instagramResponse.data,
twitter: twitterResponse.data,
whatsapp: whatsappResponse.data);
//log('API CALL : : : : : :${acc.toString()}');
//log('API CALL : : : : : :
//${GetSocialAccounts().getSocialAccountData.toString()}');
await _storageService.setString(
'socialAccounts', jsonEncode(acc.toJson()));
// _bodSquareAppData.getSocialAccountData.value = acc;
// log(_bodSquareAppData.getSocialAccountData.value.toString());
} catch (e) {
//log(e.toString());
}
}