ScrollbackBuffer class

The ScrollbackBuffer class is a utility for handling multi-line user input in readline(). It doesn't support history editing a la bash, but it should handle the most common use cases.

Constructors

ScrollbackBuffer({required bool recordBlanks})

Properties

currentLineBuffer String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lineIndex int?
getter/setter pair
lineList List<String>
final
recordBlanks bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String buffer) → void
Add a new line to the scrollback buffer. This would normally happen when the user finishes typing/editing the line and taps the 'enter' key.
down() String?
Scroll 'down' -- Replace the user-input buffer with the contents of the next line. The final 'next line' is the original contents of the line buffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
up(String buffer) String
Scroll 'up' -- Replace the user-input buffer with the contents of the previous line. ScrollbackBuffer tracks which lines are the 'current' and 'previous' lines. The up() method stores the current line buffer so that the contents will not be lost in the event the user starts typing/editing the line and then wants to review a previous line.

Operators

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