digia_engage 1.6.0 copy "digia_engage: ^1.6.0" to clipboard
digia_engage: ^1.6.0 copied to clipboard

Flutter SDK for rendering server-driven UIs using JSON from Digia Studio. Supports dynamic layouts, state, actions, and custom widgets.

example/lib/main.dart

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

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Minimal init — just an API key (matches the native SDKs). Optionally pass
  // `environment`, `baseUrl`, `fontFamily`, or `logLevel`.
  await Digia.initialize(
    DigiaConfig(apiKey: 'YOUR_DIGIA_API_KEY'),
  );

  // Register your CEP plugin (e.g. MoEngage, CleverTap) when ready.
  // Digia.register(MyCEPPlugin());

  runApp(const ExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'digia_engage Example',
      navigatorObservers: [DigiaNavigatorObserver()],
      builder: (context, child) => DigiaHost(child: child!),
      home: const HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('digia_engage Example')),
      body: ListView(
        padding: const EdgeInsets.all(16),
        children: const [
          Text(
            'Inline campaign slots — add placement keys from Digia Studio',
            style: TextStyle(fontSize: 16),
          ),
          SizedBox(height: 16),
          DigiaSlot('hero_banner'),
          SizedBox(height: 16),
          DigiaSlot('mid_banner'),
        ],
      ),
    );
  }
}
1
likes
120
points
390
downloads

Documentation

Documentation
API reference

Publisher

verified publisherdigia.tech

Weekly Downloads

Flutter SDK for rendering server-driven UIs using JSON from Digia Studio. Supports dynamic layouts, state, actions, and custom widgets.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, carousel_slider, chewie, device_info_plus, dio, flutter, lottie, package_info_plus, share_plus, shared_preferences, smooth_page_indicator, url_launcher, uuid, video_player

More

Packages that depend on digia_engage