helpcrunch_plugin 0.0.8 helpcrunch_plugin: ^0.0.8 copied to clipboard
A plugin for helpcrunch
import 'package:flutter/material.dart';
import 'package:flutter_plugin_helpcrunch/helpcrunch.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Column(
children: [
FlatButton(child: Text('initialize'), onPressed: () async {
await HelpCrunch.initialize(
organization: 'organization',
appId: 0,
appSecret: "appSecret");
},),
FlatButton(child: Text('Logout'), onPressed: () async {
await HelpCrunch.logout();
},),
FlatButton(child: Text('Show Chat Screen'), onPressed: () async {
await HelpCrunch.showChatScreen();
},)
],
),
),
),
);
}
}