@@ -18,7 +18,9 @@ import 'package:starport_template/widgets/starport_button_bar.dart';
1818import 'package:transaction_signing_gateway/model/wallet_public_info.dart' ;
1919
2020class AssetsPortfolioPage extends StatefulWidget {
21- const AssetsPortfolioPage ({Key ? key}) : super (key: key);
21+ const AssetsPortfolioPage ({
22+ Key ? key,
23+ }) : super (key: key);
2224
2325 @override
2426 State <AssetsPortfolioPage > createState () => _AssetsPortfolioPageState ();
@@ -35,12 +37,6 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
3537
3638 WalletPublicInfo get selectedWallet => StarportApp .walletsStore.selectedWallet;
3739
38- @override
39- void initState () {
40- super .initState ();
41- _fetchWalletBalances ();
42- }
43-
4440 @override
4541 Widget build (BuildContext context) {
4642 return Scaffold (
@@ -54,7 +50,10 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
5450 Column (
5551 children: [
5652 _gradientAvatar (context),
57- AssetPortfolioHeading (title: selectedWallet.name, onTap: _onTapDropDown),
53+ AssetPortfolioHeading (
54+ title: selectedWallet.name,
55+ onTap: _onTapDropDown,
56+ ),
5857 SizedBox (height: CosmosTheme .of (context).spacingXL),
5958 const Divider (),
6059 SizedBox (height: CosmosTheme .of (context).spacingL),
@@ -65,8 +64,11 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
6564 StarportButtonBar (
6665 onReceivePressed: _onTapReceive,
6766 onSendPressed: () {
68- Navigator .of (context)
69- .push (MaterialPageRoute (builder: (context) => SelectAssetPage (balancesList: balancesList)));
67+ Navigator .of (context).push (
68+ MaterialPageRoute (
69+ builder: (context) => SelectAssetPage (balancesList: balancesList),
70+ ),
71+ );
7072 },
7173 ),
7274 ],
@@ -97,12 +99,9 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
9799 );
98100 }
99101
100- void _onTapAvatar (BuildContext context) =>
101- Navigator .of (context).push (MaterialPageRoute (builder: (context) => const TransactionHistoryPage ()));
102-
103- Future _fetchWalletBalances () async {
104- await StarportApp .walletsStore.getBalances (selectedWallet.publicAddress);
105- }
102+ void _onTapAvatar (BuildContext context) => Navigator .of (context).push (
103+ MaterialPageRoute (builder: (context) => const TransactionHistoryPage ()),
104+ );
106105
107106 Future <void > _onTapDropDown () async {
108107 final wallet = await showMaterialModalBottomSheet (
@@ -125,7 +124,9 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
125124 backgroundColor: Colors .transparent,
126125 builder: (context) => SizedBox (
127126 height: MediaQuery .of (context).size.height / 1.06 ,
128- child: ReceiveMoneySheet (walletInfo: StarportApp .walletsStore.selectedWallet),
127+ child: ReceiveMoneySheet (
128+ walletInfo: StarportApp .walletsStore.selectedWallet,
129+ ),
129130 ),
130131 );
131132 }
@@ -134,7 +135,12 @@ class _AssetsPortfolioPageState extends State<AssetsPortfolioPage> {
134135 void debugFillProperties (DiagnosticPropertiesBuilder properties) {
135136 super .debugFillProperties (properties);
136137 properties
137- ..add (DiagnosticsProperty <WalletPublicInfo >('selectedWallet' , selectedWallet))
138+ ..add (
139+ DiagnosticsProperty <WalletPublicInfo >(
140+ 'selectedWallet' ,
141+ selectedWallet,
142+ ),
143+ )
138144 ..add (DiagnosticsProperty <bool >('isBalancesLoading' , isBalancesLoading))
139145 ..add (DiagnosticsProperty <bool >('isSendMoneyLoading' , isSendMoneyLoading))
140146 ..add (IterableProperty <Balance >('balancesList' , balancesList))
0 commit comments