TextFormUI class

A subtype of TextUI that accepts variable input from a user.

Data validation is up to the programmer. No "valid" types are assumed by present, and all answers return as a String.

However, displayInvalidEntry has been implemented to help guide users in the right direction.

Inheritance

Constructors

TextFormUI({Set<MenuModifiers> modifiers, Layouts layout = Layouts.VERTICAL})

Properties

hashCode int
The hash code for this object.
read-onlyinherited
layout Layouts
read / writeinherited
lines List<String>
The Strings of text that the TextUI should display
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
present({String preface, String prepend}) Map<String, String>
Ask the user to enter input for a series of prompts specified in this.lines.
override
promptModifierAdjustments() String
Generate a string based on MenuModifiers.
@protectedinherited
toString() String
A string representation of this object.
inherited
toStringIterative({String prepend, bool numberBullets = true}) List<String>
Format a new List of Strings from lines.
@protectedinherited
usesModifier(MenuModifiers modifier) bool
Determines whether or not the UI uses modifier.
inherited

Operators

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

Static Methods

displayInvalidEntry({String badAnswer, String typeName}) → void
Displays a custom error resulting from badAnswer, and clarifies the correct type typeName.
reviseAnswers(Map<String, String> prefacedData) Map<String, String>
Prompt user with the keys of prefacedData and let them change its values.