currentCustomerAccessToken property

Future<String?> get currentCustomerAccessToken

Implementation

Future<String?> get currentCustomerAccessToken async {
  if (_currentCustomerAccessToken.containsKey(ShopifyConfig.storeUrl)) {
    return _currentCustomerAccessToken[ShopifyConfig.storeUrl];
  }
  final _prefs = await SharedPreferences.getInstance();
  if (_prefs.containsKey(ShopifyConfig.storeUrl!)) {
    return _currentCustomerAccessToken[ShopifyConfig.storeUrl] =
        _prefs.getString(ShopifyConfig.storeUrl!);
  }
  return _currentCustomerAccessToken[ShopifyConfig.storeUrl] =
      _prefs.getString(_shopifyKey);
}