Skip to content

Commit

Permalink
NO-TASK: Fix network name display issue (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
BigtoC committed May 23, 2022
1 parent 92a8e83 commit 56af008
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/presentation/drawer/settings_page/about_app_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,13 @@ class AboutAppWidget extends StatelessWidget {
builder: (context, AsyncSnapshot<Map<String, dynamic>> snapshot) {
String _networkName = "......";
if (snapshot.hasError) {
return Text('Error: ${snapshot.error}');
logger.e(snapshot.error);
return defaultNetwork(_networkName);
}
if (snapshot.hasData) {
_networkName = snapshot.data!["text"].toString();
}
return Text(
"Ethereum \n$_networkName",
style: TextStyle(fontSize: 22),
);
return defaultNetwork(_networkName);
},
),
),
Expand All @@ -120,4 +118,11 @@ class AboutAppWidget extends StatelessWidget {
],
));
}

Widget defaultNetwork(String networkName) {
return new Text(
"Ethereum \n$networkName",
style: TextStyle(fontSize: 22),
);
}
}

0 comments on commit 56af008

Please sign in to comment.