SingleValueForm<V > class
Inheritance
Available Extensions
Properties
autofocusNode
→ FocusNode ?
Returns the focusNode that should be autofocused based on the current form state. It's generally the first
required form field that doesn't have a value
no setter inherited
buildContext
→ BuildContext
The build context for the form
final inherited
container
→ SingleValue<V >
final
context
→ ReactiveContext
Override this method to use a custom context.
no setter inherited
errors
→ SunnyObservableMap<JsonPath , ValidationError ? >
An observable map of errors
final inherited
formState
→ SyncStream<SunnyFormState >
A stream of any change to the state of this form.
final inherited
hashCode
→ int
The hash code for this object.
no setter inherited
isModified
→ bool
Whether the user has made changes to the form.
no setter inherited
lastFocusNode
→ FocusNode ?
The last focus node that was added
no setter inherited
log
→ Logger
no setter inherited
loggerName
→ String
no setter inherited
name
→ String
Helpful for debugging - displays the name of the record being edited, for example
final inherited
parent
→ FormController ?
The parent form
no setter inherited
readyChecks
→ Map <JsonPath , SafeCompleter >
Consumers can request a completer that's used to prevent submission until the child component is
ready - maybe they are uploading a file or something.
final inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
stream
→ Stream <Attribute >
observes all changes
no setter inherited
validators
→ Map <JsonPath , FormFieldValidator >
Validators run during the validation phase of the submission.
final inherited
Methods
addError (JsonPath path , ValidationError ? error , {AttributeSource source = AttributeSource.model })
→ void
Registers an error at this path
inherited
addFocusNode (JsonPath path , FocusNode ? newFocusNode )
→ void
Adds a focusNode to this form at this path
inherited
autofocus ([BuildContext ? context ])
→ void
inherited
clearError (JsonPath path , {required AttributeSource source })
→ void
Removes all errors at this path
inherited
clearErrors ({required AttributeSource source })
→ void
Clears out all errors
inherited
dispose ()
→ Future
inherited
disposeAll ()
→ Future
inherited
endSubmission ()
→ void
Ends this form's submission process
inherited
focusLast ([BuildContext ? context ])
→ void
inherited
get <X > (JsonPath path )
→ X?
Retrieves a value from the underlying data model.
inherited
getFocusNode (JsonPath path , {bool createIfMissing = true })
→ FocusNode ?
Retreives a focus node for the specified path
inherited
invalidateReadyCheck (JsonPath path )
→ void
Unregisters a ready check at the given path.
(should this also complete any outstanding item?)
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observePath <X > (JsonPath path )
→ Stream <X? >
Observes a single path
inherited
path <X > (JsonPath<X > path , [Attribute <X > ? attr ])
→ X?
Uses the type from the JsonPath
inherited
put (JsonPath path , dynamic value , {required AttributeSource source })
→ void
Put is like set, but it's not assumed that the data has been sanitized
inherited
registerDisposer (Disposer callback )
→ void
inherited
registerForm (FormController ? form )
→ void
Registers a subform
inherited
registerFormValidator (String key , FormValidator ? validator )
→ void
Registers a form validator
inherited
registerStream (Stream ? stream )
→ void
inherited
registerSubmitHook (String key , SubmitHook ? onSubmit )
→ void
Registers a submit hook. These run after validation
inherited
registerSubscription (StreamSubscription ? subscription )
→ void
inherited
removeDisposer (FutureOr dispose () )
→ void
inherited
requestReadyCheck (JsonPath path )
→ SafeCompleter
Gets or puts a ready check at the given path
inherited
set (JsonPath path , dynamic value , {AttributeSource source = AttributeSource.model })
→ void
Sets a value in the underlying model
inherited
startSubmission ()
→ void
Begins this forms submission process
inherited
submit <X > (BuildContext context , {FutureOr <X? > submit ()?, bool ? skipIfUnmodified })
→ FutureOr <FormSubmitResult <X > >
Submits this form, including subforms, and returns the result
inherited
toString ()
→ String
A string representation of this object.
inherited
unregisterForm (FormController form )
→ void
Unregisters a subform
inherited
unregisterFormValidator (String key )
→ void
Unregisters a validator
inherited
unregisterSubmitHook (String key )
→ void
Unregisters a submit hook
inherited
updateErrors (List <ValidationError > validationErrors , {required AttributeSource source })
→ void
Clears and sets a list of validationErrors
inherited
validate ({required bool skipIfUnmodified })
→ FutureOr <Map <JsonPath , List <ValidationError > > >
Validates this form and any subforms. An empty result means that the form validated successfully
inherited
validatePath (JsonPath path )
→ String ?
inherited