File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
lib/plugins/grid/presentation/widgets
packages/flowy_infra_ui/lib/widget Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ class InputTextField extends StatefulWidget {
1010 final void Function (String )? onChanged;
1111 final void Function () onCanceled;
1212 final void Function ()? onFocused;
13+ final void Function ()? onTap;
14+
1315 final bool autoClearWhenDone;
1416 final String text;
1517 final int ? maxLength;
@@ -20,6 +22,7 @@ class InputTextField extends StatefulWidget {
2022 required this .onCanceled,
2123 this .onChanged,
2224 this .onFocused,
25+ this .onTap,
2326 this .autoClearWhenDone = false ,
2427 this .maxLength,
2528 Key ? key,
@@ -73,6 +76,11 @@ class _InputTextFieldState extends State<InputTextField> {
7376 _controller.text = "" ;
7477 }
7578 },
79+ onTap: () {
80+ if (widget.onTap != null ) {
81+ widget.onTap !();
82+ }
83+ },
7684 );
7785 }
7886
Original file line number Diff line number Diff line change @@ -288,6 +288,9 @@ class _CreateOptionTextField extends StatelessWidget {
288288 onFocused: () {
289289 popoverMutex? .close ();
290290 },
291+ onTap: () {
292+ popoverMutex? .close ();
293+ },
291294 );
292295 },
293296 );
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class RoundedInputField extends StatefulWidget {
1919 final TextStyle style;
2020 final ValueChanged <String >? onChanged;
2121 final Function (String )? onEditingComplete;
22+ final Function ()? onTap;
2223 final String ? initialValue;
2324 final EdgeInsets margin;
2425 final EdgeInsets padding;
@@ -39,6 +40,7 @@ class RoundedInputField extends StatefulWidget {
3940 this .obscureHideIcon,
4041 this .onChanged,
4142 this .onEditingComplete,
43+ this .onTap,
4244 this .normalBorderColor = Colors .transparent,
4345 this .errorBorderColor = Colors .transparent,
4446 this .focusBorderColor,
@@ -109,6 +111,11 @@ class _RoundedInputFieldState extends State<RoundedInputField> {
109111 widget.onEditingComplete !(inputText);
110112 }
111113 },
114+ onTap: () {
115+ if (widget.onTap != null ) {
116+ widget.onTap !();
117+ }
118+ },
112119 cursorColor: widget.cursorColor,
113120 obscureText: obscuteText,
114121 style: widget.style,
You can’t perform that action at this time.
0 commit comments