ObservableNullableString class
Observable class for String
Type.
- Inheritance
-
- Object
- Stream<
String?> - StreamView<
String?> - StreamWithValue<
String?> - ObservableReadOnly<
String?> - Observable<
String?> - ObservableNullableString
- Implemented types
- Available extensions
Constructors
- ObservableNullableString(String? initialValue)
Properties
-
codeUnits
→ List<
int> ? -
Available on Observable<
Returns an unmodifiable list of the UTF-16 code units of this string.String?> , provided by the ObservablenStringExt extensionno setter -
codeUnits
→ List<
int> -
Available on Observable<
Returns an unmodifiable list of the UTF-16 code units of this string.String> , provided by the ObservableStringExt extensionno setter - done → Future
-
A future which is completed when the stream controller is done
sending events.
no setterinherited
- errorAndStackTrace ↔ ErrorAndStackTrace?
-
getter/setter pairinherited
- errorOrNull → Object?
-
Returns the last emitted error, or
null
if error events haven't yet been emitted.no setterinherited -
first
→ Future<
String?> -
The first element of this stream.
no setterinherited
- hasError → bool
-
Returns
true
when error is available, meaning this Stream has emitted at least one error.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListener → bool
-
Whether there is a subscriber on the Stream.
no setterinherited
- isBroadcast → bool
-
Whether this stream is a broadcast stream.
no setterinherited
- isClosed → bool
-
Whether the stream controller is closed for adding more events.
no setterinherited
-
isEmpty
→ Future<
bool> -
Whether this stream contains any elements.
no setterinherited
- isEmpty → bool?
-
Available on Observable<
Returns true if this string is empty.String?> , provided by the ObservablenStringExt extensionno setter - isEmpty → bool
-
Available on Observable<
Returns true if this string is empty.String> , provided by the ObservableStringExt extensionno setter - isNotEmpty → bool?
-
Available on Observable<
Returns true if this string is not empty.String?> , provided by the ObservablenStringExt extensionno setter - isNotEmpty → bool
-
Available on Observable<
Returns true if this string is not empty.String> , provided by the ObservableStringExt extensionno setter - isPaused → bool
-
Whether the subscription would need to buffer events.
no setterinherited
-
last
→ Future<
String?> -
The last element of this stream.
no setterinherited
-
length
→ Future<
int> -
The number of elements in this stream.
no setterinherited
- notifyOnlyIfChanged → bool
-
If true, listeners will be notified if new value not equals to old value
Default true
finalinherited
- onCancel ↔ ControllerCancelCallback?
-
The callback which is called when the stream is canceled.
getter/setter pairinherited
- onListen ↔ ControllerCallback?
-
The callback which is called when the stream is listened to.
getter/setter pairinherited
- onPause ↔ ControllerCallback
-
The callback which is called when the stream is paused.
getter/setter pairinherited
- onResume ↔ ControllerCallback
-
The callback which is called when the stream is resumed.
getter/setter pairinherited
- runes → Runes?
-
Available on Observable<
Returns an Iterable of Unicode code-points of this string.String?> , provided by the ObservablenStringExt extensionno setter - runes → Runes
-
Available on Observable<
Returns an Iterable of Unicode code-points of this string.String> , provided by the ObservableStringExt extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
single
→ Future<
String?> -
The single element of this stream.
no setterinherited
-
sink
→ StreamSink<
String?> -
Returns a view of this object that only exposes the StreamSink interface.
no setterinherited
- stackTrace → StackTrace?
-
Returns StackTrace of the last emitted error.
no setterinherited
-
stream
→ StreamWithValue<
String?> -
The stream that this controller is controlling.
no setterinherited
- value ↔ String?
-
Returns the last emitted value or initial value.
getter/setter pairinherited
Methods
-
add(
String? event) → void -
Sends a data
event
.inherited -
addError(
Object error, [StackTrace? stackTrace]) → void -
Sends or enqueues an error event.
inherited
-
addStream(
Stream< String?> source, {bool? cancelOnError}) → Future<void> -
Receives events from
source
and puts them into this controller's stream.inherited -
allMatches(
String string, [int start = 0]) → Iterable< Match> -
Available on Observable<
String> , provided by the ObservableStringExt extension -
allMatches(
String string, [int start = 0]) → Iterable< Match> ? -
Available on Observable<
String?> , provided by the ObservablenStringExt extension -
allMatches(
String string, [int start = 0]) → Iterable< Match> -
Matches this pattern against the string repeatedly.
override
-
any(
bool test(String? element)) → Future< bool> -
Checks whether
test
accepts any element provided by this stream.inherited -
asBroadcastStream(
{void onListen(StreamSubscription< String?> subscription)?, void onCancel(StreamSubscription<String?> subscription)?}) → Stream<String?> -
Returns a multi-subscription stream that produces the same events as this.
inherited
-
asyncExpand<
E> (Stream< E> ? convert(String? event)) → Stream<E> -
Transforms each element into a sequence of asynchronous events.
inherited
-
asyncMap<
E> (FutureOr< E> convert(String? event)) → Stream<E> -
Creates a new stream with each data event of this stream asynchronously
mapped to a new event.
inherited
-
call(
) → String? -
inherited
-
cast<
R> () → Stream< R> -
Adapt this stream to be a
Stream<R>
.inherited -
close(
) → Future -
Closes the stream.
inherited
-
compareTo(
String other) → int -
Compares this object to another object.
override
-
compareTo(
String other) → int -
Available on Observable<
String> , provided by the ObservableStringExt extension -
compareTo(
String other) → int? -
Available on Observable<
String?> , provided by the ObservablenStringExt extension -
contains(
Object? needle) → Future< bool> -
Returns whether
needle
occurs in the elements provided by this stream.inherited -
contains(
Pattern other, [int startIndex = 0]) → bool? -
Available on Observable<
Returns true if this string contains a match ofString?> , provided by the ObservablenStringExt extensionother
: -
contains(
Pattern other, [int startIndex = 0]) → bool -
Available on Observable<
Returns true if this string contains a match ofString> , provided by the ObservableStringExt extensionother
: -
dispose(
) → void -
Same as close, for IDisposable compatibility
inherited
-
distinct(
[bool equals(String? previous, String? next)?]) → Stream< String?> -
Skips data events if they are equal to the previous data event.
inherited
-
drain<
E> ([E? futureValue]) → Future< E> -
Discards all data on this stream, but signals when it is done or an error
occurred.
inherited
-
elementAt(
int index) → Future< String?> -
Returns the value of the
index
th data event of this stream.inherited -
endsWith(
String other) → bool -
Available on Observable<
Returns true if this string ends withString> , provided by the ObservableStringExt extensionother
. For example: -
endsWith(
String other) → bool? -
Available on Observable<
Returns true if this string ends withString?> , provided by the ObservablenStringExt extensionother
. For example: -
every(
bool test(String? element)) → Future< bool> -
Checks whether
test
accepts all elements provided by this stream.inherited -
expand<
S> (Iterable< S> convert(String? element)) → Stream<S> -
Transforms each element of this stream into a sequence of elements.
inherited
-
firstWhere(
bool test(String? element), {String? orElse()?}) → Future< String?> -
Finds the first element of this stream matching
test
.inherited -
fold<
S> (S initialValue, S combine(S previous, String? element)) → Future< S> -
Combines a sequence of values by repeatedly applying
combine
.inherited -
forEach(
void action(String? element)) → Future< void> -
Executes
action
on each element of this stream.inherited -
handleError(
Function onError, {bool test(dynamic error)?}) → Stream< String?> -
Creates a wrapper Stream that intercepts some errors from this stream.
inherited
-
indexOf(
Pattern pattern, [int start = 0]) → int -
Available on Observable<
Returns the position of the first match ofString> , provided by the ObservableStringExt extensionpattern
in this string -
indexOf(
Pattern pattern, [int start = 0]) → int? -
Available on Observable<
Returns the position of the first match ofString?> , provided by the ObservablenStringExt extensionpattern
in this string -
join(
[String separator = ""]) → Future< String> -
Combines the string representation of elements into a single string.
inherited
-
lastIndexOf(
Pattern pattern, [int? start]) → int? -
Available on Observable<
Returns the starting position of the last matchString?> , provided by the ObservablenStringExt extensionpattern
in this string, searching backward starting atstart
, inclusive: -
lastIndexOf(
Pattern pattern, [int? start]) → int -
Available on Observable<
Returns the starting position of the last matchString> , provided by the ObservableStringExt extensionpattern
in this string, searching backward starting atstart
, inclusive: -
lastWhere(
bool test(String? element), {String? orElse()?}) → Future< String?> -
Finds the last element in this stream matching
test
.inherited -
listen(
void onData(String? value)?, {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< String?> -
Adds a subscription to this stream.
inherited
-
map<
S> (S convert(String? event)) → Stream< S> -
Transforms each element of this stream into a new stream event.
inherited
-
matchAsPrefix(
String string, [int start = 0]) → Match? -
Available on Observable<
String> , provided by the ObservableStringExt extension -
matchAsPrefix(
String string, [int start = 0]) → Match? -
Available on Observable<
String?> , provided by the ObservablenStringExt extension -
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
-
onAdd(
String? event) → void -
An extension point for sub-classes. Perform any side-effect / state
management you need to here, rather than overriding the
add
method directly.inherited -
onAddError(
Object error, [StackTrace? stackTrace]) → void -
An extension point for sub-classes. Perform any side-effect / state
management you need to here, rather than overriding the
add
method directly.inherited -
padLeft(
int width, [String padding = ' ']) → String? -
Available on Observable<
Pads this string on the left if it is shorter thanString?> , provided by the ObservablenStringExt extensionwidth
. -
padLeft(
int width, [String padding = ' ']) → String -
Available on Observable<
Pads this string on the left if it is shorter thanString> , provided by the ObservableStringExt extensionwidth
. -
padRight(
int width, [String padding = ' ']) → String? -
Available on Observable<
Pads this string on the right if it is shorter thanString?> , provided by the ObservablenStringExt extensionwidth
. Return a new string that appendspadding
after this string one time for each position the length is less thanwidth
. -
padRight(
int width, [String padding = ' ']) → String -
Available on Observable<
Pads this string on the right if it is shorter thanString> , provided by the ObservableStringExt extensionwidth
. Return a new string that appendspadding
after this string one time for each position the length is less thanwidth
. -
pipe(
StreamConsumer< String?> streamConsumer) → Future -
Pipes the events of this stream into
streamConsumer
.inherited -
reduce(
String? combine(String? previous, String? element)) → Future< String?> -
Combines a sequence of values by repeatedly applying
combine
.inherited -
refresh(
) → void -
Triggers stream to send current value again to force listeners
inherited
-
replaceAll(
Pattern from, String replace) → String? -
Available on Observable<
Replaces all substrings that matchString?> , provided by the ObservablenStringExt extensionfrom
withreplace
. -
replaceAll(
Pattern from, String replace) → String -
Available on Observable<
Replaces all substrings that matchString> , provided by the ObservableStringExt extensionfrom
withreplace
. -
setError(
Object error, StackTrace? stackTrace) → void -
inherited
-
singleWhere(
bool test(String? element), {String? orElse()?}) → Future< String?> -
Finds the single element in this stream matching
test
.inherited -
skip(
int count) → Stream< String?> -
Skips the first
count
data events from this stream.inherited -
skipWhile(
bool test(String? element)) → Stream< String?> -
Skip data events from this stream while they are matched by
test
.inherited -
split(
Pattern pattern) → List< String> ? -
Available on Observable<
Splits the string at matches ofString?> , provided by the ObservablenStringExt extensionpattern
and returns a list of substrings. -
split(
Pattern pattern) → List< String> -
Available on Observable<
Splits the string at matches ofString> , provided by the ObservableStringExt extensionpattern
and returns a list of substrings. -
startsWith(
Pattern pattern, [int index = 0]) → bool -
Available on Observable<
Returns true if this string starts with a match ofString> , provided by the ObservableStringExt extensionpattern
. -
startsWith(
Pattern pattern, [int index = 0]) → bool? -
Available on Observable<
Returns true if this string starts with a match ofString?> , provided by the ObservablenStringExt extensionpattern
. -
substring(
int startIndex, [int? endIndex]) → String -
Available on Observable<
Returns the substring of this string that extends fromString> , provided by the ObservableStringExt extensionstartIndex
, inclusive, toendIndex
, exclusive -
substring(
int startIndex, [int? endIndex]) → String? -
Available on Observable<
Returns the substring of this string that extends fromString?> , provided by the ObservablenStringExt extensionstartIndex
, inclusive, toendIndex
, exclusive -
take(
int count) → Stream< String?> -
Provides at most the first
count
data events of this stream.inherited -
takeWhile(
bool test(String? element)) → Stream< String?> -
Forwards data events while
test
is successful.inherited -
timeout(
Duration timeLimit, {void onTimeout(EventSink< String?> sink)?}) → Stream<String?> -
Creates a new stream with the same events as this stream.
inherited
-
toList(
) → Future< List< String?> > -
Collects all elements of this stream in a List.
inherited
-
toLowerCase(
) → String -
Available on Observable<
Converts all characters in this string to lower case. If the string is already in all lower case, this method returnsString> , provided by the ObservableStringExt extensionthis
. -
toLowerCase(
) → String? -
Available on Observable<
Converts all characters in this string to lower case. If the string is already in all lower case, this method returnsString?> , provided by the ObservablenStringExt extensionthis
. -
toSet(
) → Future< Set< String?> > -
Collects the data of this stream in a Set.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUpperCase(
) → String -
Available on Observable<
Converts all characters in this string to upper case. If the string is already in all upper case, this method returnsString> , provided by the ObservableStringExt extensionthis
. -
toUpperCase(
) → String? -
Available on Observable<
Converts all characters in this string to upper case. If the string is already in all upper case, this method returnsString?> , provided by the ObservablenStringExt extensionthis
. -
transform<
S> (StreamTransformer< String?, S> streamTransformer) → Stream<S> -
Applies
streamTransformer
to this stream.inherited -
trim(
) → String -
Available on Observable<
Returns the string without any leading and trailing whitespace.String> , provided by the ObservableStringExt extension -
trim(
) → String? -
Available on Observable<
Returns the string without any leading and trailing whitespace.String?> , provided by the ObservablenStringExt extension -
trimLeft(
) → String -
Available on Observable<
Returns the string without any leading whitespace.String> , provided by the ObservableStringExt extension -
trimLeft(
) → String? -
Available on Observable<
Returns the string without any leading whitespace.String?> , provided by the ObservablenStringExt extension -
trimRight(
) → String? -
Available on Observable<
Returns the string without any trailing whitespace.String?> , provided by the ObservablenStringExt extension -
trimRight(
) → String -
Available on Observable<
Returns the string without any trailing whitespace.String> , provided by the ObservableStringExt extension -
where(
bool test(String? event)) → Stream< String?> -
Creates a new stream from this stream that discards some elements.
inherited
Operators
-
operator +(
String val) → String -
Available on Observable<
String?> , provided by the ObservablenStringExt extension -
operator +(
String val) → String -
Available on Observable<
String> , provided by the ObservableStringExt extension -
operator ==(
Object other) → bool -
The equality operator.
inherited