PersistedNullableStringSignal class
A PersistedSignal
that stores a nullable string value.
!warning
An empty value is considered null
- Inheritance
-
- Object
- Signal<
String?> - PersistedSignal<
String?> - PersistedNullableStringSignal
- 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<
An unmodifiable list of the UTF-16 code units of this string.String> , provided by the StringSignalExtension extensionno 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<
Whether this string is empty.String> , provided by the StringSignalExtension extensionno setter - isInitialized → bool
-
Check if a signal value is set (does not subscribe)
no setterinherited
- isNotEmpty → bool
-
Available on ReadonlySignal<
Whether this string is not empty.String> , provided by the StringSignalExtension extensionno setter - key → String
-
The key to use for storing the value.
finalinherited
- length → int
-
Available on ReadonlySignal<
The length of the string.String> , provided by the StringSignalExtension extensionno setter - loaded ↔ bool
-
Whether the signal has been loaded from the store.
getter/setter pairinherited
- runes → Runes
-
Available on ReadonlySignal<
An Iterable of Unicode code-points of this string.String> , provided by the StringSignalExtension extensionno 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<
Returns the 16-bit UTF-16 code unit at the givenString> , provided by the StringSignalExtension extensionindex
. -
contains(
Pattern other, [int startIndex = 0]) → bool -
Available on ReadonlySignal<
Whether this string contains a match ofString> , provided by the StringSignalExtension extensionother
. -
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<
Whether this string ends withString> , provided by the StringSignalExtension extensionother
. -
get(
) → String? -
Helper method to get the current value
inherited
-
indexOf(
Pattern pattern, [int start = 0]) → int -
Available on ReadonlySignal<
Returns the position of the first match ofString> , provided by the StringSignalExtension extensionpattern
in this string, starting atstart
, 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<
The starting position of the last matchString> , provided by the StringSignalExtension extensionpattern
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<
Pads this string on the left if it is shorter thanString> , provided by the StringSignalExtension extensionwidth
. -
padRight(
int width, [String padding = ' ']) → String -
Available on ReadonlySignal<
Pads this string on the right if it is shorter thanString> , provided by the StringSignalExtension extensionwidth
. -
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<
Replaces all substrings that matchString> , provided by the StringSignalExtension extensionfrom
withreplace
. -
replaceAllMapped(
Pattern from, String replace(Match match)) → String -
Available on ReadonlySignal<
Replace all substrings that matchString> , provided by the StringSignalExtension extensionfrom
by a computed string. -
replaceFirst(
Pattern from, String to, [int startIndex = 0]) → String -
Available on ReadonlySignal<
Creates a new string with the first occurrence ofString> , provided by the StringSignalExtension extensionfrom
replaced byto
. -
replaceFirstMapped(
Pattern from, String replace(Match match), [int startIndex = 0]) → String -
Available on ReadonlySignal<
Replace the first occurrence ofString> , provided by the StringSignalExtension extensionfrom
in this string. -
replaceRange(
int start, int? end, String replacement) → String -
Available on ReadonlySignal<
Replaces the substring fromString> , provided by the StringSignalExtension extensionstart
toend
withreplacement
. -
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<
Splits the string at matches ofString> , provided by the StringSignalExtension extensionpattern
and returns a list of substrings. -
splitMapJoin(
Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) → String -
Available on ReadonlySignal<
Splits the string, converts its parts, and combines them into a new string.String> , provided by the StringSignalExtension extension -
startsWith(
Pattern pattern, [int index = 0]) → bool -
Available on ReadonlySignal<
Whether this string starts with a match ofString> , provided by the StringSignalExtension extensionpattern
. -
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<
The substring of this string fromString> , provided by the StringSignalExtension extensionstart
, inclusive, toend
, exclusive. -
toJson(
) → dynamic -
Convert value to JSON
inherited
-
toLowerCase(
) → String -
Available on ReadonlySignal<
Converts all characters in this string to lower case.String> , provided by the StringSignalExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
toUpperCase(
) → String -
Available on ReadonlySignal<
Converts all characters in this string to upper case.String> , provided by the StringSignalExtension extension -
trim(
) → String -
Available on ReadonlySignal<
The string without any leading and trailing whitespace.String> , provided by the StringSignalExtension extension -
trimLeft(
) → String -
Available on ReadonlySignal<
The string without any leading whitespace.String> , provided by the StringSignalExtension extension -
trimRight(
) → String -
Available on ReadonlySignal<
The string without any trailing whitespace.String> , provided by the StringSignalExtension extension -
unsubscribeFromNode(
Node node) → void -
inherited
Operators
-
operator *(
int times) → String -
Available on ReadonlySignal<
Creates a new string by concatenating this string with itself a number of times.String> , provided by the StringSignalExtension extension -
operator +(
String other) → String -
Available on ReadonlySignal<
Creates a new string by concatenating this string withString> , provided by the StringSignalExtension extensionother
. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → String -
Available on ReadonlySignal<
The character (as a single-code-unit String) at the givenString> , provided by the StringSignalExtension extensionindex
.