NumberControl<T extends num> class
Extended version of FieldControl specified to num.
- Inheritance
-
- Object
- ObservableValue<
T?> - ObservableModel<
T?> - FieldControl<
T> - NumberControl
- Available Extensions
Constructors
- NumberControl([T? value])
- FieldControl of num.
- NumberControl.inRange({T? value, T? min, T? max, bool clamp = true})
-
FieldControl of num with
min
-max
clamping.min
- default 0max
- default 1
Properties
- atMax → bool
-
Checks if clamping is required and value is equal to max.
no setter
- atMin → bool
-
Checks if clamping is required and value is equal to min.
no setter
- clamp ↔ bool
-
Checks if clamping is required
getter/setter pair
- clampable → bool
-
Checks if clamping is possible
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- internalData ↔ dynamic
-
getter/setter pairinherited
- isActive → bool
-
Checks if Stream is not closed.
no setterinherited
- isClosed → bool
-
Returns true if current stream is closed.
no setterinherited
- isEmpty → bool
-
no setterinherited
- isNotEmpty → bool
-
no setterinherited
- isValid → bool
-
no setterinherited
- max ↔ T
-
Inclusive upper bound value;
getter/setter pair
- min ↔ T
-
Inclusive lower bound value;
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sink
→ Sink<
T> -
Default sink of this controller.
Use sinkConverter to convert input data.
no setterinherited
-
stream
→ Stream<
T?> -
no setterinherited
- value ↔ T?
-
getter/setter pairinherited
Methods
-
cancel(
ControlSubscription< T?> subscription) → void -
inherited
-
cast<
U> () → ObservableValue< U> -
inherited
-
dispose(
) → void -
Used to clear and dispose object.
After this method call is object typically unusable and ready for GC.
Can be called multiple times!
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void -
Notifies current Stream.
inherited
-
onFuture(
Future future, {ValueConverter? converter}) → Future -
Sets value after
future
finishes. Via ValueConverter is possible to convert object from input Stream type to own stream value. Returns Future to await and register other callbacks.inherited -
setRange(
T? min, T? max) → void -
setValue(
T? value, {bool notify = true, bool forceNotify = false}) → void -
override
-
sinkConverter(
ValueConverter< T> converter) → Sink -
Returns Sink with custom ValueConverter.
inherited
-
softDispose(
) → void -
Clears subscribers, but didn't close Stream entirely.
inherited
-
subscribe(
ValueCallback< T?> action, {bool current = true, dynamic args}) → FieldSubscription<T> -
inherited
-
subscribeStream(
void onData(T? event), {Function? onError, void onDone()?, bool cancelOnError = false, bool current = true}) → FieldSubscription< T> -
inherited
-
subscribeTo(
Stream stream, {Function? onError, void onDone()?, bool cancelOnError = false, ValueConverter? converter}) → FieldSubscription -
Subscribes this field to given Stream.
Controller will subscribe to input stream and will listen for changes and populate this changes into own stream.
Via ValueConverter is possible to convert object from input Stream type to own stream value.
StreamSubscription is automatically closed during dispose phase of FieldControl.
Returns FieldSubscription for manual cancellation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited