open_cdp_flutter_sdk 3.1.1 copy "open_cdp_flutter_sdk: ^3.1.1" to clipboard
open_cdp_flutter_sdk: ^3.1.1 copied to clipboard

A Flutter SDK for integrating with the OpenCDP platform. Track user events, screen views, and device attributes with automatic lifecycle tracking and dual write to Customer.io.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'config_screen.dart';
import 'home_screen.dart';

/// Test harness for the OpenCDP Flutter SDK in-app messaging feature.
///
/// The app boots into a configuration screen so you can point it at any
/// workspace (local, staging, prod) without rebuilding. Once initialized, the
/// home screen drives identify/navigation/manual-sync flows and the in-app
/// host overlays whatever the SDK delivers.
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const TestApp());
}

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

  @override
  State<TestApp> createState() => _TestAppState();
}

class _TestAppState extends State<TestApp> {
  bool _initialized = false;
  String? _personId;

  void _onInitialized(String personId) {
    setState(() {
      _initialized = true;
      _personId = personId;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'OpenCDP In-App Test',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: _initialized && _personId != null
          ? HomeScreen(personId: _personId!)
          : ConfigScreen(onInitialized: _onInitialized),
    );
  }
}
0
likes
140
points
291
downloads

Documentation

Documentation
API reference

Publisher

verified publishercodematic.io

Weekly Downloads

A Flutter SDK for integrating with the OpenCDP platform. Track user events, screen views, and device attributes with automatic lifecycle tracking and dual write to Customer.io.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

crypto, customer_io, device_info_plus, flutter, http, package_info_plus, shared_preferences

More

Packages that depend on open_cdp_flutter_sdk

Packages that implement open_cdp_flutter_sdk