mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
Merge pull request #770 from cypherstack/ui
Make recovery screens scrollable for small desktop screens
This commit is contained in:
commit
61e620c77a
2 changed files with 55 additions and 46 deletions
|
@ -45,14 +45,17 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
||||||
leading: AppBarBackButton(),
|
leading: AppBarBackButton(),
|
||||||
trailing: ExitToMyStackButton(),
|
trailing: ExitToMyStackButton(),
|
||||||
),
|
),
|
||||||
body: SizedBox(
|
body: SingleChildScrollView(
|
||||||
width: 480,
|
child: Center(
|
||||||
|
// Center the content horizontally
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 480),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(
|
/*const Spacer(
|
||||||
flex: 10,
|
flex: 10,
|
||||||
),
|
),*/
|
||||||
CreateRestoreWalletTitle(
|
CreateRestoreWalletTitle(
|
||||||
coin: entity.coin,
|
coin: entity.coin,
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
|
@ -71,10 +74,12 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
CoinImage(
|
CoinImage(
|
||||||
coin: entity.coin,
|
coin: entity.coin,
|
||||||
width:
|
width: isDesktop
|
||||||
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
? 324
|
||||||
height:
|
: MediaQuery.of(context).size.width / 1.6,
|
||||||
isDesktop ? null : MediaQuery.of(context).size.width / 1.6,
|
height: isDesktop
|
||||||
|
? null
|
||||||
|
: MediaQuery.of(context).size.width / 1.6,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
|
@ -83,12 +88,14 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
||||||
coin: entity.coin,
|
coin: entity.coin,
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
),
|
),
|
||||||
const Spacer(
|
/*const Spacer(
|
||||||
flex: 15,
|
flex: 15,
|
||||||
),
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Background(
|
return Background(
|
||||||
|
|
|
@ -726,12 +726,13 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
color: Theme.of(context).extension<StackColors>()!.background,
|
color: Theme.of(context).extension<StackColors>()!.background,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if (isDesktop)
|
/*if (isDesktop)
|
||||||
const Spacer(
|
const Spacer(
|
||||||
flex: 10,
|
flex: 10,
|
||||||
),
|
),*/
|
||||||
if (!isDesktop)
|
if (!isDesktop)
|
||||||
Text(
|
Text(
|
||||||
widget.walletName,
|
widget.walletName,
|
||||||
|
@ -1060,10 +1061,10 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (isDesktop)
|
/*if (isDesktop)
|
||||||
const Spacer(
|
const Spacer(
|
||||||
flex: 15,
|
flex: 15,
|
||||||
),
|
),*/
|
||||||
if (!isDesktop)
|
if (!isDesktop)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -1174,6 +1175,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue