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
2ad1e257
Commit
2ad1e257
authored
2 months ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
fix wallet view scroll
parent
a396647b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/screens/wallet_view.dart
+81
-58
81 additions, 58 deletions
lib/screens/wallet_view.dart
with
81 additions
and
58 deletions
lib/screens/wallet_view.dart
+
81
−
58
View file @
2ad1e257
...
...
@@ -53,68 +53,91 @@ class _WalletViewScreenState extends State<WalletViewScreen> {
sub
.
setCurrentWallet
(
defaultWallet
);
return
Scaffold
(
backgroundColor:
backgroundColor
,
resizeToAvoidBottomInset:
true
,
appBar:
WalletAppBar
(
address:
address
,
titleBuilder:
(
username
)
=
>
username
==
null
?
'seeAWallet'
.
tr
()
:
'memberAccountOf'
.
tr
(
args:
[
username
]),
),
bottomNavigationBar:
const
GeckoBottomAppBar
(),
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
SizedBox
(
height:
MediaQuery
.
of
(
context
)
.
size
.
height
-
MediaQuery
.
of
(
context
)
.
padding
.
top
-
kBottomNavigationBarHeight
,
child:
Column
(
children:
<
Widget
>[
WalletHeader
(
address:
address
),
ScaledSizedBox
(
height:
20
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
_buildActionButton
(
context:
context
,
key:
keyViewActivity
,
icon:
'assets/walletOptions/clock.png'
,
label:
"displayNActivity"
.
tr
(),
onTap:
()
=
>
Navigator
.
push
(
context
,
PageNoTransit
(
builder:
(
context
)
=
>
ActivityScreen
(
address:
address
)),
),
),
Consumer
<
SubstrateSdk
>(
builder:
(
context
,
sub
,
_
)
{
return
FutureBuilder
(
future:
sub
.
certState
(
address
),
builder:
(
context
,
AsyncSnapshot
<
CertState
>
snapshot
)
{
if
(
!
snapshot
.
hasData
)
return
const
SizedBox
.
shrink
();
final
certState
=
snapshot
.
data
!
;
return
Visibility
(
visible:
certState
.
status
!=
CertStatus
.
none
,
child:
CertStateWidget
(
certState:
certState
,
address:
address
,
backgroundColor:
backgroundColor
,
resizeToAvoidBottomInset:
true
,
appBar:
WalletAppBar
(
address:
address
,
titleBuilder:
(
username
)
=
>
username
==
null
?
'seeAWallet'
.
tr
()
:
'memberAccountOf'
.
tr
(
args:
[
username
]),
),
bottomNavigationBar:
const
GeckoBottomAppBar
(),
body:
SafeArea
(
child:
LayoutBuilder
(
builder:
(
context
,
constraints
)
{
return
SingleChildScrollView
(
child:
ConstrainedBox
(
constraints:
BoxConstraints
(
minHeight:
constraints
.
maxHeight
),
// On divise le contenu en deux parties afin de pouvoir utiliser mainAxisAlignment.spaceBetween
// et ainsi faire remonter le bouton de transfert en bas sur grand écran.
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
<
Widget
>[
// Partie haute
Column
(
children:
[
WalletHeader
(
address:
address
),
ScaledSizedBox
(
height:
20
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
_buildActionButton
(
context:
context
,
key:
keyViewActivity
,
icon:
'assets/walletOptions/clock.png'
,
label:
"displayNActivity"
.
tr
(),
onTap:
()
=
>
Navigator
.
push
(
context
,
PageNoTransit
(
builder:
(
context
)
=
>
ActivityScreen
(
address:
address
),
),
),
),
Consumer
<
SubstrateSdk
>(
builder:
(
context
,
sub
,
_
)
{
return
FutureBuilder
(
future:
sub
.
certState
(
address
),
builder:
(
context
,
AsyncSnapshot
<
CertState
>
snapshot
)
{
if
(
!
snapshot
.
hasData
)
return
const
SizedBox
.
shrink
();
final
certState
=
snapshot
.
data
!
;
return
Visibility
(
visible:
certState
.
status
!=
CertStatus
.
none
,
child:
CertStateWidget
(
certState:
certState
,
address:
address
,
),
);
},
);
},
),
);
},
);
}),
_buildActionButton
(
context:
context
,
key:
keyCopyAddress
,
icon:
'assets/copy_key.png'
,
label:
"copyAddress"
.
tr
(),
onTap:
()
{
Clipboard
.
setData
(
ClipboardData
(
text:
address
));
snackCopyKey
(
context
);
},
_buildActionButton
(
context:
context
,
key:
keyCopyAddress
,
icon:
'assets/copy_key.png'
,
label:
"copyAddress"
.
tr
(),
onTap:
()
{
Clipboard
.
setData
(
ClipboardData
(
text:
address
));
snackCopyKey
(
context
);
},
),
],
),
],
),
// Partie basse
Column
(
children:
[
_buildTransferButton
(
context
),
ScaledSizedBox
(
height:
isTall
?
40
:
7
),
],
),
],
),
const
Spacer
(),
_buildTransferButton
(
context
),
ScaledSizedBox
(
height:
isTall
?
40
:
7
),
]),
),
),
));
),
);
},
),
),
);
}
Widget
_buildActionButton
({
...
...
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