From 85bd43be13841614215d213512396e756ccb96f0 Mon Sep 17 00:00:00 2001 From: Julian Steenbakker Date: Wed, 11 Oct 2023 16:01:56 +0200 Subject: [PATCH] release of v1.0.2 --- community_charts_common/CHANGELOG.md | 3 ++ community_charts_common/pubspec.yaml | 4 +- community_charts_flutter/CHANGELOG.md | 4 ++ .../example/android/build.gradle | 2 +- community_charts_flutter/example/pubspec.yaml | 6 +-- .../src/behaviors/legend/legend_layout.dart | 6 +-- community_charts_flutter/pubspec.yaml | 4 +- .../behaviors/legend/legend_layout_test.dart | 44 +++++++++---------- 8 files changed, 40 insertions(+), 33 deletions(-) diff --git a/community_charts_common/CHANGELOG.md b/community_charts_common/CHANGELOG.md index 26667fa..6d125c7 100644 --- a/community_charts_common/CHANGELOG.md +++ b/community_charts_common/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.0.2 +* Upgraded sdk constraint + # 1.0.1 * Updated intl dependency to support latest version * Removed unused dependencies diff --git a/community_charts_common/pubspec.yaml b/community_charts_common/pubspec.yaml index 441a0c2..0888b34 100644 --- a/community_charts_common/pubspec.yaml +++ b/community_charts_common/pubspec.yaml @@ -1,10 +1,10 @@ name: community_charts_common -version: 1.0.1 +version: 1.0.2 description: A common library for charting packages. Forked from google/charts. repository: https://github.com/juliansteenbakker/community_charts environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: intl: ">=0.17.0 <0.19.0" diff --git a/community_charts_flutter/CHANGELOG.md b/community_charts_flutter/CHANGELOG.md index bfe9b63..47b4f09 100644 --- a/community_charts_flutter/CHANGELOG.md +++ b/community_charts_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.0.2 +* Fixed BaseChart not being destroyed on dispose (@MattyBoy4444) +* Fix potential divide by zero error for the DateTime tick provider (@Jetz72) + # 1.0.1 * Removed unused dependencies * Updated documentation urls diff --git a/community_charts_flutter/example/android/build.gradle b/community_charts_flutter/example/android/build.gradle index 3593d96..e46749d 100644 --- a/community_charts_flutter/example/android/build.gradle +++ b/community_charts_flutter/example/android/build.gradle @@ -24,6 +24,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/community_charts_flutter/example/pubspec.yaml b/community_charts_flutter/example/pubspec.yaml index 39fad1c..bac756c 100644 --- a/community_charts_flutter/example/pubspec.yaml +++ b/community_charts_flutter/example/pubspec.yaml @@ -1,18 +1,18 @@ name: example description: Charts-Flutter Demo environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' flutter: '>=2.5.0' dependencies: community_charts_flutter: path: ../ - cupertino_icons: ^0.1.0 + cupertino_icons: ^1.0.0 flutter: sdk: flutter flutter_test: sdk: flutter meta: ^1.1.1 - intl: ">=0.15.2 < 0.18.0" + intl: ">=0.15.2 <0.19.0" flutter: uses-material-design: true diff --git a/community_charts_flutter/lib/src/behaviors/legend/legend_layout.dart b/community_charts_flutter/lib/src/behaviors/legend/legend_layout.dart index 25c450a..d8a6176 100644 --- a/community_charts_flutter/lib/src/behaviors/legend/legend_layout.dart +++ b/community_charts_flutter/lib/src/behaviors/legend/legend_layout.dart @@ -127,7 +127,7 @@ class TabularLegendLayout implements LegendLayout { final rows = new List.generate(maxRows, (_) => new TableRow(children: [])); for (var i = 0; i < legendEntries.length; i++) { - rows[i % maxRows].children!.add(legendEntries[i]); + rows[i % maxRows].children.add(legendEntries[i]); } return _buildTableFromRows(rows); @@ -139,12 +139,12 @@ class TabularLegendLayout implements LegendLayout { // Pad rows to the max column count, because each TableRow in a table is // required to have the same number of children. final columnCount = rows - .map((r) => r.children!.length) + .map((r) => r.children.length) .fold(0, (max, current) => (current > max) ? current : max); for (var i = 0; i < rows.length; i++) { final rowChildren = rows[i].children; - final padCount = columnCount - rowChildren!.length; + final padCount = columnCount - rowChildren.length; if (padCount > 0) { rowChildren .addAll(new Iterable.generate(padCount, (_) => padWidget)); diff --git a/community_charts_flutter/pubspec.yaml b/community_charts_flutter/pubspec.yaml index 7c57be4..2335276 100644 --- a/community_charts_flutter/pubspec.yaml +++ b/community_charts_flutter/pubspec.yaml @@ -1,5 +1,5 @@ name: community_charts_flutter -version: 1.0.1 +version: 1.0.2 description: Material Design charting library for flutter. Forked from google/charts. repository: https://github.com/juliansteenbakker/community_charts @@ -15,7 +15,7 @@ dependencies: # # The pub version of community_charts_flutter will point to the pub version of community_charts_common. # The latest pub version is commented out and shown below as an example. - community_charts_common: ^1.0.1 + community_charts_common: ^1.0.2 # community_charts_common: # path: ../community_charts_common/ flutter: diff --git a/community_charts_flutter/test/behaviors/legend/legend_layout_test.dart b/community_charts_flutter/test/behaviors/legend/legend_layout_test.dart index d669502..0656017 100644 --- a/community_charts_flutter/test/behaviors/legend/legend_layout_test.dart +++ b/community_charts_flutter/test/behaviors/legend/legend_layout_test.dart @@ -35,7 +35,7 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 1); - expect(layout.children.first.children!.length, 3); + expect(layout.children.first.children.length, 3); }); test('does not build extra columns if max columns exceed widget count', () { @@ -45,7 +45,7 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 1); - expect(layout.children.first.children!.length, 3); + expect(layout.children.first.children.length, 3); }); test('builds horizontally until max column exceeded', () { @@ -58,16 +58,16 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 4); - expect(layout.children[0].children![0], equals(widgets[0])); - expect(layout.children[0].children![1], equals(widgets[1])); + expect(layout.children[0].children[0], equals(widgets[0])); + expect(layout.children[0].children[1], equals(widgets[1])); - expect(layout.children[1].children![0], equals(widgets[2])); - expect(layout.children[1].children![1], equals(widgets[3])); + expect(layout.children[1].children[0], equals(widgets[2])); + expect(layout.children[1].children[1], equals(widgets[3])); - expect(layout.children[2].children![0], equals(widgets[4])); - expect(layout.children[2].children![1], equals(widgets[5])); + expect(layout.children[2].children[0], equals(widgets[4])); + expect(layout.children[2].children[1], equals(widgets[5])); - expect(layout.children[3].children![0], equals(widgets[6])); + expect(layout.children[3].children[0], equals(widgets[6])); }); test('builds vertically', () { @@ -76,9 +76,9 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 3); - expect(layout.children[0].children!.length, 1); - expect(layout.children[1].children!.length, 1); - expect(layout.children[2].children!.length, 1); + expect(layout.children[0].children.length, 1); + expect(layout.children[1].children.length, 1); + expect(layout.children[2].children.length, 1); }); test('does not build extra rows if max rows exceed widget count', () { @@ -87,9 +87,9 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 3); - expect(layout.children[0].children!.length, 1); - expect(layout.children[1].children!.length, 1); - expect(layout.children[2].children!.length, 1); + expect(layout.children[0].children.length, 1); + expect(layout.children[1].children.length, 1); + expect(layout.children[2].children.length, 1); }); test('builds vertically until max column exceeded', () { @@ -101,16 +101,16 @@ void main() { final Table layout = builder.build(context, widgets) as Table; expect(layout.children.length, 2); - expect(layout.children[0].children![0], equals(widgets[0])); - expect(layout.children[1].children![0], equals(widgets[1])); + expect(layout.children[0].children[0], equals(widgets[0])); + expect(layout.children[1].children[0], equals(widgets[1])); - expect(layout.children[0].children![1], equals(widgets[2])); - expect(layout.children[1].children![1], equals(widgets[3])); + expect(layout.children[0].children[1], equals(widgets[2])); + expect(layout.children[1].children[1], equals(widgets[3])); - expect(layout.children[0].children![2], equals(widgets[4])); - expect(layout.children[1].children![2], equals(widgets[5])); + expect(layout.children[0].children[2], equals(widgets[4])); + expect(layout.children[1].children[2], equals(widgets[5])); - expect(layout.children[0].children![3], equals(widgets[6])); + expect(layout.children[0].children[3], equals(widgets[6])); }); }); }