flex library

A collection of classes, extensions and utilities to aid faster development.

Classes

Country
A representation of a country
IndexingOperatorWrapper<K, V>
Implements indexing behaviour in the form of retrieval by, setting by, and removal by keys
Language
A representation of a language
ListOperatorWrapper<E>
Implements List indexing behaviour in the form of retrieval by, setting by, and removal by int keys
Locale
A representation of a locale consisting of a language and, optionally, a country.
Localization
A set of localized messages/formats/etc. for locale
Localizations
A set of Localization for supportedLanguages
OperatorWrapper
Base class for basic operator wrappers
PatientStreamQueue<E>
A stream that queues events when it does not have a listener to accept them.

Enums

State
A representation of various common states

Extensions

AnsiColor on Color
Extensions to assist with color ANSI escape codes.
ExtIterable on Iterable<String>
Provides extension functions on Iterable with element type String
ExtString on String
Provides extension functions for String

Constants

encodedEventHeader → const String
Header for String encoded Plexus events
encodedEventSeparator → const String
Field seperator for String encoded Plexus events
formsOfYes → const Set<String>
Various ridiculous letter combinations that are generally accepted as "yes" in English.

Properties

iso8601NoTZ → DateFormat
A DateFormat implementing ISO 8601 without timezone
final
stdinLined Stream<String>
Wrapper around stdinUtf8 splitting at line endings
final
stdinUtf8 Stream<String>
Wrapper around sharedStdin providing each character as a String
final
userHome Directory
The user's home directory
no setter
whitespacePattern RegExp
A RegExp pattern for all horizontal whitespace characters,
final

Functions

asyncVoidHandler() Future<void>
Placeholder asynchronous callback
asyncVoidValueHandler(dynamic _) FutureOr<void>
Placeholder asynchronous event handler
prompt<T>(String question, {required FallbackBuilder<FutureOr<T>> fallback, String? hint, required LineParser<FutureOr<T>> parse, bool echo = true, bool debug = false}) Future<T>
Prompts the user through the console with question.
promptFor({required String prompt, String promptSuffix = ' >>> ', bool echo = true}) String
Prompts the user to enter anything, with the option of not echoing stdin to stdout.
promptSync<T>(String question, {required FallbackBuilder<T> fallback, String? hint, required LineParser<T> parse, bool echo = true, bool debug = false}) → T
Prompts the user through the console with question.
shouldPrompt(String question, [bool def = true]) Future<bool>
Prompts the user through the console with question and returns their yes or no response.
shouldPromptSync(String question, [bool def = true]) bool
Prompts the user through the console with question and returns their yes or no response.
voidHandler() → void
Placeholder callback
voidValueHandler(dynamic _) → void
Placeholder event handler

Typedefs

Callback<R> = R Function()
A template for a standalone callback that returns a particular R
FallbackBuilder<T> = T Function()
FutureOrCallback<R> = FutureOr<R> Function()
A template for an optionally-asynchronous standalone callback that returns a particular R
FutureOrValue1Callback<V1, R> = FutureOr<R> Function(V1 value1)
A template for an optionally-asynchronous callback that returns a particular R when given a particular V1
FutureOrValue2Callback<V1, V2, R> = FutureOr<R> Function(V1 value1, V2 value2)
A template for an optionally-asynchronous callback that returns a particular R when given a particular V1 and V2
FutureOrValue3Callback<V1, V2, V3, R> = FutureOr<R> Function(V1 value1, V2 value2, V3 value3)
A template for an optionally-asynchronous callback that returns a particular R when given a particular V1, V2 and V3
FutureOrValueTest<V> = FutureOr<bool> Function(V value)
A template for an optionally-asynchronous callback that tests a value of type V
LineParser<T> = T Function(String line)
Value1Callback<V1, R> = R Function(V1 value1)
A template for a callback that returns a particular R when given a particular V
Value2Callback<V1, V2, R> = R Function(V1 value1, V2 value2)
A template for a callback that returns a particular R when given a particular V1 and V2
Value3Callback<V1, V2, V3, R> = R Function(V1 value1, V2 value2, V3 value3)
A template for a callback that returns a particular R when given a particular V1, V2 and V3
ValueTest<V> = bool Function(V value)
A template for a callback that tests a value of type V