help_scout_flutter 0.0.1 copy "help_scout_flutter: ^0.0.1" to clipboard
help_scout_flutter: ^0.0.1 copied to clipboard

PlatformiOS

A new Flutter plugin for the implementation of HelpScout Beacon.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

class _MyAppState extends State<MyApp> {
  late final HelpScoutFlutter _helpScoutFlutterPlugin;

  initBeacon() {
    _helpScoutFlutterPlugin = HelpScoutFlutter(
      beaconId: '*******beacon-id******',
    );
  }

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Help Scout example app'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              _helpScoutFlutterPlugin
                  .initialize()
                  .then((value) => _helpScoutFlutterPlugin.open());
            },
            style: ButtonStyle(
              backgroundColor:
                  MaterialStateColor.resolveWith((states) => Colors.blue[700]!),
            ),
            child: const Text('HelpScout Button'),
          ),
        ),
      ),
    );
  }
}
2
likes
160
points
106
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter plugin for the implementation of HelpScout Beacon.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on help_scout_flutter