setApiKey method

Future<void> setApiKey(
  1. String? value
)

Used to persist the API key.

Implementation

Future<void> setApiKey(String? value) async {
  await setPreference(key: 'openai_api_key', value: value);
}