Idea :
final hasAiKey = AppConfig.openAiApiKey.isNotEmpty;
...
ElevatedButton(
onPressed: hasAiKey ? _sendToDino : null, // disabled if no key
child: Text(hasAiKey ? 'Ask Dino' : 'AI not configured'),
)
In the Dino UI widget, you can also disable the AI button if the key is missing , this is optional.
Idea :
In the Dino UI widget, you can also disable the AI button if the key is missing , this is optional.