close_key_nswindow 1.0.0 copy "close_key_nswindow: ^1.0.0" to clipboard
close_key_nswindow: ^1.0.0 copied to clipboard

PlatformmacOS
outdated

Call `close` or `performClose` on key `NSWindow`.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:close_key_nswindow/close_key_nswindow.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _closeKeyNswindowPlugin = CloseKeyNswindow();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Container(
          padding: const EdgeInsets.all(20),
          child: Column(
            children: [
              OutlinedButton(
                  onPressed: () => _closeKeyNswindowPlugin.close(),
                  child: const Text('close')),
              OutlinedButton(
                  onPressed: () => _closeKeyNswindowPlugin.performClose(),
                  child: const Text('performClose')),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
30
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

Call `close` or `performClose` on key `NSWindow`.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on close_key_nswindow