LipList class
A fluent, chainable list builder inspired by Go's lipgloss list.
final groceries = LipList.create([
'Bananas',
'Barley',
'Cashews',
LipList.create(['Almond Milk', 'Coconut Milk', 'Full Fat Milk']),
'Eggs',
]);
print(groceries);
Constructors
- LipList({RenderConfig renderConfig = const RenderConfig()})
- LipList.create(List items, {RenderConfig renderConfig = const RenderConfig()})
-
Creates a new list with the given items.
factory
Properties
Methods
-
enumerator(
ListEnumeratorFunc fn) → LipList - Sets the list enumerator.
-
enumeratorStyle(
Style style) → LipList - Sets a static style for all enumerators.
-
enumeratorStyleFunc(
ListStyleFunc fn) → LipList - Sets a function to determine enumerator style per-item.
-
hide(
[]) → LipList - Hides this list from rendering.
-
indenter(
ListIndenterFunc fn) → LipList - Sets the indenter for nested items.
-
indenterStyle(
Style style) → LipList - Sets a static style for all indenters.
-
indenterStyleFunc(
ListStyleFunc fn) → LipList - Sets the indenter style function for list items.
-
item(
dynamic item) → LipList - Adds a single item to the list.
-
items(
List items) → LipList - Adds multiple items to the list.
-
itemStyle(
Style style) → LipList - Sets a static style for all items.
-
itemStyleFunc(
ListStyleFunc fn) → LipList - Sets a function to determine item style per-item.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
int start, [int end = 0]) → LipList - Sets the start and end offset for the list.
-
render(
) → String - Renders the list to a string.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited