Skip to content

Commit c2b7981

Browse files
committed
fix bug
1 parent e70718a commit c2b7981

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

lib/pages/node_page.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
6363
final double buttonIconSize = 40.0;
6464
final blue = Color.fromARGB(255, 0, 255, 255);
6565

66-
final blueTextstyle = TextStyle(color: blue, fontSize: 25);
67-
final whiteTextstyle = TextStyle(color: Colors.white, fontSize: 25);
66+
final blueTextstyle = TextStyle(color: blue, fontSize: 18);
67+
final whiteTextstyle = TextStyle(color: Colors.white, fontSize: 18);
6868
final edgeTexts = EdgeInsets.only(left: 30, right: 30);
6969
final dateTime = DateTime.now();
7070
time = formatDate(dateTime, [yyyy, '/', mm, '/', dd, ' ', HH, ':', nn]);
@@ -117,7 +117,7 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
117117
tmpText = lines.sublist(lines.length - maxLines).join();
118118
}
119119
setState(() {
120-
text = tmpText;
120+
text = tmpText;
121121
});
122122
});
123123
startRequest = true;
@@ -406,7 +406,7 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
406406
final balance = await node.balanceOfStc(address);
407407
final nodeInfo = await node.nodeInfo();
408408
final totalDifficulty =
409-
nodeInfo['peer_info']['chain_info']['total_difficulty'];
409+
nodeInfo['peer_info']['chain_info']['block_info']['total_difficulty'];
410410

411411
final syncProgress = await node.syncProgress();
412412
var taskNames;
@@ -420,7 +420,8 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
420420
this.address = address.toString();
421421
this.balance = balance.toBigInt() / BigInt.from(1000000000);
422422
this.difficulty = totalDifficulty;
423-
this.taskName = taskNames[taskNames.length - 1];
423+
if(taskNames!=null)
424+
this.taskName = taskNames[taskNames.length - 1];
424425
this.percent = percent;
425426
});
426427
}

pubspec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ dependencies:
2828

2929
# The following adds the Cupertino Icons font to your application.
3030
# Use with the CupertinoIcons class for iOS style icons.
31-
cupertino_icons: ^0.1.2
32-
provider: ^3.1.0+1
31+
cupertino_icons: ^1.0.2
32+
provider: ^5.0.0
3333
hex: ^0.1.2
3434
shared_preferences: ^2.0.3
35-
flutter_spinkit: "^4.1.1+1"
36-
flutter_hooks: ^0.9.0
35+
flutter_spinkit: ^5.0.0
36+
flutter_hooks: ^0.16.0
3737
built_value: ^7.1.0
3838
built_collection: ^4.3.2
39-
flutter_redux: ^0.7.0
40-
font_awesome_flutter: ^8.2.0
39+
flutter_redux: ^0.8.2
40+
font_awesome_flutter: ^9.0.0
4141
path: 1.8.0
42-
date_format: 1.0.9
42+
date_format: ^2.0.2
4343
image: ^2.1.14
4444
starcoin_wallet:
4545
git:

0 commit comments

Comments
 (0)