From 8af545b5a39bfbfc25c5f2a383dcdfada018cd75 Mon Sep 17 00:00:00 2001 From: Kima Date: Thu, 20 Jun 2024 12:06:49 +0200 Subject: [PATCH] upgraded pub things --- lib/ui/mobile/goal_planner/graph.dart | 71 +++++++++++++++++---------- pubspec.yaml | 4 +- 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/lib/ui/mobile/goal_planner/graph.dart b/lib/ui/mobile/goal_planner/graph.dart index 13bb31f..64bda44 100644 --- a/lib/ui/mobile/goal_planner/graph.dart +++ b/lib/ui/mobile/goal_planner/graph.dart @@ -148,21 +148,32 @@ class GoalGraphState extends State { preventCurveOverShooting: true, spots: subjectSpots, isCurved: true, - colors: [averageColor], + color: averageColor, barWidth: 8, isStrokeCapRound: true, - dotData: FlDotData(show: false), + dotData: const FlDotData(show: false), belowBarData: BarAreaData( show: true, - colors: [ - averageColor.withOpacity(0.7), - averageColor.withOpacity(0.3), - averageColor.withOpacity(0.2), - averageColor.withOpacity(0.1), - ], - gradientColorStops: [0.1, 0.6, 0.8, 1], - gradientFrom: const Offset(0, 0), - gradientTo: const Offset(0, 1), + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + averageColor.withOpacity(0.7), + averageColor.withOpacity(0.3), + averageColor.withOpacity(0.2), + averageColor.withOpacity(0.1), + ], + stops: const [0.1, 0.6, 0.8, 1], + ), + // colors: [ + // averageColor.withOpacity(0.7), + // averageColor.withOpacity(0.3), + // averageColor.withOpacity(0.2), + // averageColor.withOpacity(0.1), + // ], + // gradientColorStops: [0.1, 0.6, 0.8, 1], + // gradientFrom: const Offset(0, 0), + // gradientTo: const Offset(0, 1), ), ), if (ghostData.isNotEmpty && ghostSpots.isNotEmpty) @@ -170,27 +181,37 @@ class GoalGraphState extends State { preventCurveOverShooting: true, spots: ghostSpots, isCurved: true, - colors: [AppColors.of(context).text], + color: AppColors.of(context).text, barWidth: 8, isStrokeCapRound: true, - dotData: FlDotData(show: false), + dotData: const FlDotData(show: false), belowBarData: BarAreaData( show: true, - colors: [ - AppColors.of(context).text.withOpacity(0.7), - AppColors.of(context).text.withOpacity(0.3), - AppColors.of(context).text.withOpacity(0.2), - AppColors.of(context).text.withOpacity(0.1), - ], - gradientColorStops: [0.1, 0.6, 0.8, 1], - gradientFrom: const Offset(0, 0), - gradientTo: const Offset(0, 1), + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + AppColors.of(context) + .text + .withOpacity(0.7), + AppColors.of(context) + .text + .withOpacity(0.3), + AppColors.of(context) + .text + .withOpacity(0.2), + AppColors.of(context) + .text + .withOpacity(0.1), + ], + stops: const [0.1, 0.6, 0.8, 1], + ), ), ), ], minY: 1, maxY: 5, - gridData: FlGridData( + gridData: const FlGridData( show: true, horizontalInterval: 1, // checkToShowVerticalLine: (_) => false, @@ -204,8 +225,8 @@ class GoalGraphState extends State { // ), ), lineTouchData: LineTouchData( - touchTooltipData: LineTouchTooltipData( - tooltipBgColor: Colors.grey.shade800, + touchTooltipData: const LineTouchTooltipData( + // tooltipBgColor: Colors.grey.shade800, fitInsideVertically: true, fitInsideHorizontally: true, ), diff --git a/pubspec.yaml b/pubspec.yaml index 2c609d2..efe23e8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,9 +36,9 @@ dependencies: android_dynamic_icon: ^1.0.1 i18n_extension: ^12.0.1 http: ^1.2.0 - fl_chart: ^0.45.1 + fl_chart: ^0.68.0 flutter_dynamic_icon_plus: ^1.1.2 - share_plus: ^7.2.2 + share_plus: ^9.0.0 path_provider: ^2.1.3 file_picker: ^6.2.1