keypress_simulator 0.1.0 copy "keypress_simulator: ^0.1.0" to clipboard
keypress_simulator: ^0.1.0 copied to clipboard

PlatformmacOSWindows
outdated

This plugin allows Flutter desktop apps to simulate key presses.

example/lib/main.dart

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

import './pages/home.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  hotKeyManager.unregisterAll();

  runApp(const MyApp());
}

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

  @override
  _MyAppState 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(),
    );
  }
}
16
likes
140
pub points
74%
popularity

Publisher

verified publisherleanflutter.dev

This plugin allows Flutter desktop apps to simulate key presses.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on keypress_simulator