FLUTTER ECOSYSTEM

gzlock/flutter_focus_widget

一個可聚焦且可失焦的 TextField 小部件

flutter_focus_widget 專案封面
Stars
8
Forks
1
最近推送(UTC)
2021年3月24日
專案狀態
已封存
yeoman GitHub avatar
GITHUB User

yeoman ↗

Earth
語言DartSwiftJavaObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Flutter Focus Widget

一个可以让FocusNode失去焦点的Widget
A focusable and blurable widget of based on the FocusNode.
  • 新增的参数:

    • bool showFocusArea

      使用一个半透明的红色方框显示焦点区域,主要用于调试。

    • void Function(Widget widget, FocusNode focusNode) onLostFocus

      失去焦点后会调用这个function。

  • New Parameters:

    • bool showFocusArea

      Display a translucent red box to show the focus area, it's for debug.

    • void Function(Widget widget, FocusNode focusNode) onLostFocus

      When lost focus invoke this function.

  • 当FocusWidget获得焦点后

    在FocusWidget区域外点击

    会调用FocusNode.unfocus()并且触发FocusNode的listener

  • When the FocusWidget had focus

    Tap outside the FocusWidget area

    Will call the FocusNode's unfocus method and trigger the FocusNode's listener

GIF

gif