RxString class
Rx class for String
Type.
- Inheritance
-
- Object
- RxInterface<
String> - RxNotifier<
String> - Rx<
String> - RxString
- Implemented types
- Available extensions
Properties
- canUpdate → bool
-
no setterinherited
-
codeUnits
→ List<
int> -
Available on Rx<
Returns an unmodifiable list of the UTF-16 code units of this string.String> , provided by the RxStringExt extensionno setter - firstRebuild ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Available on Rx<
Returns true if this string is empty.String> , provided by the RxStringExt extensionno setter - isNotEmpty → bool
-
Available on Rx<
Returns true if this string is not empty.String> , provided by the RxStringExt extensionno setter - runes → Runes
-
Available on Rx<
Returns an Iterable of Unicode code-points of this string.String> , provided by the RxStringExt extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentToStream ↔ bool
-
getter/setter pairinherited
-
stream
→ Stream<
String> -
no setterinherited
- string → String
-
Same as
toString()
but using a getter.no setterinherited -
subject
↔ GetStream<
String> -
getter/setter pairinherited
- value ↔ String
-
Returns the current value
getter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
inherited
-
addListener(
GetStream< String> rxGetx) → void -
This is an internal method.
Subscribe to changes on the inner stream.
inherited
-
allMatches(
String string, [int start = 0]) → Iterable< Match> -
Available on Rx<
String> , provided by the RxStringExt extension -
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 Rxinherited -
call(
[String? v]) → String -
updates the value to
null
and adds it to the Stream. Even with null-safety coming, is still an important feature to support, ascall()
doesn't acceptnull
values. For instance,InputDecoration.errorText
has to be null to not show the "error state".inherited -
close(
) → void -
Closes the subscriptions for this Rx, releasing the resources.
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 -
contains(
Pattern other, [int startIndex = 0]) → bool -
Available on Rx<
Returns true if this string contains a match ofString> , provided by the RxStringExt extensionother
: -
endsWith(
String other) → bool -
Available on Rx<
Returns true if this string ends withString> , provided by the RxStringExt extensionother
. For example: -
indexOf(
Pattern pattern, [int start = 0]) → int -
Available on Rx<
Returns the position of the first match ofString> , provided by the RxStringExt extensionpattern
in this string -
lastIndexOf(
Pattern pattern, [int? start]) → int -
Available on Rx<
Returns the starting position of the last matchString> , provided by the RxStringExt extensionpattern
in this string, searching backward starting atstart
, inclusive: -
listen(
void onData(String), {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< String> -
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? -
Matches this pattern against the start of
string
.override -
matchAsPrefix(
String string, [int start = 0]) → Match? -
Available on Rx<
String> , provided by the RxStringExt extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
padLeft(
int width, [String padding = ' ']) → String -
Available on Rx<
Pads this string on the left if it is shorter thanString> , provided by the RxStringExt extensionwidth
. -
padRight(
int width, [String padding = ' ']) → String -
Available on Rx<
Pads this string on the right if it is shorter thanString> , provided by the RxStringExt extensionwidth
. Return a new string that appendspadding
after this string one time for each position the length is less thanwidth
. -
refresh(
) → void -
Makes a direct update of value adding it to the Stream
useful when you make use of Rx for custom Types to referesh your UI.
inherited
-
replaceAll(
Pattern from, String replace) → String -
Available on Rx<
Replaces all substrings that matchString> , provided by the RxStringExt extensionfrom
withreplace
. -
split(
Pattern pattern) → List< String> -
Available on Rx<
Splits the string at matches ofString> , provided by the RxStringExt extensionpattern
and returns a list of substrings. -
startsWith(
Pattern pattern, [int index = 0]) → bool -
Available on Rx<
Returns true if this string starts with a match ofString> , provided by the RxStringExt extensionpattern
. -
substring(
int startIndex, [int? endIndex]) → String -
Available on Rx<
Returns the substring of this string that extends fromString> , provided by the RxStringExt extensionstartIndex
, inclusive, toendIndex
, exclusive -
toJson(
) → dynamic -
Returns the json representation of
value
.inherited -
toLowerCase(
) → String -
Available on Rx<
Converts all characters in this string to lower case. If the string is already in all lower case, this method returnsString> , provided by the RxStringExt extensionthis
. -
toString(
) → String -
A string representation of this object.
inherited
-
toUpperCase(
) → String -
Available on Rx<
Converts all characters in this string to upper case. If the string is already in all upper case, this method returnsString> , provided by the RxStringExt extensionthis
. -
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<
Returns the string without any leading and trailing whitespace.String> , provided by the RxStringExt extension -
trimLeft(
) → String -
Available on Rx<
Returns the string without any leading whitespace.String> , provided by the RxStringExt extension -
trimRight(
) → String -
Available on Rx<
Returns the string without any trailing whitespace.String> , provided by the RxStringExt extension -
update(
void 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 -
operator ==(
Object o) → bool -
This equality override works for _RxImpl instances and the internal
values.
inherited