Validate that an API key has the correct format.
bool isValidApiKey(String apiKey) { return RegExp(r'^[a-zA-Z0-9\-_]+$').hasMatch(apiKey); }