FormMethod enum

HTTP methods for form submission.

Provides type-safe values for the method attribute of <form> elements.

Usage:

Form().method(FormMethod.post)
Form().method(FormMethod.get)
Inheritance
Available extensions

Values

get → const FormMethod

GET method - form data sent in URL query string.

Use for idempotent operations (searches, filters). Data is visible in URL and browser history.

const FormMethod('get')
post → const FormMethod

POST method - form data sent in request body.

Use for operations that modify data (create, update, delete). Data is not visible in URL.

const FormMethod('post')
dialog → const FormMethod

DIALOG method - closes dialog and submits form data to dialog opener.

Only works when form is inside a <dialog> element.

const FormMethod('dialog')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The HTML attribute value.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<FormMethod>
A constant List of the values in this enum, in order of their declaration.