mac_menu_bar 0.0.1 copy "mac_menu_bar: ^0.0.1" to clipboard
mac_menu_bar: ^0.0.1 copied to clipboard

PlatformmacOS

A Flutter plugin that provides access to macOS menu bar actions, allowing Flutter applications to handle standard menu items like Cut, Copy, Paste, and Select All with custom behavior.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
    MacMenuBar.onPaste(() async {
      debugPrint('Paste menu item selected');
      return true;
    });
  }


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(child: TextField()),
      ),
    );
  }
}
1
likes
150
points
145
downloads

Publisher

verified publisherdetuksa.com

Weekly Downloads

A Flutter plugin that provides access to macOS menu bar actions, allowing Flutter applications to handle standard menu items like Cut, Copy, Paste, and Select All with custom behavior.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on mac_menu_bar

Packages that implement mac_menu_bar