add responsive spacer

This commit is contained in:
sneurlax 2023-10-19 12:54:22 -05:00
parent e9717c7aa7
commit 247561ad6b
2 changed files with 18 additions and 16 deletions

View file

@ -89,6 +89,12 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
@override
Widget build(BuildContext context) {
bool _succeeded =
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
bool _failed =
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
return WillPopScope(
onWillPop: () async {
return await _requestAndProcessCancel();
@ -130,10 +136,7 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
FusionProgress(
walletId: widget.walletId,
),
if (ref
.watch(fusionProgressUIStateProvider(
widget.walletId))
.succeeded)
if (_succeeded)
Expanded(
child: PrimaryButton(
buttonHeight: ButtonHeight.m,
@ -141,10 +144,7 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
onPressed: () => _fuseAgain,
),
),
if (ref
.watch(fusionProgressUIStateProvider(
widget.walletId))
.failed)
if (_failed)
Expanded(
child: PrimaryButton(
buttonHeight: ButtonHeight.m,
@ -152,7 +152,7 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
onPressed: () => _fuseAgain,
),
),
// if (!_succeeded! && !_failed!) const Spacer(),
if (!_succeeded! && !_failed!) const Spacer(),
const SizedBox(
height: 16,
),

View file

@ -136,6 +136,12 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
@override
Widget build(BuildContext context) {
bool _succeeded =
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
bool _failed =
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
return DesktopDialog(
maxHeight: 600,
child: SingleChildScrollView(
@ -179,9 +185,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
),
Row(
children: [
if (ref
.watch(fusionProgressUIStateProvider(widget.walletId))
.succeeded)
if (_succeeded)
Expanded(
child: PrimaryButton(
buttonHeight: ButtonHeight.m,
@ -189,9 +193,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
onPressed: () => _fuseAgain,
),
),
if (ref
.watch(fusionProgressUIStateProvider(widget.walletId))
.failed)
if (_failed)
Expanded(
child: PrimaryButton(
buttonHeight: ButtonHeight.m,
@ -199,7 +201,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
onPressed: () => _fuseAgain,
),
),
// if (!_succeeded! && !_failed!) const Spacer(),
if (!_succeeded! && !_failed!) const Spacer(),
const SizedBox(
width: 16,
),