rekhu
← All news

Rekhu Assistant for Flutter

rekhu_assistant puts your assistant in a Flutter app: a ready chat screen or one of your own design, talking to your back end, which holds the key. Arabic right to left, visitors without a login.

By Rekhu 2 min read

Your app's assistant now comes to Flutter: rekhu_assistant, for iOS, Android, the web and the desktop.

The Flutter app talks to your own back end, where rekhu/assistant-laravel or @rekhu/assistant-node already knows the user, the actions they may use, the pages and the help. The app signs in to it the way it calls the rest of your API, with a token in a header; it never holds a Rekhu key.

final client = RekhuAssistantClient(
  endpoint: Uri.parse('https://api.example.com/api/rekhu/assistant/chat'),
  headers: () async => {'Authorization': 'Bearer ${await auth.token()}'},
  locale: 'ar-SA',
);

RekhuChat.show(context, client: client, onOpenPage: (url) => context.go(url));
  • RekhuChat, a ready chat screen or bottom sheet: answers as they stream, steps, page buttons that open your app's own screens, confirm cards before an action runs, quick questions and "New". It follows your app's theme; colours, words and the header are yours to change.
  • RekhuChatController, the chat as state, for a chat screen of your own design: the same as createClient() gives a web front end.
  • Languages: English, Arabic and Dutch built in. Arabic, Hebrew, Persian and Urdu read right to left, whatever the app's own locale.
  • Visitors: the public chat works without a login, with an anonymous id per install, within the caps your back end sets.

The package speaks protocol 1, like the web widget, so any back end that serves the widget serves a Flutter app too. Put the chat route behind your API's middleware; the Laravel and Node.js READMEs show how.

Share LinkedIn X

Related

More on the same topics

Try Rekhu Builder on your site

Create a free account, connect a site, drop in a template. Converting is free; only the chat draws from the credit.