fix: duplicate definition
This commit is contained in:
parent
6675f91635
commit
3f2b1d723f
1 changed files with 0 additions and 17 deletions
|
@ -65,23 +65,6 @@ class ExpensesLineChart extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<double> incomeData;
|
|
||||||
List<double> get incomeDataSorted {
|
|
||||||
var list = List<double>.from(incomeData);
|
|
||||||
list.sort((a, b) => a.compareTo(b));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
double get maxY {
|
|
||||||
if (incomeData.isEmpty) return expenseDataSorted.last;
|
|
||||||
if (expenseData.isEmpty) return incomeDataSorted.last;
|
|
||||||
if (expenseDataSorted.last > incomeDataSorted.last) {
|
|
||||||
return expenseDataSorted.last;
|
|
||||||
} else {
|
|
||||||
return incomeDataSorted.last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LineChart(
|
return LineChart(
|
||||||
|
|
Loading…
Reference in a new issue