gemini_flutter_kit 0.1.0
gemini_flutter_kit: ^0.1.0 copied to clipboard
A production-ready toolkit for integrating Google Gemini AI into Flutter apps: streaming chat UI, rate limiting, retries, secure key storage, offline queueing, and usage tracking, out of the box.
0.1.0 #
2026-07-02
Initial release. π
Added #
GeminiClientβ a batteries-included wrapper aroundgoogle_generative_aiwithsendMessage,sendMessageStream,startChat, andcountTokens.GeminiKeyManagerβ secure API-key storage backed byflutter_secure_storage.GeminiRateLimiterβ client-side sliding-window rate limiting with aremainingQuotagetter.GeminiRetryPolicyβ exponential-backoff retries for transient network errors only.- Typed exceptions β
GeminiNetworkException,GeminiRateLimitException,GeminiInvalidResponseException,GeminiSafetyBlockedException,GeminiAuthException, andGeminiUnknownException, each with a UI-safeuserMessage. GeminiOfflineQueueβ persistent offline request queueing with automatic flush on reconnect and aqueueStatusStream.GeminiUsageTrackerβ daily/monthly token and request counters persisted locally.GeminiChatViewβ a themeable, streaming, Markdown-rendering drop-in chat UI with a typing indicator, disabled-while-sending input, and a long-press report action.GeminiSafetyGuardβ surfaces Gemini safety ratings and areportResponsehook.GeminiDisclosureTextβ editable privacy-policy starter copy.- Full example app and a hermetic (no-network, no-key) test suite.