Skip to content

[propose] onSubmitted can be called when TextField loses focus and Spinbox is enabled. #80

@zhang-peter

Description

@zhang-peter

This behavior is very like valueModified of SpinBox in Qt Quick Control.

  void _handleFocusChanged() {
    setState(() {
      if (hasFocus) {
        _selectAll();
      } else {
        if (widget.enabled) {
          final value = fixupValue(_controller.text);
          widget.onSubmitted?.call(value);
        }
      }
    });
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions