RxString class

Rx class for String Type.

Inheritance
Implemented types
Available extensions

Constructors

RxString(String val)
Creates an RxString with the given initial value.

Properties

codeUnits List<int>

Available on Rx<String>, provided by the RxStringExt extension

Returns an unmodifiable list of the UTF-16 code units of this string.
no setter
firstRebuild bool
Whether this is the first rebuild cycle for this Rx value.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether this notifier has been disposed.
no setterinherited
isEmpty bool

Available on Rx<String>, provided by the RxStringExt extension

Returns true if this string is empty.
no setter
isNotEmpty bool

Available on Rx<String>, provided by the RxStringExt extension

Returns true if this string is not empty.
no setter
listenersLength int
The current number of registered listeners.
no setterinherited
runes Runes

Available on Rx<String>, provided by the RxStringExt extension

Returns an Iterable of Unicode code-points of this string.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sentToStream bool
Whether the current value has been sent to the internal stream.
getter/setter pairinherited
stream Stream<String>
no setterinherited
string String
Same as toString() but using a getter.
no setterinherited
subject StreamController<String>
no setterinherited
value String
The current value of the object.
getter/setter pairinherited

Methods

addError(Object error, [StackTrace? stackTrace]) → void
inherited
addListener(GetStateUpdate listener) → Disposer
Registers a listener and returns a Disposer to unregister it.
inherited
addListenerId(Object? key, GetStateUpdate listener) → Disposer
Adds a listener to the group identified by key.
inherited
allMatches(String string, [int start = 0]) Iterable<Match>

Available on Rx<String>, provided by the RxStringExt extension

Returns all non-overlapping matches of string by this pattern.
allMatches(String string, [int start = 0]) Iterable<Match>
Matches this pattern against the string repeatedly.
override
bindStream(Stream<String> stream) → void
Binds an existing Stream<T> to this Rx<T> to keep the values in sync. You can bind multiple sources to update the value. Closing the subscription will happen automatically when the observer Widget (GetX or Obx) gets unmounted from the Widget tree.
inherited
call([String? v]) String
Makes a direct update of value adding it to the Stream useful when you make use of Rx for custom Types to refresh your UI.
inherited
close() → void
Close the Rx Variable
inherited
compareTo(String other) int
Compares this object to another object.
override
compareTo(String other) int

Available on Rx<String>, provided by the RxStringExt extension

Compares this string to other.
contains(Pattern other, [int startIndex = 0]) bool

Available on Rx<String>, provided by the RxStringExt extension

Returns true if this string contains a match of other:
containsId(Object id) bool
Returns true if a listener group with the given id exists.
inherited
containsListener(GetStateUpdate listener) bool
Returns true if listener is currently registered.
inherited
dispose() → void
Disposes all listeners and marks the notifier as disposed.
inherited
disposeId(Object id) → void
To dispose an id from future updates(), this ids are registered by GetBuilder() or similar, so is a way to unlink the state change with the Widget from the Controller.
inherited
endsWith(String other) bool

Available on Rx<String>, provided by the RxStringExt extension

Returns true if this string ends with other. For example:
indexOf(Pattern pattern, [int start = 0]) int

Available on Rx<String>, provided by the RxStringExt extension

Returns the position of the first match of pattern in this string
lastIndexOf(Pattern pattern, [int? start]) int

Available on Rx<String>, provided by the RxStringExt extension

Returns the starting position of the last match pattern in this string, searching backward starting at start, inclusive:
listen(void onData(String)?, {Function? onError, void onDone()?, bool? cancelOnError}) StreamSubscription<String>
Calls callback with current value, when the value changes.
inherited
listenAndPump(void onData(String event), {Function? onError, void onDone()?, bool? cancelOnError}) StreamSubscription<String>
Returns a StreamSubscription similar to listen, but with the added benefit that it primes the stream with the current value, rather than waiting for the next value. This should not be called in onInit or anywhere else during the build process.
inherited
map<R>(R mapper(String? data)) Stream<R>
inherited
matchAsPrefix(String string, [int start = 0]) Match?

Available on Rx<String>, provided by the RxStringExt extension

Matches this pattern against the start of string.
matchAsPrefix(String string, [int start = 0]) Match?
Matches this pattern against the start of string.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyGroupChildrens(Object id) → void
Reports a read to the Notifier system for the group identified by id.
inherited
padLeft(int width, [String padding = ' ']) String

Available on Rx<String>, provided by the RxStringExt extension

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

Available on Rx<String>, provided by the RxStringExt extension

Pads this string on the right if it is shorter than width. Return a new string that appends padding after this string one time for each position the length is less than width.
refresh() → void
Notifies all registered listeners to trigger a rebuild.
inherited
refreshGroup(Object id) → void
Notifies all listeners in the group identified by id.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
removeListenerId(Object id, VoidCallback listener) → void
Removes a listener from the group identified by id.
inherited
replaceAll(Pattern from, String replace) String

Available on Rx<String>, provided by the RxStringExt extension

Replaces all substrings that match from with replace.
reportAdd(VoidCallback disposer) → void
Reports a disposer callback to the Notifier system for cleanup.
inherited
reportRead() → void
Reports a read access to the Notifier system so reactive widgets can track dependencies.
inherited
split(Pattern pattern) List<String>

Available on Rx<String>, provided by the RxStringExt extension

Splits the string at matches of pattern and returns a list of substrings.
startsWith(Pattern pattern, [int index = 0]) bool

Available on Rx<String>, provided by the RxStringExt extension

Returns true if this string starts with a match of pattern.
substring(int startIndex, [int? endIndex]) String

Available on Rx<String>, provided by the RxStringExt extension

Returns the substring of this string that extends from startIndex, inclusive, to endIndex, exclusive
toJson() → dynamic
Returns the json representation of value.
inherited
toLowerCase() String

Available on Rx<String>, provided by the RxStringExt extension

Converts all characters in this string to lower case. If the string is already in all lower case, this method returns this.
toString() String
A string representation of this object.
inherited
toUpperCase() String

Available on Rx<String>, provided by the RxStringExt extension

Converts all characters in this string to upper case. If the string is already in all upper case, this method returns this.
trigger(String v) → void
Following certain practices on Rx data, we might want to react to certain listeners when a value has been provided, even if the value is the same. At the moment, we ignore part of the process if we .call(value) with the same value since it holds the value and there's no real need triggering the entire process for the same value inside, but there are other situations where we might be interested in triggering this.
inherited
trim() String

Available on Rx<String>, provided by the RxStringExt extension

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

Available on Rx<String>, provided by the RxStringExt extension

Returns the string without any leading whitespace.
trimRight() String

Available on Rx<String>, provided by the RxStringExt extension

Returns the string without any trailing whitespace.
update(String fn(String? val)) → void
Uses a callback to update value internally, similar to refresh, but provides the current value as the argument. Makes sense for custom Rx types (like Models).
inherited

Operators

operator +(String val) String

Available on Rx<String>, provided by the RxStringExt extension

Concatenation operator.
operator ==(Object o) bool
This equality override works for _RxImpl instances and the internal values.
inherited