DateTimeFieldBloc class
- Inheritance
-
- Object
- SingleFieldBloc<
DateTime?, DateTimeFieldBlocState> - DateTimeFieldBloc
Constructors
-
DateTimeFieldBloc({String? name, DateTime? initialValue, bool enabled = true, bool readOnly = false, bool loading = false, bool? required, Set<
Validator< ? customValidators, Set<DateTime?> >ValidationType> rules = const {}, dynamic data, dynamic extraData, DateFormat? dateFormat, DateTime? firstDate, DateTime? lastDate})
Properties
- data ↔ dynamic
-
getter/setter pairinherited
- defaultValue → DateTime?
-
finalinherited
- disabled → bool
-
no setterinherited
- displayError → String?
-
no setterinherited
- enabled ↔ bool
-
getter/setter pairinherited
- error → String?
-
no setterinherited
- extraData ↔ dynamic
-
getter/setter pairinherited
- firstDateSubscription ↔ StreamSubscription?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → DateTime?
-
no setterinherited
- isClosed → bool
-
Whether the bloc is closed.
no setterinherited
- isInitial → bool
-
no setterinherited
- isLoading → bool
-
no setterinherited
- isNotValid → bool
-
no setterinherited
- isRequired → bool
-
no setterinherited
- isValid → bool
-
no setterinherited
- isValueChanged → bool
-
no setterinherited
- lastDateSubscription ↔ StreamSubscription?
-
getter/setter pair
- loading ← bool
-
no getterinherited
- name → String
-
no setterinherited
- readOnly ↔ bool
-
getter/setter pairinherited
- required ← bool
-
no getterinherited
-
rules
→ Set<
ValidationType> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → DateTimeFieldBlocState
-
The current state.
no setterinherited
-
stream
→ Stream<
DateTimeFieldBlocState> -
The current stream of states.
no setterinherited
-
validators
→ Set<
Validator< DateTime?> > -
no setterinherited
- value ↔ DateTime?
-
getter/setter pairinherited
-
valueStream
↔ Stream<
DateTime?> -
getter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
Reports an
errorwhich triggersonErrorwith an optional StackTrace.inherited -
addFieldError(
String error, {bool? isDirty}) → void -
It is useful when you want to add errors that
you have obtained when submitting the
FormBloc.inherited -
addRule(
ValidationType rule) → void -
inherited
-
addRules(
Set< ValidationType> rules) → void -
inherited
-
addValidator(
Validator< DateTime?> validator, {bool forceValidation = false}) → void -
inherited
-
addValidators(
Set< Validator< validators, {bool forceValidation = false}) → voidDateTime?> > -
inherited
-
changeAvailability(
bool enabled) → void -
inherited
-
changeData(
dynamic data) → void -
inherited
-
changeDateFormat(
DateFormat newDateFormat) → dynamic -
changeExtraData(
dynamic extraData) → void -
inherited
-
changeFirstDate(
DateTime? firstDate, {bool force = false}) → dynamic -
changeLastDate(
DateTime? lastDate, {bool force = false}) → dynamic -
changeLoading(
bool loading) → void -
inherited
-
changeReadOnly(
bool readOnly) → void -
inherited
-
changeRequirement(
bool required, {bool forceValidation = false}) → void -
inherited
-
changeRules(
Set< ValidationType> rules) → void -
inherited
-
changeValidators(
Set< Validator< validators, {bool forceValidation = false}) → voidDateTime?> > -
inherited
-
changeValue(
DateTime? value, {bool forceChange = false}) → void -
inherited
-
clear(
{bool force = false}) → void -
inherited
-
clearRules(
) → void -
inherited
-
clearValidators(
) → void -
inherited
-
close(
) → Future< void> - Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.
-
emit(
DateTimeFieldBlocState state) → void -
Updates the
stateto the providedstate.emitdoes nothing if thestatebeing emitted is equal to the currentstate.inherited -
focusChanged(
) → void -
inherited
-
getError(
DateTime? value, {Set< String? Function(DateTime?)> ? newValidators}) → String? -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< DateTimeFieldBlocState> change) → void -
Called whenever a
changeoccurs with the givenchange. Achangeoccurs when a newstateis emitted.onChangeis called before thestateof thecubitis updated.onChangeis a great spot to add logging/analytics for a specificcubit.inherited -
onError(
Object error, StackTrace stackTrace) → void -
Called whenever an
erroroccurs and notifiesBlocObserver.onError.inherited -
removeFormBloc(
FormBloc formBloc) → void -
inherited
-
removeRule(
ValidationType rule) → void -
inherited
-
removeRules(
Set< ValidationType> rules) → void -
inherited
-
removeValidator(
Validator< DateTime?> validator, {bool forceValidation = false}) → void -
inherited
-
removeValidators(
Set< Validator< validators, {bool forceValidation = false}) → voidDateTime?> > -
inherited
-
reset(
{bool force = false}) → void -
inherited
-
setFirstDateBloc(
DateTimeFieldBloc? firstDateBloc, {bool force = false}) → dynamic -
setLastDateBloc(
DateTimeFieldBloc? lastDateBloc, {bool force = false}) → dynamic -
toNullableString(
) → String? -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateFormBloc(
FormBloc formBloc) → void -
inherited
-
updateInitial(
DateTime? value, {bool forceChange = false}) → void -
inherited
-
validate(
) → bool -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited