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> {
|
||||
late final String walletId;
|
||||
List<int>? imageBytes;
|
||||
|
||||
String receivingAddress = "";
|
||||
|
||||
|
@ -205,8 +206,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
|||
|
||||
final bool isDesktop = Util.isDesktop;
|
||||
|
||||
List<int>? imageBytes;
|
||||
imageBytes = (manager.wallet as BananoWallet).getMonkeyImageBytes();
|
||||
imageBytes ??= (manager.wallet as BananoWallet).getMonkeyImageBytes();
|
||||
|
||||
//edit for desktop
|
||||
return Background(
|
||||
|
@ -360,7 +360,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
|||
SizedBox(
|
||||
width: 300,
|
||||
height: 300,
|
||||
child: SvgPicture.memory(Uint8List.fromList(imageBytes)),
|
||||
child: SvgPicture.memory(Uint8List.fromList(imageBytes!)),
|
||||
),
|
||||
isDesktop
|
||||
? const SizedBox(
|
||||
|
@ -466,6 +466,13 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
|
|||
subMessage: "We are fetching your MonKey",
|
||||
);
|
||||
|
||||
imageBytes = (manager.wallet as BananoWallet)
|
||||
.getMonkeyImageBytes();
|
||||
|
||||
if (imageBytes != null) {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
// if (isDesktop) {
|
||||
// Navigator.of(context).popUntil(
|
||||
// ModalRoute.withName(
|
||||
|
|
Loading…
Reference in a new issue