Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flutter-plugins-dependencies

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ migrate_working_dir/
**/doc/api/
.dart_tool/
build/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.2.0
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version in CHANGELOG.md is documented as 1.2.0, but pubspec.yaml shows 1.2.1. These versions should be consistent across all documentation.

Copilot uses AI. Check for mistakes.

* 31 refactor colorutil by @warioddly in https://github.com/warioddly/graphify/pull/33
* refactor GraphifyController and update dependencies by @warioddly in https://github.com/warioddly/graphify/pull/36
* refactor: update plugin paths and improve Graphify interface structure by @warioddly in https://github.com/warioddly/graphify/pull/37
* bump version to 1.2.0 in pubspec.yaml by @warioddly in https://github.com/warioddly/graphify/pull/38
**Full Changelog**: https://github.com/warioddly/graphify/compare/v1.1.1...v1.2.0

## 1.1.1

* Fix bug in old versions Flutter "Try changing the name to the name of an existing improvement, or identify an improvement, or a field named "r"."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<a href="https://pub.dartlang.org/packages/graphify"><img alt="Pub Package" src="https://img.shields.io/pub/v/graphify.svg"></a>
<a href="https://pub.dev/packages/graphify"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/warioddly/graphify"></a>
<a href="https://githubc.com/warioddly/graphify/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/warioddly/graphify" alt="GitHub closed issues"></a>
<a href="https://githubc.com/warioddly/graphify/issues"><img src="https://img.shields.io/github/issues/warioddly/graphify" alt="GitHub open issues"></a>
<a href="https://github.com/warioddly/graphify/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/warioddly/graphify" alt="GitHub closed issues"></a>
<a href="https://github.com/warioddly/graphify/issues"><img src="https://img.shields.io/github/issues/warioddly/graphify" alt="GitHub open issues"></a>
<a href="https://github.com/warioddly/graphify/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/warioddly/graphify"></a>
<a href="https://github.com/warioddly/graphify/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributing"></a>

Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.warioddly.graphify'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '2.1.0'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.8.10'
ext.kotlin_version = '2.1.0'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "com.android.application" version "8.7.0" apply false
}

include ":app"
7 changes: 1 addition & 6 deletions example/lib/charts/basic_line_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class BasicLineChart extends StatefulWidget {
}

class _BasicLineChartState extends State<BasicLineChart> {

final controller = GraphifyController();
Timer? timer;

Expand All @@ -28,7 +27,6 @@ class _BasicLineChartState extends State<BasicLineChart> {
]
});
});

}

