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

A Flutter plugin to integrate UAE customer pulse functionality.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Plugin example app'),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () => _showSurveyPage(context),
              child: const Text('Show Survey Page'),
            ),
            const SizedBox(height: 32.0),
            ElevatedButton(
              onPressed: () => _showSurveyBottomSheet(context),
              child: const Text('Show Survey Bottom Sheet'),
            ),
          ],
        ),
      ),
    );
  }

  void _showSurveyPage(BuildContext context) {
    CustomerPulseFlutter().showSurveyPage(context, appId: 'com.kalvad.example', linkOrToken: 'F/AH/');
  }

  void _showSurveyBottomSheet(BuildContext context) {
    CustomerPulseFlutter().showSurveyBottomSheet(context, appId: 'com.kalvad.example', linkOrToken: 'F/AH/');
  }
}
0
likes
140
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to integrate UAE customer pulse functionality.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on customerpulse_flutter