callGetStatistics method

Future<List<List<DBusValue>>> callGetStatistics(
  1. String type, {
  2. bool noAutoStart = false,
  3. bool allowInteractiveAuthorization = false,
})

Invokes org.freedesktop.UPower.Device.GetStatistics()

Implementation

Future<List<List<DBusValue>>> callGetStatistics(
  String type, {
  bool noAutoStart = false,
  bool allowInteractiveAuthorization = false,
}) async {
  var result = await callMethod(
    'org.freedesktop.UPower.Device',
    'GetStatistics',
    [DBusString(type)],
    replySignature: DBusSignature('a(dd)'),
    noAutoStart: noAutoStart,
    allowInteractiveAuthorization: allowInteractiveAuthorization,
  );
  return result.returnValues[0]
      .asArray()
      .map((child) => child.asStruct())
      .toList();
}