Skip to content

Commit

Permalink
release of v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansteenbakker committed Oct 11, 2023
1 parent f426c30 commit 85bd43b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 33 deletions.
3 changes: 3 additions & 0 deletions community_charts_common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.0.2
* Upgraded sdk constraint

# 1.0.1
* Updated intl dependency to support latest version
* Removed unused dependencies
Expand Down
4 changes: 2 additions & 2 deletions community_charts_common/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions community_charts_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion community_charts_flutter/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
6 changes: 3 additions & 3 deletions community_charts_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class TabularLegendLayout implements LegendLayout {
final rows =
new List.generate(maxRows, (_) => new TableRow(children: <Widget>[]));
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);
Expand All @@ -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<int>(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<Padding>.generate(padCount, (_) => padWidget));
Expand Down
4 changes: 2 additions & 2 deletions community_charts_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () {
Expand All @@ -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', () {
Expand All @@ -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', () {
Expand All @@ -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', () {
Expand All @@ -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', () {
Expand All @@ -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]));
});
});
}

0 comments on commit 85bd43b

Please sign in to comment.