flutter_carrotquest 1.0.0-dev.4 copy "flutter_carrotquest: ^1.0.0-dev.4" to clipboard
flutter_carrotquest: ^1.0.0-dev.4 copied to clipboard

A Carrot quest flutter plugin for Android and IOS. You can find a description of the service at https://www.carrotquest.io

example/lib/main.dart

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

import 'package:flutter_carrotquest/flutter_carrotquest.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  Future<void> initPlatformState() async {
    await Carrot.setup(apiKey: 'your apiKey', appId: 'your appId')
        .catchError((onError) => print(onError));
    /* await Carrot.setDebug().catchError((onError) => print(onError));
    await Carrot.auth(userId: 'your userId', userAuthKey: 'your userAuthKey')
        .catchError((onError) => print(onError)); */
    await Carrot.openChat().catchError((onError) => print(onError));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text(''),
        ),
      ),
    );
  }
}
4
likes
140
pub points
0%
popularity

Publisher

verified publisherdipdev.studio

A Carrot quest flutter plugin for Android and IOS. You can find a description of the service at https://www.carrotquest.io

Homepage
Repository (GitLab)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_carrotquest