

return new FlChart(
chart: new LineChart(
LineChartData(
lineTouchData: const LineTouchData(enabled: false),
lineBarsData: [
LineChartBarData(
spots: [
FlSpot(0, 1),
FlSpot(1, 2),
FlSpot(2, 1.5),
FlSpot(3, 3),
FlSpot(4, 3.5),
],
barWidth: 2,
isCurved: false,
colors: [Colors.blue],
belowBarData: BelowBarData( // 区域颜色
show: true,
colors: [Color.fromRGBO(3, 102, 214, 0.1)]
),
dotData: FlDotData( // 转折点
show: false,
),
)
],
minY: 0,
titlesData:FlTitlesData(
leftTitles: const SideTitles(showTitles: true,),
bottomTitles: SideTitles(
showTitles: true,
getTitles: (val) {
switch (val.toInt()) {
case 0:
return '12:00:00';
break;
case 1:
return '12:00:05';
break;
case 2:
return '12:00:10';
break;
case 3:
return '12:00:15';
break;
case 4:
return '12:00:20';
break;
}
}
)
),
gridData: FlGridData(show: true),
borderData:FlBorderData(
show: true,
border: new Border.all(width: 1.0, color: Colors.grey[350])
),
)
),
);
Hi, can you please update your flutter version by flutter upgrade command and check it again?
嗨,您可以通过
flutter upgrade命令更新您的颤动版本并再次检查吗?
This is another problem, by the way, I think you should upgrade your flutter version.
这是另一个问题,顺便说一下,我认为你应该升级你的颤动版本。
Okay, I'll try it. This is my version of Flutter

No, I mean run the command flutter --version
I checked it and it works fine,
Please try to upgrade the flutter.
我检查了它,它工作正常,
请尝试升级颤振。
Okay, thank you
For those to whom these things happen: try to change your flutter channel to stable 👍
Most helpful comment
For those to whom these things happen: try to change your flutter channel to
stable👍