make recovery screen scrollable on desktop

This commit is contained in:
julian 2024-05-14 11:11:09 -06:00
parent e3c761dfb0
commit 129c46fca0

View file

@ -31,6 +31,7 @@ import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/wallets/isar/providers/wallet_info_provider.dart';
import 'package:stackwallet/wallets/wallet/wallet.dart';
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
@ -180,6 +181,22 @@ class _NewWalletRecoveryPhraseViewState
child: Padding(
padding:
isDesktop ? const EdgeInsets.all(0) : const EdgeInsets.all(16),
child: ConditionalParent(
condition: Util.isDesktop,
builder: (child) => LayoutBuilder(
builder: (context, constraints) {
return SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: constraints.maxHeight,
),
child: IntrinsicHeight(
child: child,
),
),
);
},
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@ -215,7 +232,9 @@ class _NewWalletRecoveryPhraseViewState
Container(
decoration: BoxDecoration(
color: isDesktop
? Theme.of(context).extension<StackColors>()!.background
? Theme.of(context)
.extension<StackColors>()!
.background
: Theme.of(context).extension<StackColors>()!.popupBG,
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius),
@ -330,6 +349,7 @@ class _NewWalletRecoveryPhraseViewState
),
),
),
),
);
}
}