widget_chat is live on pub.dev: drop-in AI chat for Flutter, FlutterFlow, iOS, Android, React & Web. Start free →

← Back to Blog
Dialogflow Alternative for Flutter: dialog_flowtter vs widget_chat

Dialogflow Alternative for Flutter: dialog_flowtter vs widget_chat

flutterdialogflowchatbotflutter webwidget_chat

If you followed Google's Build Voice Bots for Android with Dialogflow Essentials & Flutter codelab, or added dialog_flowtter to get a Dialogflow Flutter chatbot running quickly, the demo probably worked. Production is where it gets harder: a web build that won't compile, a package that hasn't been updated in years, and a Google Cloud key sitting in your assets folder.

This post compares the two options using public facts only: what pub.dev and Google's own docs say about dialog_flowtter, and what the widget_chat package does instead. It also covers when Dialogflow is still the right choice, and ends with a migration checklist.

Where dialog_flowtter stands today

Here is what pub.dev shows for dialog_flowtter as of December 2026:

  • The latest version is 0.3.3, and pub.dev lists it as published 4 years ago. Before that, 0.3.2 is also 4 years old, and 0.3.1 and 0.3.0 are 5 years old.
  • The minimum Dart SDK is 2.12, from the first null-safety era.
  • The pub.dev analysis lists Android, iOS, Linux, macOS and Windows as supported. Web is not compatible.
  • Its dependency constraints (googleapis_auth ^1.3.0, http ^0.13.1, equatable ^2.0.0) don't allow the current major versions of those packages, and the dependency check scores 0 out of 10.
  • The README's own to-do list still has "Secure DialogFlow auth JSON" unchecked.
0.3.3latest dialog_flowtter release, published 4 years agopub.dev versions page
5 of 6platforms supported, web is the one missingpub.dev score page
0/10dependency score: constraints block current googleapis_auth and httppub.dev score page

None of this makes the package bad code. It means that when Flutter, Dart or Google's auth libraries change, nobody is shipping fixes, and you'll end up overriding dependencies to keep it building.

Why Dialogflow on Flutter web doesn't work

If you searched "dialogflow flutter web not working", this is the cause. dialog_flowtter.dart imports src/dialog.dart, which imports googleapis_auth/auth_io.dart, and that file imports dart:io. dart:io doesn't exist in the browser, so a web build fails at compile time. The README says the package supports web, but pub.dev's analysis says otherwise, and the analysis matches what happens when you build.

No flag fixes this. The service-account signing flow is written for dart:io platforms.

The bigger problem: the key ships inside the app

Both the codelab and the dialog_flowtter README have you download a service-account JSON key and register it as a Flutter asset:

flutter:
  assets:
    - assets/dialog_flow_auth.json   # dialog_flowtter README
    # or assets/credentials.json     # Dialogflow ES codelab

Everything listed under assets gets packaged into the APK, IPA or web bundle, and anyone who unzips a release build can read it. The codelab also grants that service account the Dialogflow API Admin role. Google's IAM guidance is direct about this: don't embed service account keys in program binaries, and treat user-managed keys as an exception.

Release buildUnzip APK or IPAassets/credentials.jsonService-account keyCalls to your Google Cloud project

Once a key is out, you can't recall it. You have to rotate it, and you'll be shipping app updates to every client that still has the old one.

Side by side

Criterion dialog_flowtter + Dialogflow ES widget_chat
Last release 0.3.3, 4 years ago (pub.dev) Maintained package on pub.dev
Flutter web Not compatible (dart:io via googleapis_auth) Supported, along with iOS, Android and desktop
Where the secret lives Service-account JSON bundled as an app asset Model provider key stays server-side. The app holds only a project key
How answers are produced Intents and training phrases you write AI answers from your own content
Chat UI You build it Finished chat screen: markdown, image cards, carousels, button groups
Backend to host None if you accept the bundled key, otherwise your own proxy None
Extras Audio output via Dialogflow Image attachments, chat history with pagination, live voice, 46 UI locales

dialog_flowtter in production

  • No release in 4 years
  • Web build fails on dart:io
  • Service-account key bundled in assets
  • Chat screen built and maintained by you
  • Every answer needs an intent

widget_chat

  • One package, iOS, Android, web and desktop
  • Model key stays server-side
  • Answers from your docs and FAQs
  • Rich messages and themes included
  • Configured in a no-code dashboard
Criteria: maintenance, platform support, secret handling, UI work, content model.

When Dialogflow is still the better fit

Stay with Dialogflow if you've already put real work into an agent in a Google Cloud project: dozens of intents, slot filling, webhooks that run fulfillment, and conversation flows that have to follow a script (booking steps, form collection, deterministic branching). An AI assistant that answers from your content won't reproduce a tuned intent graph one for one. If precise control over each turn is the requirement, keep Dialogflow and move the call off the device.

Here is the minimum safe setup: the key lives on your server, and the Flutter app calls your own endpoint. Server side, in Dart with googleapis_auth 2.x and the documented Dialogflow ES REST detectIntent method:

import 'dart:convert';
import 'dart:io';
import 'package:googleapis_auth/auth_io.dart';

Future<String?> detectIntent(String sessionId, String text) async {
  final creds = ServiceAccountCredentials.fromJson(
    File(Platform.environment['DF_KEY_PATH']!).readAsStringSync(),
  );
  final client = await clientViaServiceAccount(
    creds,
    ['https://www.googleapis.com/auth/dialogflow'],
  );
  try {
    final projectId = Platform.environment['DF_PROJECT_ID'];
    final res = await client.post(
      Uri.parse('https://dialogflow.googleapis.com/v2/projects/'
          '$projectId/agent/sessions/$sessionId:detectIntent'),
      headers: {'Content-Type': 'application/json'},
      body: jsonEncode({
        'queryInput': {
          'text': {'text': text, 'languageCode': 'en'}
        }
      }),
    );
    final body = jsonDecode(res.body) as Map<String, dynamic>;
    return body['queryResult']?['fulfillmentText'] as String?;
  } finally {
    client.close();
  }
}

The Flutter app then calls your endpoint with plain http, which also works on web:

final res = await http.post(
  Uri.parse('https://api.example.com/chat'),
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer $userToken',
  },
  body: jsonEncode({'sessionId': sessionId, 'text': message}),
);

That fixes both the web build and the leaked key. You still own the server, its auth, rate limiting, and the chat UI.

When widget_chat is the better fit

If the Dialogflow agent was mostly answering support questions (shipping, refunds, account help, "how do I..."), it was probably a pile of FAQ intents. That's where a Flutter chatbot package that answers from your own content does better: you upload or point it at your help content instead of writing training phrases for every way someone might ask a question. You don't build or host a chat backend, and the model provider key never reaches the device.

Migration checklist

  1. Inventory intentsExport the agent and sort intents into FAQ answers versus scripted flows with webhooks.
  2. Keep scripted flows server-sideAnything that needs deterministic steps stays in Dialogflow behind your own endpoint.
  3. Turn FAQ intents into contentCollect the fulfillment texts and the help pages they came from as the assistant's source content.
  4. Map webhooks to toolsFulfillment that fetched live data becomes a custom HTTP tool or an action callback into the app.
  5. Remove the key from the appDelete the JSON from assets and pubspec.yaml, then drop dialog_flowtter from dependencies.
  6. Rotate the old keyDisable and delete the service-account key that shipped in past builds.
  7. Test every platformRun on iOS, Android and web before release.
  • lib/
  • main.dart
  • support/
  • support_screen.darthosts ChatWidget
  • assets/
  • # credentials.json removed
  • pubspec.yamldialog_flowtter removed, widget_chat added

Add widget_chat to your Flutter app

Install the package:

flutter pub add widget_chat

Then put the chat screen wherever support lives in your app:

import 'package:flutter/material.dart';
import 'package:widget_chat/widget_chat.dart';

class SupportScreen extends StatelessWidget {
  const SupportScreen({super.key, required this.userId});
  final String userId;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Help')),
      body: ChatWidget(
        configuration: BotConfiguration(
          projectSecretKey: 'your-project-secret-key',
          userID: userId,
        ),
      ),
    );
  }
}

The same code runs on iOS, Android, web and desktop. Content, theme (light, dark or system), languages and tools are set in the dashboard, and HMAC-signed user identity is available when you need to verify who's chatting. FlutterFlow users can add it as a custom pub dependency inside a custom widget.

Create a free project, no credit card, at app.widget-chat.com/#/register and swap your project key into the snippet above.

pub.dev analysis of dialog_flowtter 0.3.3: web is listed as not compatible

The widget_chat package on pub.dev

Add an AI chat to your Flutter app without building it

Widget-Chat is a drop-in chat widget for Flutter and FlutterFlow. Add the package, pass your project key, and the whole chat screen is there. You set up the assistant in a no-code dashboard.

flutter pub add widget_chat

Free plan, no credit card.

Widget-Chat

About the author

Widget-Chat is built by a small team of Flutter developers. We write about the problems we hit while shipping AI chat in production apps.