flutter_alert_window 0.1.1 copy "flutter_alert_window: ^0.1.1" to clipboard
flutter_alert_window: ^0.1.1 copied to clipboard

discontinued
PlatformAndroid

A flutter plugin to show a window even if device is locked

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_alert_window/configs/alert_type.dart';
import 'package:flutter_alert_window/flutter_alert_window.dart';

FlutterAlertWindow alert = FlutterAlertWindow();

void main() => runApp(const MyApp());

void onClose() {
  print("onClose");
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Flutter Alert Plugin')),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              Timer(
                const Duration(seconds: 5),
                () {
                  alert
                      .show(
                    time: '22:19',
                    title: 'عنوان احتمالا یادآوری',
                    description: 'توضیحات احمتالا یادآوری',
                    type: AlertType.alert,
                    onClose: onClose,
                  )
                      .then((value) {
                    Timer(
                      const Duration(seconds: 5),
                      () {
                        alert.close();
                      },
                    );
                  });
                },
              );
            },
            child: const Text('Show Alert'),
          ),
        ),
      ),
    );
  }
}
1
likes
150
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin to show a window even if device is locked

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_alert_window