ShowcaseState class abstract

What every demo needs to remember. Extend it with the data of your app and fill resetData to put that data back at the start.

A demo has a story. When the visitor reaches the end, call finish: the demo offers to start over, and if the visitor keeps looking around it starts over by itself at the next begin.

Inheritance

Constructors

ShowcaseState({bool highlightsEnabled = true})
Creates a ShowcaseState.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
highlightsEnabled → bool
final
isFinished → bool
Whether the visitor reached the end of the story.
no setter
notice → ValueNotifier<String?>
A short message for the visitor, shown above everything else for a moment.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
begin() → void
Call when a visitor starts a flow, so a demo that was finished starts from the beginning again.
dispose() → void
Discards any resources used by the object.
override
finish() → void
Marks the end of the story. The demo will offer to start over.
hasSeenHighlights(String id) → bool
Highlights explain a page once. After that they wait behind a small button instead of opening again. This is kept when the demo starts over.
markHighlightsSeen(String id) → void
Remembers that the highlights of page id have been shown.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
Starts over right away.
resetData() → void
Puts the data of the demo back at the start. Called by reset.
showNotice(String text) → void
Shows text as notice for a moment.
takeFinishPrompt() → bool
Returns whether the "demo finished" dialog still has to be shown, and marks it as shown.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited