flutter_zendesk 1.0.0 copy "flutter_zendesk: ^1.0.0" to clipboard
flutter_zendesk: ^1.0.0 copied to clipboard

outdated

A Zendesk Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  initPlugin() async {
    try {
      await FlutterZendesk.initiateZendesk(params: {
        "appId": "YOUR_APP_ID",
        "clientId": "CLIENT_ID",
        "url": "YOUR_URL",
      });
    } on PlatformException {
      print('Failed to initiate zendesk.');
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Zendesk App'),
        ),
        body: Center(
          child: Text('ZENDESK'),
        ),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.headset_mic),
          onPressed: initPlugin,
        ),
      ),
    );
  }
}
0
likes
0
pub points
34%
popularity

Publisher

unverified uploader

A Zendesk Flutter plugin.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_zendesk