diff --git a/lib/pages/node_page.dart b/lib/pages/node_page.dart index 754fe3b..eb41584 100644 --- a/lib/pages/node_page.dart +++ b/lib/pages/node_page.dart @@ -63,8 +63,8 @@ class _NodePageState extends State 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]); @@ -117,7 +117,7 @@ class _NodePageState extends State with TickerProviderStateMixin { tmpText = lines.sublist(lines.length - maxLines).join(); } setState(() { - text = tmpText; + text = tmpText; }); }); startRequest = true; @@ -406,7 +406,7 @@ class _NodePageState extends State 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; @@ -420,7 +420,8 @@ class _NodePageState extends State 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; }); } diff --git a/pubspec.yaml b/pubspec.yaml index a9cca01..2ae92a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: