saveToStorage function
Implementation
Future<bool> saveToStorage(String storageKey, String storageValue) async {
final FlutterSecureStorage storage = storageLocator<FlutterSecureStorage>();
return await storage
.write(key: storageKey, value: storageValue)
.then((value) {
return true;
})
.catchError((error) {
logError(
'currentUserService / saveToStorage / ERROR | storageKey: $storageKey'
' | storageValue: $storageValue | error: $error',
'GCUS-STS-E010',
);
return false;
});
}