X Tutup
The Wayback Machine - https://web.archive.org/web/20200914090853/https://github.com/lunahq/flutter-crisp
Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
ios
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Flutter Crisp

pub package License: MIT Twitter: oilunabr

Connect with Crisp Chat, register a user to chat (or not) and render a chat widget.

Tested on Android and iOS.

Required setup for iOS

You need to setup setup the a key in iOS, as described at flutter_webview_plugin.

How to use

Initialize with:

crisp.initialize(
  websiteId: 'WEBSITE_ID',
  locale: 'pt-br',
);

Optionally register an user

crisp.register(
  CrispUser(
    email: "example@provider.com",
    avatar: 'https://avatars2.githubusercontent.com/u/16270189?s=200&v=4',
    nickname: "João Cardoso",
    phone: "5511987654321",
  ),
);

Set a initial message

crisp.setMessage("Hello world - initial message");

Pretty straightforward:

  @override
  void initState() {
    super.initState();

    crisp.initialize(
      websiteId: 'WEBSITE_ID',
      locale: 'pt-br',
    );

    crisp.register(
      CrispUser(
        email: "example@provider.com",
        avatar: 'https://avatars2.githubusercontent.com/u/16270189?s=200&v=4',
        nickname: "João Cardoso",
        phone: "5511987654321",
      ),
    );

    crisp.setMessage("Hello world - initial message");
  }
You can’t perform that action at this time.
X Tutup