floaty_chatheads_ios 1.1.3
floaty_chatheads_ios: ^1.1.3 copied to clipboard
iOS implementation of floaty_chatheads with UIWindow-based PiP overlay, snap-to-edge physics, theming, and VoiceOver accessibility.
example/example.md
Floaty Chatheads iOS Example #
This package is the iOS implementation of
floaty_chatheads.
It is not intended for direct use — add floaty_chatheads to your
pubspec.yaml instead.
import 'package:floaty_chatheads/floaty_chatheads.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MaterialApp(home: BasicExample()));
@pragma('vm:entry-point')
void overlayMain() => FloatyOverlayApp.run(const OverlayContent());
class BasicExample extends StatelessWidget {
const BasicExample({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () async {
await FloatyChatheads.showChatHead(
ChatHeadConfig(
entryPoint: 'overlayMain',
contentWidth: 300,
contentHeight: 400,
),
);
},
child: const Text('Show Chathead'),
),
),
);
}
}
class OverlayContent extends StatelessWidget {
const OverlayContent({super.key});
@override
Widget build(BuildContext context) {
return const Material(child: Center(child: Text('Hello from overlay!')));
}
}
See the full gallery app for complete examples.