getDouble function
Prompts the user to enter a double.
color
, defaultsTo
, inputColor
, conceal
, and chevron
are forwarded to get.
Implementation
double getDouble(String message,
{double? defaultsTo,
bool color = true,
bool chevron = true,
@deprecated bool colon = true,
bool conceal = false,
AnsiCode inputColor = cyan}) {
return double.parse(get(
message,
defaultsTo: defaultsTo?.toString(),
chevron: chevron && colon,
inputColor: inputColor,
color: color,
conceal: conceal,
validate: (s) => double.tryParse(s) != null,
));
}