hotkey_manager 0.2.3 copy "hotkey_manager: ^0.2.3" to clipboard
hotkey_manager: ^0.2.3 copied to clipboard

This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

example/lib/main.dart

import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:hotkey_manager/hotkey_manager.dart';
import 'package:hotkey_manager_example/pages/home.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await hotKeyManager.unregisterAll();

  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primaryColor: const Color(0xff416ff4),
        canvasColor: Colors.white,
        scaffoldBackgroundColor: const Color(0xffF7F9FB),
        dividerColor: Colors.grey.withOpacity(0.3),
      ),
      builder: BotToastInit(),
      navigatorObservers: [BotToastNavigatorObserver()],
      home: const HomePage(),
    );
  }
}
copied to clipboard
125
likes
150
points
8.61k
downloads

Publisher

verified publisherleanflutter.dev

Weekly Downloads

2024.09.16 - 2025.03.31

This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

Repository (GitHub)

Topics

#hotkey #shortcuts #global-hotkey #global-shortcuts

Documentation

API reference

License

MIT (license)

Dependencies

collection, flutter, hotkey_manager_linux, hotkey_manager_macos, hotkey_manager_platform_interface, hotkey_manager_windows, uuid

More

Packages that depend on hotkey_manager