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

YoHe - All Feedback Tools in One Platform

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:yohe_sdk/yohe.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  final _yohe = YoHe();

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

    _setup();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('YoHe')),
        body: Column(
          children: [
            Center(
              child: OutlinedButton(
                child: const Text('Send event'),
                onPressed: () {
                  _yohe.sendEvent(event: 'fullscreen');
                },
              ),
            ),
            Center(
              child: OutlinedButton(
                child: const Text('Stop campaign'),
                onPressed: () {
                  _yohe.stopCampaign();
                },
              ),
            ),
          ],
        ),
      ),
    );
  }

  Future<void> _setup() async {
    await _yohe.setup(
      endpoint: 'AAAAAAAAAAAAAHYwMhEVF1hOTAOWOTIQFWFPGAWDMHYNFQxKFXKFCXs8lxM=',
      appID: 'ckzxywct400003965yjfzyp5m',
    );
  }
}
0
likes
130
points
1
downloads

Publisher

verified publisheryohe.io

Weekly Downloads

YoHe - All Feedback Tools in One Platform

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on yohe_sdk

Packages that implement yohe_sdk