android_window 0.0.3 copy "android_window: ^0.0.3" to clipboard
android_window: ^0.0.3 copied to clipboard

outdated

A flutter plugin allows you to create native android floating window.

android_window pub-badge #

A flutter plugin allows you to create native android floating window.

Usage #

main.dart:

import 'package:android_window/main.dart' as window;
import 'android_window.dart';

@pragma('vm:entry-point')
void androidWindow() {
  runApp(const AndroidWindowApp());
}

// run in main app
window.open(
  entryPoint: 'androidWindow',
  size: const Size(600, 800),
  position: const Offset(200, 200),
);

android_window.dart:

class AndroidWindowApp extends StatelessWidget {
  const AndroidWindowApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return AndroidWindow(
      child: Scaffold(
        backgroundColor: Colors.grey.withOpacity(0.8),
        body: const Center(child: Text('Hello android window')),
      ),
    );
  }
}

MainActivity.kt:

import qiuxiang.android_window.AndroidWindowActivity
class MainActivity : AndroidWindowActivity()

Create MainApplication.kt:

import qiuxiang.android_window.AndroidWindowApplication
class MainApplication : AndroidWindowApplication()

Add android:name=".MainApplication" to AndroidManifest.xml:

<application android:name=".MainApplication">

Full example

32
likes
0
pub points
77%
popularity

Publisher

unverified uploader

A flutter plugin allows you to create native android floating window.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on android_window