|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static FormState of(BuildContext context) { |
|
|
|
_FormScope scope = (_FormScope) context.inheritFromWidgetOfExactType(typeof(_FormScope)); |
|
|
|
_FormScope scope = context.dependOnInheritedWidgetOfExactType<_FormScope>(); |
|
|
|
return scope?._formState; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
public bool hasError { |
|
|
|
get { return _errorText != null; } |
|
|
|
} |
|
|
|
|
|
|
|
/*public bool isValid { |
|
|
|
get { |
|
|
|
return widget.validator?.call(_value) == null; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
public void save() { |
|
|
|
if (widget.onSaved != null) { |
|
|
|