Skip to content

Commit

Permalink
chore: fix typo focuse -> focus
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Jul 5, 2024
1 parent 538d522 commit c6609b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tdesign-component/lib/src/components/stepper/td_stepper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ class TDStepper extends StatefulWidget {
class _TDStepperState extends State<TDStepper> {
late int value;
late TextEditingController _controller;
final FocusNode _focuseNode = FocusNode();
final FocusNode _focusNode = FocusNode();

@override
void initState() {
super.initState();
value = widget.value ?? widget.defaultValue ?? 0;
_controller = TextEditingController(text: value.toString());
_focuseNode.addListener(() {
if (!_focuseNode.hasFocus) {
_focusNode.addListener(() {
if (!_focusNode.hasFocus) {
if (widget.onBlur != null) {
widget.onBlur!();
}
Expand All @@ -96,7 +96,7 @@ class _TDStepperState extends State<TDStepper> {
@override
void dispose() {
_controller.dispose();
_focuseNode.dispose();
_focusNode.dispose();
super.dispose();
}

Expand Down Expand Up @@ -218,7 +218,7 @@ class _TDStepperState extends State<TDStepper> {
affinity: TextAffinity.downstream,
offset: value.toString().length,
)));
_focuseNode.unfocus();
_focusNode.unfocus();

if (widget.onChange != null) {
widget.onChange!(value);
Expand Down Expand Up @@ -265,7 +265,7 @@ class _TDStepperState extends State<TDStepper> {
child: TextField(
controller: _controller,
enabled: !widget.disabled && !widget.disableInput,
focusNode: _focuseNode,
focusNode: _focusNode,
style: TextStyle(
fontSize: _getFontSize(),
color: widget.disabled
Expand Down

0 comments on commit c6609b9

Please sign in to comment.