iosBatteryInfoStream property

Stream<IosBatteryInfo?> iosBatteryInfoStream

Returns a stream of IsoBatteryInfo data that is pushed out to the subscribers on updates

Implementation

Stream<IosBatteryInfo?> get iosBatteryInfoStream {
  return streamChannel.receiveBroadcastStream().map((data) {
    try {
      final converted = IosBatteryInfo.fromJson(Map.from(data));
      return converted;
    } on PlatformException catch (e) {
      print(e.message);
      return null;
    }
  });
}