-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Amayyas edited this page Jul 6, 2026
·
2 revisions
This guide will help you install Flutter AI SDK in your project.
-
Dart SDK:
>=3.0.0 <4.0.0 -
Flutter:
>=3.10.0
Add the following to your pubspec.yaml:
dependencies:
flutter_ai_sdk: ^1.0.0Then run:
flutter pub getRun the following command in your project directory:
flutter pub add flutter_ai_sdkFlutter AI SDK uses the following packages (automatically installed):
| Package | Version | Purpose |
|---|---|---|
http |
^1.1.0 | HTTP client |
dio |
^5.4.0 | Advanced HTTP features |
equatable |
^2.0.5 | Value equality |
uuid |
^4.2.1 | Unique ID generation |
rxdart |
^0.27.7 | Reactive extensions |
logger |
^2.0.2 | Logging utilities |
retry |
^3.1.2 | Retry logic |
After installation, import the library:
import 'package:flutter_ai_sdk/flutter_ai_sdk.dart';This single import provides access to all SDK components:
-
FlutterAI- Main SDK class -
AIConfig- Configuration options -
AIProvider- Provider types enum - Content classes (
TextContent,ImageContent, etc.) - Error classes (
AIError,AIAuthenticationError, etc.) - Tool/Function calling classes
| Platform | Support |
|---|---|
| Android | ✅ |
| iOS | ✅ |
| Web | ✅ |
| macOS | ✅ |
| Windows | ✅ |
| Linux | ✅ |
You'll need API keys from the providers you want to use:
| Provider | Get API Key |
|---|---|
| OpenAI | platform.openai.com |
| Anthropic | console.anthropic.com |
| Google AI | aistudio.google.com |
⚠️ Security Note: Never commit API keys to version control. Use environment variables or secure storage.
Create a simple test to verify the installation:
import 'package:flutter_ai_sdk/flutter_ai_sdk.dart';
void main() {
// If this compiles, the SDK is installed correctly
final config = AIConfig(
apiKey: 'test-key',
model: 'gpt-5.5',
);
print('Flutter AI SDK installed successfully!');
print('AIProvider values: ${AIProvider.values}');
}- Quick Start Guide - Get up and running quickly
- Configuration - Learn about configuration options
- Providers - Understand the different providers
Getting Started
Core Concepts
Advanced Features
API Reference
Examples
Other