PrinterConnectionEvent class
Immutable connection-lifecycle notification shared by PrinterService and BluetoothService.
Host apps can show a banner or dialog by listening to
PrinterService.connectionEvents or BluetoothService.connectionEvents.
Reconnection itself is handled by the services, so the UI is optional.
- Annotations
Constructors
- PrinterConnectionEvent({required PrinterConnectionEventType type, required String message, int attempt = 0, int maxAttempts = 0, Duration? nextRetry})
-
const
Properties
- attempt → int
-
1-based reconnect attempt, or
0when not applicable.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isRecovered → bool
-
no setter
- maxAttempts → int
-
Maximum number of attempts, or
0for unlimited.final - message → String
-
final
- nextRetry → Duration?
-
Delay before the attempt announced by this event.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → PrinterConnectionEventType
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited