PersistedNullableStringSignal class

A PersistedSignal that stores a nullable string value.

!warning An empty value is considered null

Inheritance
Available extensions

Constructors

PersistedNullableStringSignal(String? val, String key, {SignalsKeyValueStore? store})
Creates a new NullableStringSignal.

Properties

autoDispose bool
Throws and error if read after dispose and can be disposed on last unsubscribe.
getter/setter pairinherited
codeUnits List<int>

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

An unmodifiable list of the UTF-16 code units of this string.
no setter
debugLabel String?
Debug label for Debug Mode
finalinherited
disposed bool
Check if the effect is disposed
getter/setter pairinherited
equalityCheck bool Function(String? a, String? b)
Optional method to check if to values are the same
getter/setter pairinherited
globalId int
Global ID of the signal
finalinherited
hashCode int
The hash code for this object.
no setterinherited
internalValue String?
no setterinherited
isEmpty bool

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Whether this string is empty.
no setter
isInitialized bool
Check if a signal value is set (does not subscribe)
no setterinherited
isNotEmpty bool

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Whether this string is not empty.
no setter
key String
The key to use for storing the value.
finalinherited
length int

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The length of the string.
no setter
loaded bool
Whether the signal has been loaded from the store.
getter/setter pairinherited
runes Runes

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

An Iterable of Unicode code-points of this string.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
store SignalsKeyValueStore
The store to use for storing the value.
finalinherited
value String?
Compute the current value
getter/setter pairinherited
version int
Version numbers should always be >= 0, because the special value -1 is used by Nodes to signify potentially unused but recyclable nodes.
getter/setter pairinherited

Methods

afterCreate(String? val) → void
Internal hook for after a signal is created
inherited
beforeUpdate(String? val) → void
Internal hook for after a signal is updated
inherited
call() String?
Return the value when invoked
inherited
codeUnitAt(int index) int

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Returns the 16-bit UTF-16 code unit at the given index.
contains(Pattern other, [int startIndex = 0]) bool

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Whether this string contains a match of other.
decode(String value) String?
Decodes the value from a string.
override
dispose() → void
Dispose the signal
inherited
encode(String? value) String
Encodes the value to a string.
override
endsWith(String other) bool

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Whether this string ends with other.
get() String?
Helper method to get the current value
inherited
indexOf(Pattern pattern, [int start = 0]) int

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Returns the position of the first match of pattern in this string, starting at start, inclusive:
init() Future<void>
Initializes the signal by loading the value from the store.
inherited
internalRefresh() bool
inherited
lastIndexOf(Pattern pattern, [int? start]) int

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The starting position of the last match pattern in this string.
load() Future<String?>
Loads the value from the store.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(void cleanup()) → void Function()
Add a cleanup function to be called when the signal is disposed
inherited
overrideWith(String? val) Signal<String?>
Override the current signal with a new value as if it was created with it
inherited
padLeft(int width, [String padding = ' ']) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Pads this string on the left if it is shorter than width.
padRight(int width, [String padding = ' ']) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Pads this string on the right if it is shorter than width.
peek() String?
In the rare instance that you have an effect that should write to another signal based on the previous value, but you don't want the effect to be subscribed to that signal, you can read a signals's previous value via signal.peek().
inherited
readonly() ReadonlySignal<String?>
Returns a readonly signal
inherited
replaceAll(Pattern from, String replace) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Replaces all substrings that match from with replace.
replaceAllMapped(Pattern from, String replace(Match match)) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Replace all substrings that match from by a computed string.
replaceFirst(Pattern from, String to, [int startIndex = 0]) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Creates a new string with the first occurrence of from replaced by to.
replaceFirstMapped(Pattern from, String replace(Match match), [int startIndex = 0]) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Replace the first occurrence of from in this string.
replaceRange(int start, int? end, String replacement) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Replaces the substring from start to end with replacement.
save(String? value) Future<void>
Saves the value to the store.
inherited
set(String? val, {bool force = false}) bool
Set the current value by a method
inherited
split(Pattern pattern) List<String>

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Splits the string at matches of pattern and returns a list of substrings.
splitMapJoin(Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Splits the string, converts its parts, and combines them into a new string.
startsWith(Pattern pattern, [int index = 0]) bool

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Whether this string starts with a match of pattern.
subscribe(void fn(String? value)) → void Function()
Subscribe to value changes with a dispose function
inherited
subscribeToNode(Node node) → void
inherited
substring(int start, [int? end]) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The substring of this string from start, inclusive, to end, exclusive.
toJson() → dynamic
Convert value to JSON
inherited
toLowerCase() String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Converts all characters in this string to lower case.
toString() String
A string representation of this object.
inherited
toUpperCase() String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Converts all characters in this string to upper case.
trim() String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The string without any leading and trailing whitespace.
trimLeft() String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The string without any leading whitespace.
trimRight() String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The string without any trailing whitespace.
unsubscribeFromNode(Node node) → void
inherited

Operators

operator *(int times) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Creates a new string by concatenating this string with itself a number of times.
operator +(String other) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

Creates a new string by concatenating this string with other.
operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) String

Available on ReadonlySignal<String>, provided by the StringSignalExtension extension

The character (as a single-code-unit String) at the given index.