Commit 56af008 1 parent 92a8e83 commit 56af008 Copy full SHA for 56af008
File tree 1 file changed +10
-5
lines changed
lib/presentation/drawer/settings_page
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,13 @@ class AboutAppWidget extends StatelessWidget {
90
90
builder: (context, AsyncSnapshot <Map <String , dynamic >> snapshot) {
91
91
String _networkName = "......" ;
92
92
if (snapshot.hasError) {
93
- return Text ('Error: ${snapshot .error }' );
93
+ logger.e (snapshot.error);
94
+ return defaultNetwork (_networkName);
94
95
}
95
96
if (snapshot.hasData) {
96
97
_networkName = snapshot.data! ["text" ].toString ();
97
98
}
98
- return Text (
99
- "Ethereum \n $_networkName " ,
100
- style: TextStyle (fontSize: 22 ),
101
- );
99
+ return defaultNetwork (_networkName);
102
100
},
103
101
),
104
102
),
@@ -120,4 +118,11 @@ class AboutAppWidget extends StatelessWidget {
120
118
],
121
119
));
122
120
}
121
+
122
+ Widget defaultNetwork (String networkName) {
123
+ return new Text (
124
+ "Ethereum \n $networkName " ,
125
+ style: TextStyle (fontSize: 22 ),
126
+ );
127
+ }
123
128
}
You can’t perform that action at this time.
0 commit comments