mirrorfly_plugin 1.0.8 mirrorfly_plugin: ^1.0.8 copied to clipboard
A MirrorFly Chat to Experience an outstanding real time messaging solution. The powerful communication that adds an extra mileage to build your chat app.
import 'package:flutter/material.dart';
import 'package:mirrorfly_plugin/mirrorfly.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
Mirrorfly.initializeSDK(
licenseKey: 'your license key',
iOSContainerID: 'your app group id',
flyCallback: (FlyResponse response) {
if (response.isSuccess) {
LogMessage.d("onSuccess", response.message);
} else {
LogMessage.d("onFailure", response.errorMessage.toString());
}
runApp(const MyApp());
}); //Must be same as AppGroups given in Xcode Capability
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Name App',
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
),
home: const MyHomePage(),
);
}
}
class MyAppState extends ChangeNotifier {}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
// var appState = context.watch<MyAppState>();
return const Scaffold(
body: Column(
children: [
Text('Welcome to Mirrorfly'),
],
),
);
}
}