CleverPush Developer Docs

CleverPush Developer Docs

  • SDK Docs
  • API Overview
  • API Reference

›Flutter SDK

JavaScript SDK

  • Setup
  • Methods

iOS SDK

  • Setup
  • Methods
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Live Activities
  • Troubleshooting
  • Changelog

Android SDK

  • Setup
  • Methods
  • Notification Extender Service
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Troubleshooting
  • Upgrading
  • Changelog

Capacitor SDK

  • Setup
  • Methods

Cordova SDK

  • Setup
  • Methods
  • Changelog

React Native SDK

  • Setup
  • Methods
  • Changelog

Xamarin SDK

  • Setup
  • Methods
  • Changelog

Flutter SDK

  • Setup
  • Methods
  • Chat
  • Troubleshooting
  • Changelog

Chat

CleverPush Chat View

  1. Import the Chat View:
import 'package:cleverpush_flutter/cleverpush_chat_view.dart';
  1. Add the Chat View:
return new Scaffold(
  appBar: AppBar(
    title: const Text('Chat View'),
  ),
  body: new Container(
    child: CleverPushChatView(
      
    ),
  ),
);

Handle opened URLs in the chat:

CleverPush.shared.setChatUrlOpenedHandler((url) {
  Widget continueButton = TextButton(
    child: Text("Ok"),
    onPressed: () => Navigator.pop(context, 'Ok'),
  );
  showDialog<String>(
    context: context,
    builder: (BuildContext context) => AlertDialog(
      title: const Text('Chat URL opened'),
      content: Text(url),
      actions: <Widget>[
        continueButton,
      ],
    ),
  );
});

Change the primary branding color:

CleverPush.shared.setBrandingColor("#ff0000")
← MethodsTroubleshooting →
  • CleverPush Chat View
SDKs
JavaScriptiOSAndroidCordovaCapacitorReact NativeXamarinFlutter
Community
TwitterFacebookGitHub
More
API ReferenceAPI OverviewBlogImprintPrivacy PolicyTerms of serviceGDPR
Copyright © 2023 CleverPush