refactor(profile) Fixed an issue with charts display with a single building point

This commit is contained in:
2024-02-07 10:59:50 +03:00
parent b2125b0c6c
commit 77d560cfce
3 changed files with 10 additions and 4 deletions

View File

@@ -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);