FakeLocalDiscoverySession class
A fake controllable LocalDiscoverySession for testing.
- Implemented types
Constructors
-
FakeLocalDiscoverySession({List<
LocalDevice> initialDevices = const <LocalDevice>[]})
Properties
-
currentDevices
→ List<
LocalDevice> -
no setter
-
events
→ Stream<
LocalDiscoveryEvent> -
The stream of events emitted by this session.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The unique identifier of this session.
no setteroverride
-
initialDevices
→ List<
LocalDevice> -
final
- isPaused ↔ bool
-
getter/setter pair
- isStopped ↔ bool
-
getter/setter pair
- request → LocalDiscoveryRequest
-
The request that created this session.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → LocalDiscoverySessionState
-
The current state of this session.
no setteroverride
Methods
-
addDevice(
LocalDevice device) → void - Adds a device and emits a LocalDeviceAdded event.
-
getDiagnostics(
) → Future< LocalDiscoveryDiagnostics> - Diagnostics helper for testing.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
Pauses this session.
override
-
resume(
) → Future< void> -
Resumes this session.
override
-
snapshot(
) → Future< LocalDiscoverySnapshot> -
Returns a snapshot of the current discovery state.
override
-
stop(
) → Future< void> -
Stops this session and releases all resources.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited