powerman_win32 0.0.1
powerman_win32: ^0.0.1 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.acLineStatus,
builder: (context, snapshot) => Text(snapshot.data?.toString() ?? '-'),
),