mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-25 08:38:45 +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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool _succeeded =
|
final bool _succeeded =
|
||||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
||||||
|
|
||||||
bool _failed =
|
final bool _failed =
|
||||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
||||||
|
|
||||||
int _fusionRoundsCompleted = ref
|
final int _fusionRoundsCompleted = ref
|
||||||
.watch(fusionProgressUIStateProvider(widget.walletId))
|
.watch(fusionProgressUIStateProvider(widget.walletId))
|
||||||
.fusionRoundsCompleted;
|
.fusionRoundsCompleted;
|
||||||
|
|
||||||
|
@ -141,18 +141,21 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
||||||
// TODO if (_succeeded but roundCount > roundCount)
|
// TODO if (_succeeded but roundCount > roundCount)
|
||||||
// show "Fusion completed" as snackBarBackSuccess.
|
// show "Fusion completed" as snackBarBackSuccess.
|
||||||
if (_fusionRoundsCompleted > 0)
|
if (_fusionRoundsCompleted > 0)
|
||||||
RoundedContainer(
|
Expanded(
|
||||||
color: Theme.of(context)
|
child: RoundedContainer(
|
||||||
.extension<StackColors>()!
|
color: Theme.of(context)
|
||||||
.snackBarBackInfo,
|
.extension<StackColors>()!
|
||||||
child: Text(
|
.snackBarBackInfo,
|
||||||
"Fusion rounds completed: $_fusionRoundsCompleted",
|
child: Text(
|
||||||
style: STextStyles.w500_14(context).copyWith(
|
"Fusion rounds completed: $_fusionRoundsCompleted",
|
||||||
color: Theme.of(context)
|
style:
|
||||||
.extension<StackColors>()!
|
STextStyles.w500_14(context).copyWith(
|
||||||
.snackBarTextInfo,
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.snackBarTextInfo,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_fusionRoundsCompleted > 0)
|
if (_fusionRoundsCompleted > 0)
|
||||||
|
|
|
@ -138,13 +138,13 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool _succeeded =
|
final bool _succeeded =
|
||||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
ref.watch(fusionProgressUIStateProvider(widget.walletId)).succeeded;
|
||||||
|
|
||||||
bool _failed =
|
final bool _failed =
|
||||||
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
ref.watch(fusionProgressUIStateProvider(widget.walletId)).failed;
|
||||||
|
|
||||||
int _fusionRoundsCompleted = ref
|
final int _fusionRoundsCompleted = ref
|
||||||
.watch(fusionProgressUIStateProvider(widget.walletId))
|
.watch(fusionProgressUIStateProvider(widget.walletId))
|
||||||
.fusionRoundsCompleted;
|
.fusionRoundsCompleted;
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
||||||
onPressed: () => _fuseAgain,
|
onPressed: () => _fuseAgain,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// if (!_succeeded && !_failed) const Spacer(),
|
if (!_succeeded && !_failed) const Spacer(),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
),
|
),
|
||||||
|
@ -247,11 +247,11 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_failed) const Spacer(),
|
if (_failed) const Spacer(),
|
||||||
// if (!_succeeded && !_failed) const Spacer(),
|
if (!_succeeded && !_failed) const Spacer(),
|
||||||
// if (!_succeeded && !_failed)
|
if (!_succeeded && !_failed)
|
||||||
// const SizedBox(
|
const SizedBox(
|
||||||
// width: 16,
|
width: 16,
|
||||||
// ),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SecondaryButton(
|
child: SecondaryButton(
|
||||||
buttonHeight: ButtonHeight.m,
|
buttonHeight: ButtonHeight.m,
|
||||||
|
|
Loading…
Reference in a new issue