@override
Expand All @@ -44,9 +42,7 @@ class _BasicLineChartState extends State<BasicLineChart> {
"type": "category",
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
"yAxis": {
"type": "value"
},
"yAxis": {"type": "value"},
"series": [
{
"data": [150, 230, 224, 218, 135, 147, 260],
Expand All @@ -63,5 +59,4 @@ class _BasicLineChartState extends State<BasicLineChart> {
controller.dispose();
super.dispose();
}

}
96 changes: 96 additions & 0 deletions example/lib/charts/chart_click.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:graphify/graphify.dart';

class ChartClick extends StatefulWidget {
const ChartClick({super.key});

@override
State<ChartClick> createState() => _ChartClickState();
}

class _ChartClickState extends State<ChartClick> {
late final GraphifyController _controller;
String _status = 'Ready to test clicks';

@override
void initState() {
super.initState();
_controller = GraphifyController();
_controller.chartClickedEvent.listen((data) {
debugPrint('listener received: $data');
setState(() {
_status = 'Click received: ${data['name'] ?? 'Unknown'}';
});

log('TEST: Chart click received: $data');
});
}

@override
Widget build(BuildContext context) {
return Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(16),
child: Text(
_status,
style: const TextStyle(fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
),
),
Container(
height: 400,
margin: const EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(8),
),
child: GraphifyView(
controller: _controller,
onConsoleMessage: (msg) {
debugPrint('WebView console: ${(msg as dynamic).message}');
Comment on lines +54 to +55
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onConsoleMessage callback casts msg to dynamic to access the .message property, but according to the interface, msg is already of type Object. This pattern is fragile and suggests the actual type is different from what's documented. Consider defining a proper type for console messages or clarifying the expected structure.

Copilot uses AI. Check for mistakes.
},
initialOptions: const {
"tooltip": {
"trigger": "axis",
"axisPointer": {"type": "shadow"}
},
"legend": {
"data": ["Sales", "Marketing"]
},
"xAxis": {
"type": "category",
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
"yAxis": {"type": "value"},
"series": [
{
"name": "Sales",
"type": "bar",
"data": [120, 200, 150, 80, 70, 110, 130],
"itemStyle": {"color": "#5470c6"}
},
{
"name": "Marketing",
"type": "bar",
"data": [60, 100, 75, 40, 35, 55, 65],
"itemStyle": {"color": "#91cc75"}
}
]
},
),
),
],
);
}

@override
void dispose() {
_controller.dispose();
super.dispose();
}
}
8 changes: 6 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:graphify_example/charts/basic_area_chart.dart';
import 'package:graphify_example/charts/basic_bar_chart.dart';
import 'package:graphify_example/charts/basic_line_chart.dart';
import 'package:graphify_example/charts/candle_stick_brush.dart';
import 'package:graphify_example/charts/chart_click.dart';
import 'package:graphify_example/charts/customized_radar_chart.dart';
import 'package:graphify_example/charts/graph_webkit_dep.dart';
import 'package:graphify_example/charts/heatmap_discrete_mapping_of_color.dart';
Expand All @@ -28,6 +29,7 @@ class MyApp extends StatelessWidget {
const MyApp({super.key});

static const charts = {
"Chart Click Test": ChartClick(),
"Basic Line Chart": BasicLineChart(),
'Basic Area Chart': BasicAreaChart(),
'Stacked Area Chart': StackedAreaChart(),
Expand Down Expand Up @@ -90,13 +92,15 @@ class MyApp extends StatelessWidget {
ListTile(
title: const Text("Open Source Code"),
onTap: () {
launchUrlString("https://github.com/warioddly/graphify");
launchUrlString(
"https://github.com/warioddly/graphify");
},
),
ListTile(
title: const Text("Pub.dev"),
onTap: () {
launchUrlString("https://pub.dev/packages/graphify");
launchUrlString(
"https://pub.dev/packages/graphify");
},
),
],
Expand Down
24 changes: 12 additions & 12 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.2"
version: "1.2.1"
integration_test:
dependency: "direct dev"
description: flutter
Expand All @@ -114,26 +114,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev"
source: hosted
version: "10.0.9"
version: "11.0.1"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.9"
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -255,10 +255,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.7.4"
version: "0.7.6"
url_launcher:
dependency: "direct main"
description:
Expand Down Expand Up @@ -327,10 +327,10 @@ packages:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.2.0"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -388,5 +388,5 @@ packages:
source: hosted
version: "3.18.4"
sdks:
dart: ">=3.7.0-0 <4.0.0"
dart: ">=3.8.0-0 <4.0.0"
flutter: ">=3.27.0"
9 changes: 4 additions & 5 deletions lib/graphify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ library graphify;

export 'src/controller/implements/facade.dart'
if (dart.library.io) 'src/controller/implements/mobile.dart'
if (dart.library.html) 'src/controller/implements/web.dart';
if (dart.library.js_interop) 'src/controller/implements/web.dart';

export 'src/view/implements/facade.dart'
if (dart.library.io) 'src/view/implements/mobile.dart'
if (dart.library.html) 'src/view/implements/web.dart';
if (dart.library.js_interop) 'src/view/implements/web.dart';

export 'src/utils/gradient/graphify_gradient.dart';
export 'src/utils/gradient/graphify_linear_gradient.dart';
export 'src/utils/gradient/graphify_radial_gradient.dart';
export 'src/utils/gradient/_gradient.dart';
8 changes: 5 additions & 3 deletions lib/src/controller/implements/facade.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import 'package:graphify/src/controller/interface.dart' as controller_interface;

class GraphifyController extends controller_interface.GraphifyController {

@override
void update(Map<String, dynamic>? options) {
throw UnimplementedError("update() is not implemented");
}

@override
Stream<Map<String, dynamic>> get chartClickedEvent =>
throw UnimplementedError("chartClickedEvent is not implemented");
Comment on lines +10 to +11
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chartClickedEvent getter throws an UnimplementedError instead of returning a Stream. This will cause runtime errors when accessed. Consider returning a never-emitting Stream (e.g., Stream.empty()) or a closed StreamController's stream to maintain consistent API behavior.

Suggested change
Stream<Map<String, dynamic>> get chartClickedEvent =>
throw UnimplementedError("chartClickedEvent is not implemented");
Stream<Map<String, dynamic>> get chartClickedEvent => Stream.empty();

Copilot uses AI. Check for mistakes.

@override
void dispose() {
throw UnimplementedError("dispose() is not implemented");
}

}
}
Loading