forked from eatvio/eatvio_app
refactor(profile) Fixed an issue with charts display with a single building point
This commit is contained in:
@@ -99,10 +99,16 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
..addAll(data["requestedPlan"])
|
||||
..addAll(data["initedPlan"]);
|
||||
|
||||
/*print(data["chartPoints"]);
|
||||
/*print(data["chartPoints"].length);
|
||||
print(data["chartPoints"].runtimeType);
|
||||
print(data["circumferences"]);
|
||||
print(data["circumferences"].length);
|
||||
print(data["circumferences"].runtimeType);*/
|
||||
if (data["chartPoints"].length == 1) {
|
||||
data["chartPoints"] = [];
|
||||
}
|
||||
if (data["circumferences"].length == 1) {
|
||||
data["circumferences"] = [];
|
||||
}
|
||||
var circumferences = data["circumferences"].isEmpty
|
||||
? data["circumferences"].asMap().map((index, value) {
|
||||
return MapEntry(index.toString(), value);
|
||||
|
||||
Reference in New Issue
Block a user