RecordingHintObserver class

A HintObserver that records what it hears.

Register it with HintRegistry.instance.addObserver(...) — and remember resetHintKit, or it will still be listening in the next test:

final recorder = RecordingHintObserver();
HintRegistry.instance.addObserver(recorder);
// ...
expect(recorder.events, <String>['show:save-tip', 'dismiss:save-tip']);
Inheritance

Constructors

RecordingHintObserver()
Creates an empty recorder.

Properties

dismissed List<HintEvent>
The full events for hints that were dismissed.
final
events List<String>
Everything heard so far, in order, as short 'kind:subject' strings.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shown List<HintEvent>
The full events for hints that were shown, when the strings are not enough.
final

Methods

clear() → void
Forgets everything recorded so far.
didChangeTourStep(String tour, int index) → void
A tour moved to index, including to its first step.
override
didDismissHint(HintEvent event) → void
A hint bubble closed.
override
didEndTour(String tour, TourEndReason reason) → void
A tour ended, for reason.
override
didShowHint(HintEvent event) → void
A hint bubble opened.
override
didStartTour(String tour) → void
A tour started, before its first step is shown.
override
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