mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
make ref.watch
ers final, expand mobile fusion success message
This commit is contained in:
parent
0406e5f6f8
commit
3678cc1a42
2 changed files with 26 additions and 23 deletions
|
@ -90,13 +90,13 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool _succeeded =
|
||||
final bool _succeeded =
|
||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
||||
|
||||
bool _failed =
|
||||
final bool _failed =
|
||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
||||
|
||||
int _fusionRoundsCompleted = ref
|
||||
final int _fusionRoundsCompleted = ref
|
||||
.watch(fusionProgressUIStateProvider(widget.walletId))
|
||||
.fusionRoundsCompleted;
|
||||
|
||||
|
@ -141,18 +141,21 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
// TODO if (_succeeded but roundCount > roundCount)
|
||||
// show "Fusion completed" as snackBarBackSuccess.
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
RoundedContainer(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarBackInfo,
|
||||
child: Text(
|
||||
"Fusion rounds completed: $_fusionRoundsCompleted",
|
||||
style: STextStyles.w500_14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextInfo,
|
||||
Expanded(
|
||||
child: RoundedContainer(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarBackInfo,
|
||||
child: Text(
|
||||
"Fusion rounds completed: $_fusionRoundsCompleted",
|
||||
style:
|
||||
STextStyles.w500_14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextInfo,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
|
|
|
@ -138,13 +138,13 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool _succeeded =
|
||||
final bool _succeeded =
|
||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
||||
|
||||
bool _failed =
|
||||
final bool _failed =
|
||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
||||
|
||||
int _fusionRoundsCompleted = ref
|
||||
final int _fusionRoundsCompleted = ref
|
||||
.watch(fusionProgressUIStateProvider(widget.walletId))
|
||||
.fusionRoundsCompleted;
|
||||
|
||||
|
@ -223,7 +223,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
|||
onPressed: () => _fuseAgain,
|
||||
),
|
||||
),
|
||||
// if (!_succeeded && !_failed) const Spacer(),
|
||||
if (!_succeeded && !_failed) const Spacer(),
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
|
@ -247,11 +247,11 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
|||
),
|
||||
),
|
||||
if (_failed) const Spacer(),
|
||||
// if (!_succeeded && !_failed) const Spacer(),
|
||||
// if (!_succeeded && !_failed)
|
||||
// const SizedBox(
|
||||
// width: 16,
|
||||
// ),
|
||||
if (!_succeeded && !_failed) const Spacer(),
|
||||
if (!_succeeded && !_failed)
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
Expanded(
|
||||
child: SecondaryButton(
|
||||
buttonHeight: ButtonHeight.m,
|
||||
|
|
Loading…
Reference in a new issue