device_manager

Creator: coderz1093

Last updated:

0 purchases

device_manager Image
device_manager Images

Languages

Categories

Add to Cart

Description:

device manager

Device Manager for Flutter #
device_manager is a simple transmitter for the WM_DEVICECHANGE message.
In other words, your Flutter Win32 App will be notified anytime there is a new hardware device connected to the computer.
Supported platforms:

Windows

Usage #
To use this package, add device_manager as a dependency in your pubspec.yaml file.
Now go to lib\main.dart and add this code in the main function right after runApp(MyApp()); :
DeviceManager().addListener(() {
scaffoldKey.currentState!.showSnackBar(const SnackBar(content: Text('New device detected!')));
});
copied to clipboard
This listener will be called anytime a device had been connected.
You can find examples in the example folder.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.