dialog_flowtter
0.3.3, released 5 years ago by deimos.app
Flutter client for Dialogflow API with authentication and intent detection
What it does
Provides a null‑safe wrapper around Dialogflow's REST API. Handles Google service‑account authentication, builds an authenticated HTTP client, and maps responses to Dart models. Lets you detect intents and retrieve text, rich messages, or audio responses.
AI-written summary of version 0.3.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to integrate Dialogflow conversational agents into a Flutter app
- Cross‑platform support (Android, iOS, Web) is required
- You want a ready‑made model layer and authentication helper
Skip it when
- You need offline or on‑device NLU processing
- You require support for platforms not yet stable (Windows, Linux, macOS)
- You need a more generic HTTP client without Dialogflow‑specific abstractions
Strengths
- Simple authentication via service‑account JSON
- Null‑safety and web support out of the box
- Rich response handling (text, cards, audio)
- Convenient model classes generated with json_serializable
Weaknesses
- Limited to Dialogflow; not a general AI/ML client
- Platform support for desktop is still experimental
- Relies on googleapis_auth; may need extra setup for custom auth flows
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Add dialog_flowtter to pubspec, include your Dialogflow service‑account JSON as an asset, and reference it in flutter assets. No native permissions required.
```dart
final credentials = await DialogAuthCredentials.fromFile('assets/dialog_flow_auth.json');
final dialog = DialogFlowtter(credentials: credentials, sessionId: 'my_session');
final response = await dialog.detectIntent(
queryInput: QueryInput(text: TextInput(text: 'Hi', languageCode: 'en')),
);
print(response.text);
```Works with
Packages commonly used together with dialog_flowtter: ones it builds on, ones built on it, and its own family.
- json_annotationdialog_flowtter depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- equatabledialog_flowtter depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- googleapis_authdialog_flowtter depends on itObtain Access credentials and authenticated HTTP clients for Google APIs using OAuth 2.0.