Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Ğecko
Commits
b835c701
Commit
b835c701
authored
1 year ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
fix: keep keyboard focus when changing wallet source in payment popup
https://stackoverflow.com/a/76367322/8301867
parent
dc1b54a0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/widgets/payment_popup.dart
+55
-50
55 additions, 50 deletions
lib/widgets/payment_popup.dart
with
55 additions
and
50 deletions
lib/widgets/payment_popup.dart
+
55
−
50
View file @
b835c701
...
...
@@ -145,16 +145,14 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
),
const
SizedBox
(
height:
10
),
Consumer
<
SubstrateSdk
>(
builder:
(
context
,
sub
,
_
)
{
// TODO: about keyboard dismiss issue, should try this: https://stackoverflow.com/a/76352647/8301867
return
DropdownButton
(
dropdownColor:
const
Color
(
0xffffeed1
),
elevation:
12
,
key:
dropdownKey
,
value:
defaultWallet
,
// onTap: () async {
// await Future.delayed(const Duration(milliseconds: 10));
// amountFocus.requestFocus();
// },
onTap:
()
{
FocusScope
.
of
(
context
)
.
requestFocus
(
amountFocus
);
},
selectedItemBuilder:
(
_
)
{
return
myWalletProvider
.
listWallets
.
map
((
WalletData
wallet
)
{
...
...
@@ -268,7 +266,13 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
],
),
const
SizedBox
(
height:
10
),
TextField
(
Focus
(
onFocusChange:
(
focused
)
{
setState
(()
{
FocusScope
.
of
(
context
)
.
requestFocus
(
amountFocus
);
});
},
child:
TextField
(
textInputAction:
TextInputAction
.
done
,
onEditingComplete:
()
async
=
>
canValidate
?
await
executeTransfert
()
:
null
,
...
...
@@ -305,8 +309,8 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
filled:
true
,
fillColor:
Colors
.
transparent
,
focusedBorder:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
Colors
.
grey
[
500
]
!
,
width:
2
),
borderSide:
BorderSide
(
color:
Colors
.
grey
[
500
]
!
,
width:
2
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
contentPadding:
const
EdgeInsets
.
all
(
20
),
...
...
@@ -317,6 +321,7 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
fontWeight:
FontWeight
.
w600
,
),
),
),
const
Spacer
(),
SizedBox
(
width:
double
.
infinity
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment