Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fanngyuan committed Mar 27, 2021
1 parent e70718a commit c2b7981
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions lib/pages/node_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
final double buttonIconSize = 40.0;
final blue = Color.fromARGB(255, 0, 255, 255);

final blueTextstyle = TextStyle(color: blue, fontSize: 25);
final whiteTextstyle = TextStyle(color: Colors.white, fontSize: 25);
final blueTextstyle = TextStyle(color: blue, fontSize: 18);
final whiteTextstyle = TextStyle(color: Colors.white, fontSize: 18);
final edgeTexts = EdgeInsets.only(left: 30, right: 30);
final dateTime = DateTime.now();
time = formatDate(dateTime, [yyyy, '/', mm, '/', dd, ' ', HH, ':', nn]);
Expand Down Expand Up @@ -117,7 +117,7 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
tmpText = lines.sublist(lines.length - maxLines).join();
}
setState(() {
text = tmpText;
text = tmpText;
});
});
startRequest = true;
Expand Down Expand Up @@ -406,7 +406,7 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
final balance = await node.balanceOfStc(address);
final nodeInfo = await node.nodeInfo();
final totalDifficulty =
nodeInfo['peer_info']['chain_info']['total_difficulty'];
nodeInfo['peer_info']['chain_info']['block_info']['total_difficulty'];

final syncProgress = await node.syncProgress();
var taskNames;
Expand All @@ -420,7 +420,8 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
this.address = address.toString();
this.balance = balance.toBigInt() / BigInt.from(1000000000);
this.difficulty = totalDifficulty;
this.taskName = taskNames[taskNames.length - 1];
if(taskNames!=null)
this.taskName = taskNames[taskNames.length - 1];
this.percent = percent;
});
}
Expand Down
14 changes: 7 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
provider: ^3.1.0+1
cupertino_icons: ^1.0.2
provider: ^5.0.0
hex: ^0.1.2
shared_preferences: ^2.0.3
flutter_spinkit: "^4.1.1+1"
flutter_hooks: ^0.9.0
flutter_spinkit: ^5.0.0
flutter_hooks: ^0.16.0
built_value: ^7.1.0
built_collection: ^4.3.2
flutter_redux: ^0.7.0
font_awesome_flutter: ^8.2.0
flutter_redux: ^0.8.2
font_awesome_flutter: ^9.0.0
path: 1.8.0
date_format: 1.0.9
date_format: ^2.0.2
image: ^2.1.14
starcoin_wallet:
git:
Expand Down

0 comments on commit c2b7981

Please sign in to comment.