Line class

A menu item.

final Line line = Line(book, () => b.message('Testing.'), stringTitle: 'Test');

Constructors

Line(Book book, BookFunctionType func, {String titleString, TitleFunctionType titleFunc, TitleFunctionType soundUrl})
Create a line.

Properties

book Book
The book which this line is bound to, via a Page instance.
read / write
func BookFunctionType
The function which will be called when this line is in focus, and Book.activate is called.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
soundUrl TitleFunctionType
A function which should return the URL of the sound to play when this line is selected.
read / write
titleFunc TitleFunctionType
A function which when called should return the title of this line. Useful in circumstances where the title might change. On a configuration page for example.
read / write
titleString String
The title of this menu item as a string.
read / write

Methods

getTitle() String
Returns the title of this item as a string. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

checkboxLine(Book book, TitleFunctionType titleFunc, bool getValue(), void setValue(bool), {String enableUrl = 'sounds/menus/enable.wav', String disableUrl = 'sounds/menus/disable.wav'}) Line
A line that acts as a checkbox. [...]