mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +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,48 +45,55 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
|||
leading: AppBarBackButton(),
|
||||
trailing: ExitToMyStackButton(),
|
||||
),
|
||||
body: SizedBox(
|
||||
width: 480,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Spacer(
|
||||
flex: 10,
|
||||
body: SingleChildScrollView(
|
||||
child: Center(
|
||||
// Center the content horizontally
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 480),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
/*const Spacer(
|
||||
flex: 10,
|
||||
),*/
|
||||
CreateRestoreWalletTitle(
|
||||
coin: entity.coin,
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
SizedBox(
|
||||
width: 324,
|
||||
child: CreateRestoreWalletSubTitle(
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
),
|
||||
CoinImage(
|
||||
coin: entity.coin,
|
||||
width: isDesktop
|
||||
? 324
|
||||
: MediaQuery.of(context).size.width / 1.6,
|
||||
height: isDesktop
|
||||
? null
|
||||
: MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
),
|
||||
CreateWalletButtonGroup(
|
||||
coin: entity.coin,
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
/*const Spacer(
|
||||
flex: 15,
|
||||
),*/
|
||||
],
|
||||
),
|
||||
CreateRestoreWalletTitle(
|
||||
coin: entity.coin,
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
SizedBox(
|
||||
width: 324,
|
||||
child: CreateRestoreWalletSubTitle(
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
),
|
||||
CoinImage(
|
||||
coin: entity.coin,
|
||||
width:
|
||||
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
||||
height:
|
||||
isDesktop ? null : MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
),
|
||||
CreateWalletButtonGroup(
|
||||
coin: entity.coin,
|
||||
isDesktop: isDesktop,
|
||||
),
|
||||
const Spacer(
|
||||
flex: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -726,12 +726,13 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
|||
color: Theme.of(context).extension<StackColors>()!.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
if (isDesktop)
|
||||
/*if (isDesktop)
|
||||
const Spacer(
|
||||
flex: 10,
|
||||
),
|
||||
),*/
|
||||
if (!isDesktop)
|
||||
Text(
|
||||
widget.walletName,
|
||||
|
@ -1060,10 +1061,10 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
|||
},
|
||||
),
|
||||
),
|
||||
if (isDesktop)
|
||||
/*if (isDesktop)
|
||||
const Spacer(
|
||||
flex: 15,
|
||||
),
|
||||
),*/
|
||||
if (!isDesktop)
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
|
@ -1174,6 +1175,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue