Integration guide
Asklify + Flutter
Embed the hosted chat page in webview_flutter for a complete support experience, or build native UI over the REST API via your backend.
pub_...) from Widget → Install.Add the dependency
flutter pub add webview_flutterAdd the chat screen
Push the widget below from a “Help” button anywhere in your app.
Ready-to-use template
Copy, paste, replace the project ID — that's the whole integration:
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class SupportChatScreen extends StatefulWidget {
const SupportChatScreen({super.key});
@override
State<SupportChatScreen> createState() => _SupportChatScreenState();
}
class _SupportChatScreenState extends State<SupportChatScreen> {
late final WebViewController _controller;
@override
void initState() {
super.initState();
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(Uri.parse('https://app.asklify.in/widget/pub_YOUR_PROJECT_ID'));
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Support')),
body: WebViewWidget(controller: _controller),
);
}
}Customization
All appearance and behavior — name, greeting, colors, theme, position, suggested questions — is configured in your dashboard under Widget settings and applies instantly without redeploying. See the widget configuration reference.
Event handling
To react to what happens in conversations — a chat starting, a customer requesting a human, feedback submitted — subscribe to webhooks. For fully custom experiences, the REST API exposes chat with streaming, knowledge search, and conversation transcripts.
Best practices
- JavaScript must be enabled — the chat UI is a web app.
- For native chat UI, proxy the REST /chat API through your backend; never embed sk_ keys in the app.
sk_...) in a mobile app — extractable in minutes. Mobile apps should use the hosted chat page (as above) or talk to your own backend, which holds the key.Troubleshooting
- Blank screen on Android emulator — check the emulator has network access; cleartext isn't an issue since the chat URL is HTTPS.
- iOS build error — ensure platform :ios, '12.0' or later in your Podfile.
Still stuck? Check the error reference or email hello@asklify.in.
