mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
disable chans
This commit is contained in:
parent
77f167171f
commit
8d0ec84ffc
2 changed files with 165 additions and 156 deletions
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
@ -22,34 +23,36 @@ class BuildingTransactionDialog extends StatefulWidget {
|
||||||
State<BuildingTransactionDialog> createState() => _RestoringDialogState();
|
State<BuildingTransactionDialog> createState() => _RestoringDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RestoringDialogState extends State<BuildingTransactionDialog> {
|
class _RestoringDialogState extends State<BuildingTransactionDialog>
|
||||||
// with TickerProviderStateMixin {
|
with TickerProviderStateMixin {
|
||||||
// late AnimationController? _spinController;
|
late AnimationController? _spinController;
|
||||||
// late Animation<double> _spinAnimation;
|
late Animation<double> _spinAnimation;
|
||||||
|
|
||||||
late final VoidCallback onCancel;
|
late final VoidCallback onCancel;
|
||||||
|
|
||||||
|
final bool chan = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
onCancel = widget.onCancel;
|
onCancel = widget.onCancel;
|
||||||
|
|
||||||
// _spinController = AnimationController(
|
_spinController = AnimationController(
|
||||||
// duration: const Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
// vsync: this,
|
vsync: this,
|
||||||
// )..repeat();
|
)..repeat();
|
||||||
//
|
|
||||||
// _spinAnimation = CurvedAnimation(
|
_spinAnimation = CurvedAnimation(
|
||||||
// parent: _spinController!,
|
parent: _spinController!,
|
||||||
// curve: Curves.linear,
|
curve: Curves.linear,
|
||||||
// );
|
);
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// _spinController?.dispose();
|
_spinController?.dispose();
|
||||||
// _spinController = null;
|
_spinController = null;
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@ -67,20 +70,21 @@ class _RestoringDialogState extends State<BuildingTransactionDialog> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
),
|
),
|
||||||
|
if (chan)
|
||||||
Lottie.asset(
|
Lottie.asset(
|
||||||
Assets.lottie.kiss(widget.coin),
|
Assets.lottie.kiss(widget.coin),
|
||||||
),
|
),
|
||||||
// RotationTransition(
|
if (!chan)
|
||||||
// turns: _spinAnimation,
|
RotationTransition(
|
||||||
// child: SvgPicture.asset(
|
turns: _spinAnimation,
|
||||||
// Assets.svg.arrowRotate,
|
child: SvgPicture.asset(
|
||||||
// color:
|
Assets.svg.arrowRotate,
|
||||||
// Theme.of(context).extension<StackColors>()!.accentColorDark,
|
color:
|
||||||
// width: 24,
|
Theme.of(context).extension<StackColors>()!.accentColorDark,
|
||||||
// height: 24,
|
width: 24,
|
||||||
// ),
|
height: 24,
|
||||||
// ),
|
),
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
),
|
),
|
||||||
|
@ -98,7 +102,8 @@ class _RestoringDialogState extends State<BuildingTransactionDialog> {
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: StackDialogBase(
|
child: chan
|
||||||
|
? StackDialogBase(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -136,35 +141,34 @@ class _RestoringDialogState extends State<BuildingTransactionDialog> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: StackDialog(
|
||||||
|
title: "Generating transaction",
|
||||||
|
icon: RotationTransition(
|
||||||
|
turns: _spinAnimation,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.arrowRotate,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorDark,
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
rightButton: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getSecondaryEnabledButtonStyle(context),
|
||||||
|
child: Text(
|
||||||
|
"Cancel",
|
||||||
|
style: STextStyles.itemSubtitle12(context),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
onCancel.call();
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// child: StackDialog(
|
|
||||||
// title: "Generating transaction",
|
|
||||||
// // // TODO get message from design team
|
|
||||||
// // message: "<PLACEHOLDER>",
|
|
||||||
// icon: RotationTransition(
|
|
||||||
// turns: _spinAnimation,
|
|
||||||
// child: SvgPicture.asset(
|
|
||||||
// Assets.svg.arrowRotate,
|
|
||||||
// color:
|
|
||||||
// Theme.of(context).extension<StackColors>()!.accentColorDark,
|
|
||||||
// width: 24,
|
|
||||||
// height: 24,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// rightButton: TextButton(
|
|
||||||
// style: Theme.of(context)
|
|
||||||
// .extension<StackColors>()!
|
|
||||||
// .getSecondaryEnabledButtonStyle(context),
|
|
||||||
// child: Text(
|
|
||||||
// "Cancel",
|
|
||||||
// style: STextStyles.itemSubtitle12(context),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// onCancel.call();
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/stack_dialog.dart';
|
import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
|
@ -19,30 +21,32 @@ class SendingTransactionDialog extends StatefulWidget {
|
||||||
State<SendingTransactionDialog> createState() => _RestoringDialogState();
|
State<SendingTransactionDialog> createState() => _RestoringDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RestoringDialogState extends State<SendingTransactionDialog> {
|
class _RestoringDialogState extends State<SendingTransactionDialog>
|
||||||
// with TickerProviderStateMixin {
|
with TickerProviderStateMixin {
|
||||||
// late AnimationController? _spinController;
|
late AnimationController? _spinController;
|
||||||
// late Animation<double> _spinAnimation;
|
late Animation<double> _spinAnimation;
|
||||||
|
|
||||||
|
final bool chan = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// _spinController = AnimationController(
|
_spinController = AnimationController(
|
||||||
// duration: const Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
// vsync: this,
|
vsync: this,
|
||||||
// )..repeat();
|
)..repeat();
|
||||||
//
|
|
||||||
// _spinAnimation = CurvedAnimation(
|
_spinAnimation = CurvedAnimation(
|
||||||
// parent: _spinController!,
|
parent: _spinController!,
|
||||||
// curve: Curves.linear,
|
curve: Curves.linear,
|
||||||
// );
|
);
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// _spinController?.dispose();
|
_spinController?.dispose();
|
||||||
// _spinController = null;
|
_spinController = null;
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@ -63,20 +67,21 @@ class _RestoringDialogState extends State<SendingTransactionDialog> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
),
|
),
|
||||||
Lottie.asset(
|
chan
|
||||||
|
? Lottie.asset(
|
||||||
Assets.lottie.kiss(widget.coin),
|
Assets.lottie.kiss(widget.coin),
|
||||||
|
)
|
||||||
|
: RotationTransition(
|
||||||
|
turns: _spinAnimation,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.arrowRotate,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorDark,
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// RotationTransition(
|
|
||||||
// turns: _spinAnimation,
|
|
||||||
// child: SvgPicture.asset(
|
|
||||||
// Assets.svg.arrowRotate,
|
|
||||||
// color: Theme.of(context)
|
|
||||||
// .extension<StackColors>()!
|
|
||||||
// .accentColorDark,
|
|
||||||
// width: 24,
|
|
||||||
// height: 24,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -86,7 +91,8 @@ class _RestoringDialogState extends State<SendingTransactionDialog> {
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: StackDialogBase(
|
child: chan
|
||||||
|
? StackDialogBase(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -104,22 +110,21 @@ class _RestoringDialogState extends State<SendingTransactionDialog> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: StackDialog(
|
||||||
|
title: "Sending transaction",
|
||||||
|
icon: RotationTransition(
|
||||||
|
turns: _spinAnimation,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.arrowRotate,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorDark,
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// child: StackDialog(
|
|
||||||
// title: "Sending transaction",
|
|
||||||
// // // TODO get message from design team
|
|
||||||
// // message: "<PLACEHOLDER>",
|
|
||||||
// icon: RotationTransition(
|
|
||||||
// turns: _spinAnimation,
|
|
||||||
// child: SvgPicture.asset(
|
|
||||||
// Assets.svg.arrowRotate,
|
|
||||||
// color:
|
|
||||||
// Theme.of(context).extension<StackColors>()!.accentColorDark,
|
|
||||||
// width: 24,
|
|
||||||
// height: 24,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue