removeApiKey static method

Future<void> removeApiKey(
  1. String name,
  2. String serviceType
)

Remove a single API key from the session

Implementation

static Future<void> removeApiKey(String name, String serviceType) async {
  List<ApiKeyModel> apiKeys = await getApiKeys();
  apiKeys.removeWhere(
      (apiKey) => apiKey.name == name && apiKey.serviceType == serviceType);
  await saveApiKeys(apiKeys);
}