leap_aui 0.0.9 copy "leap_aui: ^0.0.9" to clipboard
leap_aui: ^0.0.9 copied to clipboard

Whatfix Mobile SDK is a Flutter package designed to create engaging in-app experiences for your end users. This SDK enables seamless integration with your mobile app's source code, allowing developers [...]

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:leap_aui/leap_aui.dart';
import 'package:leap_creator/leap_creator.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
  await initLeap();
}

Future<void> initLeap() async {
  if (Platform.isAndroid) {
    await Future.delayed(const Duration(seconds: 5));
    await LeapAui.start("<API-KEY>");
    await LeapCreator.start("<API-KEY>");
  }
  if (Platform.isIOS) {
    await LeapAui.start("<API-KEY>");
    await LeapCreator.start("<API-KEY>");
  }
}

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      key: const Key('DAP-KEY-1'),
      home: Scaffold(
        key: const Key('DAP-KEY-2'),
        appBar: AppBar(
          key: const Key('DAP-KEY-3'),
          title: const Text(key: const Key('DAP-KEY-4'), 'Leap AUI Flutter'),
        ),
        body: Center(
          key: const Key('DAP-KEY-5'),
          child: ElevatedButton(
            key: const Key('DAP-KEY-5'),
            child: const Text('Welcome to Whatfix Mobile'),
            onPressed: () {
              var map = {
                'a': 10,
                'b': "testString",
                'c': DateTime.now().add(const Duration(days: 1))
              };
              LeapAui.flush(Map.of(map));
            },
          ),
        ),
      ),
    );
  }
}
0
likes
0
points
69
downloads

Publisher

unverified uploader

Weekly Downloads

Whatfix Mobile SDK is a Flutter package designed to create engaging in-app experiences for your end users. This SDK enables seamless integration with your mobile app's source code, allowing developers to guide users effectively through interactive highlights, tooltips, and contextual instructions.

Homepage

License

unknown (license)

Dependencies

flutter, leap_hierarchy

More

Packages that depend on leap_aui