@@ -4,6 +4,7 @@ import 'package:cupcake/view_model/new_wallet_info_view_model.dart';
4
4
import 'package:cupcake/views/abstract.dart' ;
5
5
import 'package:cupcake/views/widgets/buttons/long_primary.dart' ;
6
6
import 'package:flutter/material.dart' ;
7
+ import 'package:flutter_mobx/flutter_mobx.dart' ;
7
8
8
9
class NewWalletInfoScreen extends AbstractView {
9
10
NewWalletInfoScreen ({
@@ -18,10 +19,15 @@ class NewWalletInfoScreen extends AbstractView {
18
19
bool get canPop => false ;
19
20
20
21
@override
21
- AppBar ? get appBar => AppBar (
22
- title: Text (viewModel.screenName),
23
- automaticallyImplyLeading: canPop,
24
- actions: _getActionButton (),
22
+ PreferredSizeWidget ? get appBar => PreferredSize (
23
+ preferredSize: const Size .fromHeight (kToolbarHeight),
24
+ child: Observer (
25
+ builder: (final context) => AppBar (
26
+ title: Text (viewModel.screenName),
27
+ automaticallyImplyLeading: canPop,
28
+ actions: _getActionButton (),
29
+ ),
30
+ ),
25
31
);
26
32
27
33
List <Widget >? _getActionButton () {
@@ -70,19 +76,21 @@ class NewWalletInfoScreen extends AbstractView {
70
76
return SafeArea (
71
77
child: Padding (
72
78
padding: const EdgeInsets .only (left: 32 , right: 32 , top: 0 , bottom: 16 ),
73
- child: Column (
74
- children: [
75
- if (viewModel.page.lottieAnimation != null ) viewModel.page.lottieAnimation! ,
76
- ...viewModel.page.texts,
77
- const Spacer (),
78
- SizedBox (
79
- width: double .maxFinite,
80
- child: Row (
81
- mainAxisSize: MainAxisSize .max,
82
- children: _getBottomActionButtons (),
79
+ child: Observer (
80
+ builder: (final context) => Column (
81
+ children: [
82
+ if (viewModel.page.lottieAnimation != null ) viewModel.page.lottieAnimation! ,
83
+ ...viewModel.page.texts,
84
+ const Spacer (),
85
+ SizedBox (
86
+ width: double .maxFinite,
87
+ child: Row (
88
+ mainAxisSize: MainAxisSize .max,
89
+ children: _getBottomActionButtons (),
90
+ ),
83
91
),
84
- ) ,
85
- ] ,
92
+ ] ,
93
+ ) ,
86
94
),
87
95
),
88
96
);
0 commit comments