leap_creator 0.0.1
leap_creator: ^0.0.1 copied to clipboard
The Leap Creator Flutter plugin enables you to create in-app experiences using the Leap Mobile Studio by integrating the Leap Mobile Creator SDK. Activate Creator mode in your app to design interactiv [...]
example/lib/main.dart
import 'dart:io';
import 'package:flutter/material.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 LeapCreator.start("1aeae021-0bb5-463d-8aa7-50bc9aa2de7e");
}
if (Platform.isIOS) {
await LeapCreator.start("b3faaae1-bad8-4c3d-9e74-7b77eacb902a");
}
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $_platformVersion\n'),
),
),
);
}
}