From e9e4aa0febc6b8fc43430999ce96ece1199dbaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 11 Aug 2024 22:30:44 +0200 Subject: [PATCH 1/2] Make figure height more dynamic to not overflow --- lib/tabs/visualization.dart | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/tabs/visualization.dart b/lib/tabs/visualization.dart index 3e2132a..e39d1de 100644 --- a/lib/tabs/visualization.dart +++ b/lib/tabs/visualization.dart @@ -101,8 +101,7 @@ class _VisualizationTabState extends State { const SizedBox(height: 16.0), _buildChartTypeToggle(), const SizedBox(height: 16.0), - SizedBox( - height: 300.0, + Expanded( child: _dataPoints.isEmpty ? Center( child: Text( @@ -112,7 +111,22 @@ class _VisualizationTabState extends State { ), ), ) - : _buildChart(theme), + : LayoutBuilder( + builder: (context, constraints) { + // Calculate height dynamically based on screen size + final chartHeight = constraints.maxHeight; + + return ConstrainedBox( + constraints: BoxConstraints( + maxHeight: chartHeight, + ), + child: SizedBox( + height: chartHeight, + child: _buildChart(theme), + ), + ); + }, + ), ), ], ), From 4d22023548b4ef3c704a42c36f63bb3417895a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 11 Aug 2024 22:31:19 +0200 Subject: [PATCH 2/2] Bump v0.4.1+15 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 57f5a8e..cd86d90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.4.0+14 +version: 0.4.1+15 environment: sdk: '>=3.4.3 <4.0.0'