floaty_chatheads_android 1.0.7 copy "floaty_chatheads_android: ^1.0.7" to clipboard
floaty_chatheads_android: ^1.0.7 copied to clipboard

PlatformAndroid

Android implementation of floaty_chatheads with SYSTEM_ALERT_WINDOW, foreground service, spring physics, theming, and TalkBack accessibility.

example/example.md

Floaty Chatheads Android Example #

This package is the Android 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.requestPermission();
            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.

0
likes
140
points
397
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Android implementation of floaty_chatheads with SYSTEM_ALERT_WINDOW, foreground service, spring physics, theming, and TalkBack accessibility.

Homepage
Repository (GitHub)
View/report issues

Topics

#overlay #chathead #floating-window #android

License

MIT (license)

Dependencies

floaty_chatheads_platform_interface, flutter, meta

More

Packages that depend on floaty_chatheads_android

Packages that implement floaty_chatheads_android