powerman_win32 0.2.0
powerman_win32: ^0.2.0 copied to clipboard
A plugin to listen to Win32 power events such as AC power state, display on/off, and suspend/resume.
powerman_win32 #
A plugin to listen to Win32 power events such as AC power state, display on/off, and suspend/resume.
Getting Started #
Fristly, install the plugin:
flutter pub add powerman_win32
Add the codes to listen to events:
StreamBuilder(
stream: PowermanWin32.instance.systemPowerStatus,
builder: (context, snapshot) => Text(snapshot.data?.toString() ?? '-'),
),