formValue top-level constant
FormValue
const formValue
Create a query to retrieve form controllers.
Use with freezed, etc.
static const form = _$(class name)FormQuery() to get the query.
If autoDisposeWhenUnreferenced is set to true, it will automatically dispose of FormValue when it is no longer referenced by any widget.
フォームコントローラーを取得するためのクエリーを作成します。
freezedなどと共に利用してください。
static const form = _$(クラス名)FormQuery()でクエリーを取得します。
autoDisposeWhenUnreferencedをtrueにした場合、FormValueがどのウィジェットにも参照されなくなったときに自動的に破棄します。
@freezed
@formValue
@immutable
abstract class LoginValue with _$LoginValuee {
const factory LoginValue({
@Default("") String email,
@Default("") String password,
}) = _LoginValue;
const LoginValue._();
factory LoginValue.fromJson(Map<String, Object?> json) => _$LoginValueFromJson(json);
static const form = _$LoginValueFormQuery();
}
Implementation
const formValue = FormValue();