forked from eatvio/eatvio_app
refactor(profile) Fixed an issue with charts display with a single building point
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
<application
|
||||
android:label="eatvio_app"
|
||||
android:label="Eatvio"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -33,7 +33,7 @@ class MyApp extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
return MaterialApp(
|
||||
theme: theme,
|
||||
title: 'eatvio_app',
|
||||
title: 'Eatvio',
|
||||
navigatorKey: NavigatorService.navigatorKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: [
|
||||
|
||||
@@ -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