Skip to content

Commit

Permalink
Fix bug in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mafanwei committed Jun 7, 2021
1 parent 1159efd commit 42f1f4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
return ListView(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: <Widget>[
Stack(children: <Widget>[
Container(
Expand Down
8 changes: 5 additions & 3 deletions lib/entity/k_line_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ class KLineEntity extends KEntity {
close = json['close']?.toDouble() ?? 0;
vol = json['vol']?.toDouble() ?? 0;
amount = json['amount']?.toDouble() ?? 0;
time = json['time']?.toInt() ?? json['id']?.toInt();
int? tempTime = json['time']?.toInt();
//兼容火币数据
if (time != null) {
time = time! * 1000;
if (tempTime == null) {
tempTime = json['id']?.toInt() ?? 0;
tempTime = tempTime! * 1000;
}
time = tempTime;
ratio = json['ratio']?.toDouble() ?? 0;
change = json['change']?.toDouble() ?? 0;
}
Expand Down

0 comments on commit 42f1f4c

Please sign in to comment.