Skip to content
Snippets Groups Projects
Commit 2ad1e257 authored by poka's avatar poka
Browse files

fix wallet view scroll

parent a396647b
No related branches found
No related tags found
No related merge requests found
......@@ -61,10 +61,19 @@ class _WalletViewScreenState extends State<WalletViewScreen> {
),
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>[
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(
......@@ -77,10 +86,13 @@ class _WalletViewScreenState extends State<WalletViewScreen> {
label: "displayNActivity".tr(),
onTap: () => Navigator.push(
context,
PageNoTransit(builder: (context) => ActivityScreen(address: address)),
PageNoTransit(
builder: (context) => ActivityScreen(address: address),
),
),
),
Consumer<SubstrateSdk>(builder: (context, sub, _) {
Consumer<SubstrateSdk>(
builder: (context, sub, _) {
return FutureBuilder(
future: sub.certState(address),
builder: (context, AsyncSnapshot<CertState> snapshot) {
......@@ -95,7 +107,8 @@ class _WalletViewScreenState extends State<WalletViewScreen> {
);
},
);
}),
},
),
_buildActionButton(
context: context,
key: keyCopyAddress,
......@@ -108,13 +121,23 @@ class _WalletViewScreenState extends State<WalletViewScreen> {
),
],
),
const Spacer(),
],
),
// Partie basse
Column(
children: [
_buildTransferButton(context),
ScaledSizedBox(height: isTall ? 40 : 7),
]),
],
),
],
),
),
));
);
},
),
),
);
}
Widget _buildActionButton({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment