GetSystemPowerStatus function Null safety kernel32

int GetSystemPowerStatus(
  1. Pointer<SYSTEM_POWER_STATUS> lpSystemPowerStatus

Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, how much battery life remains, and if battery saver is on or off.

BOOL GetSystemPowerStatus(


int GetSystemPowerStatus(Pointer<SYSTEM_POWER_STATUS> lpSystemPowerStatus) {
  final _GetSystemPowerStatus = _kernel32.lookupFunction<
          Int32 Function(Pointer<SYSTEM_POWER_STATUS> lpSystemPowerStatus),
          int Function(Pointer<SYSTEM_POWER_STATUS> lpSystemPowerStatus)>(
  return _GetSystemPowerStatus(lpSystemPowerStatus);