• Release Notes
  • User
  • Admin
  • Developers
  • Integrations

›Flutter

General

  • Overview
  • LiveView / CoBrowsing / Session Recordings

JS API

  • Overview
  • CoBrowsing
  • LiveView / Session Recordings
  • WebChat
  • Web Calling
  • Video Conference
  • Logging
  • User
  • Team
  • API
  • Supported Browsers
  • Supported Technologies

Android

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

iOS

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

Flutter

  • Overview
  • Installation
  • Usage
  • Reference

Capacitor

  • Overview
  • Installation
  • Usage
  • Reference

Reference

Reference

For a better reference on how to use the plugin you can check the following exapmle.

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

import 'package:flutter/services.dart';
import 'package:engage_plugin/engage_plugin.dart';

Future main() async {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static var chatOverlayEnabled = false;
  final _engagePlugin = EngagePlugin();

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

  var initConfig = InitConfig(
      "user123",
      "123456789qwerty",
      "theServerURL.com",
      "theCDNServerUrl.com",
      false,
      ["listOfDeepLinks.com"],
      "#ff8d00",
      "#002448");

  var tagUserInfo =
      TagUserInfo(
          ["Labels", "list"],
          "johnDoe@mail.com",
          "John",
          "Doe",
          "123456",
          "AgenName",
          "1234567Ext",
          {"Key":"Data"});

  Future<void> initPlatformState() async {
    try {
      await _engagePlugin.init(initConfig);
    } on PlatformException {
      'failed to init engage';
    }

    if (!mounted) {
      return;
    }

    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Engage plugin example'),
        ),
        body: Center(
            child: Column(
          children: [
            ElevatedButton(
                onPressed: (() => _engagePlugin.init(initConfig)),
                child: const Text('Init Plugin')),
            ElevatedButton(
                onPressed: () => _engagePlugin.openChat(),
                child: const Text('Open Chat')),
            ElevatedButton(
                onPressed: () => _engagePlugin.startCoBrowsing(),
                child: const Text('Open coBrowser')),
            ElevatedButton(
                onPressed: () => _engagePlugin.stopCoBrowsing(),
                child: const Text('Stop coBrowser')),
            ElevatedButton(
                onPressed: () => _engagePlugin.tagUser(tagUserInfo),
                child: const Text('Tag user')),
            ElevatedButton(
                onPressed: () => _engagePlugin.clear(),
                child: const Text('Clear')),
          ],
        )),
      ),
    );
  }
}

← UsageOverview →
MANUALS
User Manual: Sales Suite
Admin Manual: Sales Suite
User Manual: Support Suite
Admin Manual: Support Suite
DEVELOPERS
Integrations
REST API
SDK API
LEGAL
Privacy Policy
Terms and Conditions
Imprint
Engage
Copyright © 2024 TeamViewer Austria GmbH