Expanded hell fix

This commit is contained in:
julian 2023-10-19 16:48:15 -06:00
parent 10d172184f
commit 3a8511eade

View file

@ -15,6 +15,7 @@ import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart'; import 'package:stackwallet/widgets/desktop/primary_button.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart'; import 'package:stackwallet/widgets/desktop/secondary_button.dart';
import 'package:stackwallet/widgets/rounded_container.dart'; import 'package:stackwallet/widgets/rounded_container.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
enum CashFusionStatus { waiting, running, success, failed } enum CashFusionStatus { waiting, running, success, failed }
@ -182,42 +183,35 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
bottom: 32, bottom: 32,
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
if (_fusionRoundsCompleted == 0) _fusionRoundsCompleted > 0
Expanded( ? RoundedWhiteContainer(
child: RoundedContainer( child: Text(
color: Theme.of(context) "Fusion rounds completed: $_fusionRoundsCompleted",
.extension<StackColors>()! style: STextStyles.w500_14(context).copyWith(
.snackBarBackError, color: Theme.of(context)
child: Text( .extension<StackColors>()!
"Do not close this window. If you exit, " .textSubtitle1,
"the process will be canceled.", ),
style: STextStyles.smallMed14(context).copyWith( textAlign: TextAlign.center,
color: Theme.of(context)
.extension<StackColors>()!
.snackBarTextError,
), ),
textAlign: TextAlign.center, )
), : RoundedContainer(
), color: Theme.of(context)
), .extension<StackColors>()!
if (_fusionRoundsCompleted > 0) .snackBarBackError,
Expanded( child: Text(
child: RoundedContainer( "Do not close this window. If you exit, "
color: Theme.of(context) "the process will be canceled.",
.extension<StackColors>()! style: STextStyles.smallMed14(context).copyWith(
.snackBarBackInfo, color: Theme.of(context)
child: Text( .extension<StackColors>()!
"Fusion rounds completed: $_fusionRoundsCompleted", .snackBarTextError,
style: STextStyles.w500_14(context).copyWith( ),
color: Theme.of(context) textAlign: TextAlign.center,
.extension<StackColors>()!
.snackBarTextInfo,
), ),
textAlign: TextAlign.center,
), ),
),
),
const SizedBox( const SizedBox(
height: 20, height: 20,
), ),