From 43f988186336539fb11bb6f1c924aecd7fdc8e64 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 25 Nov 2024 13:38:19 +0300 Subject: [PATCH] fix: gradle --- android/app/build.gradle | 8 +++--- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../presentation/pages/profile_screen.dart | 2 +- .../widgets/imt_chart_widget.dart | 26 +++++++++---------- pubspec.yaml | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 3d80d62a..61c969aa 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ plugins { android { namespace = "com.eatvioapp.app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion + compileSdk = 35 + ndkVersion = "28.0.12433566" compileOptions { sourceCompatibility = JavaVersion.VERSION_21 @@ -15,13 +15,13 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_21 + jvmTarget = 21 } defaultConfig { applicationId = "com.eatvioapp.app" minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion + targetSdk = 35 versionCode = flutter.versionCode versionName = flutter.versionName } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 2496707b..28fdf3ac 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionBase=GRADLE_USER_HOME + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index f8c2a192..51825cfd 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -826,8 +826,8 @@ class _ProfileScreenState extends State { return ImtChartWidget( weightPoints: weightPoints, ); + default: return SizedBox.shrink(); } - return SizedBox.shrink(); }, ), SizedBox(height: 8), diff --git a/lib/features/profile/presentation/widgets/imt_chart_widget.dart b/lib/features/profile/presentation/widgets/imt_chart_widget.dart index 4738581d..d7264772 100644 --- a/lib/features/profile/presentation/widgets/imt_chart_widget.dart +++ b/lib/features/profile/presentation/widgets/imt_chart_widget.dart @@ -21,6 +21,7 @@ class ImtChartWidget extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Row( children: [ + if (weightPoints.length > 0) Text( '${weightPoints.last.bmi.toStringAsFixed(2)}', style: TextStyle( @@ -29,17 +30,18 @@ class ImtChartWidget extends StatelessWidget { fontWeight: FontWeight.w500, ), ), - weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi - ? Icon( - Icons.arrow_drop_up, - size: 40, - color: Colors.grey, - ) - : Icon( - Icons.arrow_drop_down, - size: 40, - color: Colors.grey, - ), + if (weightPoints.length > 1) + weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi + ? Icon( + Icons.arrow_drop_up, + size: 40, + color: Colors.grey, + ) + : Icon( + Icons.arrow_drop_down, + size: 40, + color: Colors.grey, + ), ], ), ), @@ -55,8 +57,6 @@ class ImtChartWidget extends StatelessWidget { lineType: TrackballLineType.vertical, ), primaryXAxis: DateTimeCategoryAxis( - initialVisibleMinimum: weightPoints.first.createdAt, - initialVisibleMaximum: weightPoints.last.createdAt, tickPosition: TickPosition.inside, majorTickLines: MajorTickLines( size: 0, diff --git a/pubspec.yaml b/pubspec.yaml index 5b8ed7b4..b207496d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.0.4+19 +version: 1.0.6+21 publish_to: "none" environment: