Skip to content

Commit 95d8ce1

Browse files
committed
Auto-closes soft keyboard when entries are submitted
1 parent 7c8b74d commit 95d8ce1

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.9.3
22

33
* Fixed failure of web OTP on iOS devices
4+
* Automatically closes soft keyboard when text-field entries are submitted
45

56
## 0.9.2
67

lib/src/widgets/checkout/bank_checkout.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class _BankCheckoutState extends BaseCheckoutMethodState<BankCheckout> {
199199
}
200200

201201
void _validateInputs() {
202-
// TODO: Close keyboard
202+
FocusScope.of(context).requestFocus(new FocusNode());
203203
final FormState form = _formKey.currentState;
204204
if (form.validate()) {
205205
form.save();

lib/src/widgets/input/card_input.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class _CardInputState extends State<CardInput> {
102102
}
103103

104104
void _validateInputs() {
105-
// TODO: Close keyboard
105+
FocusScope.of(context).requestFocus(new FocusNode());
106106
final FormState form = _formKey.currentState;
107107
if (form.validate()) {
108108
form.save();

lib/src/widgets/otp_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class _OtpWidgetState extends BaseState<OtpWidget> {
7676
}
7777

7878
void _validateInputs() {
79-
// TODO: Close keyboard
79+
FocusScope.of(context).requestFocus(new FocusNode());
8080
final FormState form = _formKey.currentState;
8181
if (form.validate()) {
8282
form.save();

0 commit comments

Comments
 (0)