How do you use Gemini-2.0 Flash exp in Flutter?

I see this error on querying the chat

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Failed to get response: models/gemini-2.0-flash-exp is not found for API version v1, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.

Is there an update for the flutter_gemini package supporting the model that I don’t know about?

1 Like