onTrafficUpdate property

Stream<Map<String, dynamic>> get onTrafficUpdate

Stream of traffic statistics updates

Emits a map with the following keys:

  • "uplinkSpeed": long (bytes per second)
  • "downlinkSpeed": long (bytes per second)
  • "uplinkTotal": long (total bytes sent)
  • "downlinkTotal": long (total bytes received)
  • "connectionsIn": int (number of inbound connections)
  • "connectionsOut": int (number of outbound connections)
  • "sessionUplink": long (bytes sent in current session)
  • "sessionDownlink": long (bytes received in current session)
  • "sessionTotal": long (total bytes in current session)
  • "formattedUplinkSpeed": String (human readable, e.g. "1.24 KB/s")
  • "formattedDownlinkSpeed": String (human readable)
  • "formattedUplinkTotal": String (human readable)
  • "formattedDownlinkTotal": String (human readable)
  • "formattedSessionUplink": String (human readable)
  • "formattedSessionDownlink": String (human readable)
  • "formattedSessionTotal": String (human readable)

Implementation

Stream<Map<String, dynamic>> get onTrafficUpdate {
  return FlutterSingboxPlatform.instance.onTrafficUpdate;
}