mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
set state on download
This commit is contained in:
parent
04b9cddb19
commit
7390c498c7
1 changed files with 10 additions and 3 deletions
|
@ -42,6 +42,7 @@ class MonkeyView extends ConsumerStatefulWidget {
|
||||||
|
|
||||||
class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
||||||
late final String walletId;
|
late final String walletId;
|
||||||
|
List<int>? imageBytes;
|
||||||
|
|
||||||
String receivingAddress = "";
|
String receivingAddress = "";
|
||||||
|
|
||||||
|
@ -205,8 +206,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
||||||
|
|
||||||
final bool isDesktop = Util.isDesktop;
|
final bool isDesktop = Util.isDesktop;
|
||||||
|
|
||||||
List<int>? imageBytes;
|
imageBytes ??= (manager.wallet as BananoWallet).getMonkeyImageBytes();
|
||||||
imageBytes = (manager.wallet as BananoWallet).getMonkeyImageBytes();
|
|
||||||
|
|
||||||
//edit for desktop
|
//edit for desktop
|
||||||
return Background(
|
return Background(
|
||||||
|
@ -360,7 +360,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 300,
|
height: 300,
|
||||||
child: SvgPicture.memory(Uint8List.fromList(imageBytes)),
|
child: SvgPicture.memory(Uint8List.fromList(imageBytes!)),
|
||||||
),
|
),
|
||||||
isDesktop
|
isDesktop
|
||||||
? const SizedBox(
|
? const SizedBox(
|
||||||
|
@ -466,6 +466,13 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
||||||
subMessage: "We are fetching your MonKey",
|
subMessage: "We are fetching your MonKey",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
imageBytes = (manager.wallet as BananoWallet)
|
||||||
|
.getMonkeyImageBytes();
|
||||||
|
|
||||||
|
if (imageBytes != null) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
// if (isDesktop) {
|
// if (isDesktop) {
|
||||||
// Navigator.of(context).popUntil(
|
// Navigator.of(context).popUntil(
|
||||||
// ModalRoute.withName(
|
// ModalRoute.withName(
|
||||||
|
|
Loading…
Reference in a new issue