mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 17:26:35 +00:00
Update breaking fl_chart dependency
This commit is contained in:
parent
073b7bfcb6
commit
bef625a934
|
@ -35,9 +35,7 @@ class CpuChart extends StatelessWidget {
|
|||
spots: getSpots(),
|
||||
isCurved: true,
|
||||
barWidth: 1,
|
||||
colors: [
|
||||
Colors.red,
|
||||
],
|
||||
color: Colors.red,
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
|
@ -47,28 +45,45 @@ class CpuChart extends StatelessWidget {
|
|||
maxY: 100,
|
||||
minX: data.length - 200,
|
||||
titlesData: FlTitlesData(
|
||||
topTitles: SideTitles(showTitles: false),
|
||||
bottomTitles: SideTitles(
|
||||
topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
||||
bottomTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
interval: 20,
|
||||
rotateAngle: 90.0,
|
||||
showTitles: true,
|
||||
getTextStyles: (_, __) => const TextStyle(
|
||||
reservedSize: 50,
|
||||
getTitlesWidget: (value, titleMeta) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RotatedBox(
|
||||
child: Text(bottomTitle(value.toInt()),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.purple,
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
quarterTurns: 1,
|
||||
),
|
||||
getTitles: (value) {
|
||||
return bottomTitle(value.toInt());
|
||||
}),
|
||||
leftTitles: SideTitles(
|
||||
getTextStyles: (_, __) => progressTextStyleLight.copyWith(
|
||||
);
|
||||
},
|
||||
showTitles: true,
|
||||
),
|
||||
),
|
||||
leftTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
getTitlesWidget: (value, titleMeta) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 15),
|
||||
child: Text(
|
||||
value.toInt().toString(),
|
||||
style: progressTextStyleLight.copyWith(
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? BrandColors.gray4
|
||||
: null,
|
||||
),
|
||||
margin: 15,
|
||||
));
|
||||
},
|
||||
interval: 25,
|
||||
showTitles: true,
|
||||
showTitles: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
gridData: FlGridData(show: true),
|
||||
|
|
|
@ -44,7 +44,7 @@ class NetworkChart extends StatelessWidget {
|
|||
spots: getSpots(listData[0]),
|
||||
isCurved: true,
|
||||
barWidth: 1,
|
||||
colors: [Colors.red],
|
||||
color: Colors.red,
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
|
@ -53,7 +53,7 @@ class NetworkChart extends StatelessWidget {
|
|||
spots: getSpots(listData[1]),
|
||||
isCurved: true,
|
||||
barWidth: 1,
|
||||
colors: [Colors.green],
|
||||
color: Colors.green,
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
|
@ -67,34 +67,51 @@ class NetworkChart extends StatelessWidget {
|
|||
1.2,
|
||||
minX: listData[0].length - 200,
|
||||
titlesData: FlTitlesData(
|
||||
topTitles: SideTitles(showTitles: false),
|
||||
bottomTitles: SideTitles(
|
||||
topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
||||
bottomTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
interval: 20,
|
||||
rotateAngle: 90.0,
|
||||
showTitles: true,
|
||||
getTextStyles: (_, __) => const TextStyle(
|
||||
reservedSize: 50,
|
||||
getTitlesWidget: (value, titleMeta) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RotatedBox(
|
||||
child: Text(bottomTitle(value.toInt()),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.purple,
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
quarterTurns: 1,
|
||||
),
|
||||
getTitles: (value) {
|
||||
return bottomTitle(value.toInt());
|
||||
}),
|
||||
leftTitles: SideTitles(
|
||||
);
|
||||
},
|
||||
showTitles: true,
|
||||
),
|
||||
),
|
||||
leftTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
reservedSize: 50,
|
||||
margin: 5,
|
||||
getTitlesWidget: (value, titleMeta) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 5),
|
||||
child: Text(
|
||||
value.toInt().toString(),
|
||||
style: progressTextStyleLight.copyWith(
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? BrandColors.gray4
|
||||
: null,
|
||||
),
|
||||
));
|
||||
},
|
||||
interval: [
|
||||
...listData[0].map((e) => e.value),
|
||||
...listData[1].map((e) => e.value)
|
||||
].reduce(max) *
|
||||
2 /
|
||||
10,
|
||||
getTextStyles: (_, __) => progressTextStyleLight.copyWith(
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? BrandColors.gray4
|
||||
: null,
|
||||
showTitles: false,
|
||||
),
|
||||
showTitles: true,
|
||||
),
|
||||
),
|
||||
gridData: FlGridData(show: true),
|
||||
|
|
|
@ -301,7 +301,7 @@ packages:
|
|||
name: fl_chart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.45.0"
|
||||
version: "0.50.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
|
|
@ -17,7 +17,7 @@ dependencies:
|
|||
easy_localization: ^3.0.0
|
||||
either_option: ^2.0.1-dev.1
|
||||
equatable: ^2.0.3
|
||||
fl_chart: ^0.45.0
|
||||
fl_chart: ^0.50.1
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_bloc: ^8.0.1
|
||||
|
|
Loading…
Reference in a new issue