klaviyo_flutter 0.0.1 copy "klaviyo_flutter: ^0.0.1" to clipboard
klaviyo_flutter: ^0.0.1 copied to clipboard

outdated

Flutter plugin for Klaviyo integration. Provides push messaging and Klaviyo analitics services

example/lib/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  /// make sure to add keys from your Klaviyo workspace.
  await Klaviyo.instance.initialize(
    'appId',
  );
  runApp(SampleApp());
}

class SampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Klaviyo example app'),
        ),
        body: Center(
          child: TextButton(
            onPressed: () async {
              await Klaviyo.instance.logEvent(
                '\$successful_payment',
                {'\$value': 'paymentValue'},
              );
            },
            child: Text('Send Klaviyo SUCCESSFUL_PAYMENT event'),
          ),
        ),
      ),
    );
  }
}
11
likes
0
points
6.57k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for Klaviyo integration. Provides push messaging and Klaviyo analitics services

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

equatable, flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on klaviyo_flutter

Packages that implement klaviyo_flutter