Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zmtzawqlp committed Aug 27, 2024
1 parent a38e616 commit ae02410
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Language: [English](README.md) | 中文简体
- [KeyboardBinding / KeyboardBindingMixin](#keyboardbinding--keyboardbindingmixin)
- [KeyboardConfiguration](#keyboardconfiguration)
- [TextInputScope](#textinputscope-1)
- [extension](#extension)


## 安装
Expand Down Expand Up @@ -282,4 +283,11 @@ Future<void> main() async {

[Full Demo](https://github.com/fluttercandies/extended_keyboard/blob/main/example/lib/src/pages/text_input_demo.dart)


### extension

TextEditingController 的扩展方法

* `void insertText(String text)` 在当前位置插入文本
* `void delete()` 删除一个字符
* `TextEditingValue deleteText()` 删除一个字符并且返回删除之后的值,可以根据自己的情况再处理
* `void performAction(TextInputAction action)``TextInputClient.performAction` 一样的作用
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Flutter plugin for create custom keyboards quickly.
- [KeyboardBinding / KeyboardBindingMixin](#keyboardbinding--keyboardbindingmixin)
- [KeyboardConfiguration](#keyboardconfiguration)
- [TextInputScope](#textinputscope-1)
- [extension](#extension)


## Install
Expand Down Expand Up @@ -284,5 +285,12 @@ if `Scaffold` is used, make sure set `Scaffold.resizeToAvoidBottomInset` to fals
[Full Demo](https://github.com/fluttercandies/extended_keyboard/blob/main/example/lib/src/pages/text_input_demo.dart)


### extension


The extension for TextEditingController

* `void insertText(String text)` Insert text at the current selection or replace the current selection with
* `void delete()` Delete the character before the current selection or delete the current selection
* `TextEditingValue deleteText()` Delete the character before the current selection or delete the current selection
and handle the TextEditingValue base on your case
* `void performAction(TextInputAction action)` The same as `TextInputClient.performAction`

0 comments on commit ae02410

Please sign in to comment.