Tap outside to close virtual kb
This commit is contained in:
parent
c1680e1e64
commit
91cc0acace
|
@ -121,7 +121,10 @@ class PayRecipientState extends State<PayRecipient> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Form(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
}, child: Form(
|
||||
key: _formKey,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(children: <Widget>[
|
||||
|
@ -169,7 +172,7 @@ class PayRecipientState extends State<PayRecipient> {
|
|||
children: confirmButtons(context, _onAdd,
|
||||
okLabel: S.of(context).add, okIcon: Icon(MdiIcons.plus)))
|
||||
]),
|
||||
));
|
||||
)));
|
||||
}
|
||||
|
||||
void _onScan() async {
|
||||
|
|
|
@ -33,37 +33,47 @@ class PaymentURIState extends State<PaymentURIPage> {
|
|||
|
||||
return Form(
|
||||
key: _formKey,
|
||||
child: SingleChildScrollView(child: Padding(padding: EdgeInsets.all(8),
|
||||
child:
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Text(S.of(context).receivePayment, style: Theme.of(context).textTheme.headline5),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
QrImage(
|
||||
data: qrText, size: qrSize, backgroundColor: Colors.white),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
TextFormField(
|
||||
decoration: InputDecoration(labelText: 'Amount Requested'),
|
||||
controller: _amountController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [makeInputFormatter(true)],
|
||||
validator: _checkAmount,
|
||||
),
|
||||
TextFormField(
|
||||
decoration: InputDecoration(labelText: S.of(context).memo),
|
||||
minLines: 4,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.multiline,
|
||||
controller: _memoController,
|
||||
),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
ButtonBar(children: [
|
||||
ElevatedButton.icon(
|
||||
icon: Icon(Icons.build),
|
||||
label: Text('MAKE QR'),
|
||||
onPressed: _ok,
|
||||
),
|
||||
]),
|
||||
]))));
|
||||
child: SingleChildScrollView(
|
||||
child: GestureDetector(
|
||||
onTap: () { FocusScope.of(context).unfocus(); },
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(S.of(context).receivePayment,
|
||||
style: Theme.of(context).textTheme.headline5),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
QrImage(
|
||||
data: qrText,
|
||||
size: qrSize,
|
||||
backgroundColor: Colors.white),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
TextFormField(
|
||||
decoration:
|
||||
InputDecoration(labelText: 'Amount Requested'),
|
||||
controller: _amountController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [makeInputFormatter(true)],
|
||||
validator: _checkAmount,
|
||||
),
|
||||
TextFormField(
|
||||
decoration:
|
||||
InputDecoration(labelText: S.of(context).memo),
|
||||
minLines: 4,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.multiline,
|
||||
controller: _memoController,
|
||||
),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
ButtonBar(children: [
|
||||
ElevatedButton.icon(
|
||||
icon: Icon(Icons.build),
|
||||
label: Text('MAKE QR'),
|
||||
onPressed: _ok,
|
||||
),
|
||||
]),
|
||||
])))));
|
||||
}
|
||||
|
||||
String? _checkAmount(String? vs) {
|
||||
|
|
|
@ -75,7 +75,7 @@ class SendState extends State<SendPage> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(S.of(context).sendCointicker(coin.ticker))),
|
||||
body: Form(
|
||||
body: GestureDetector(onTap: () { FocusScope.of(context).unfocus(); }, child: Form(
|
||||
key: _formKey,
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(20),
|
||||
|
@ -196,7 +196,7 @@ class SendState extends State<SendPage> {
|
|||
children: confirmButtons(context, _onSend,
|
||||
okLabel: S.of(context).send,
|
||||
okIcon: Icon(MdiIcons.send)))
|
||||
]))));
|
||||
])))));
|
||||
}
|
||||
|
||||
String? _checkAddress(String? v) {
|
||||
|
|
Loading…
Reference in New Issue