diff --git a/CHANGELOG.md b/CHANGELOG.md index 87458a2..afa0e76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ +## 0.3.0 + +- Added Line Color Option +- This is a fork of spider_chart from cnsumner + ## 0.2.0 - Color parameter is now optional and alternative color swatch parameter introduced - - Color swatch is useful for app theme matching. Blue color swatch is provided by default if neither custom colors nor color swatch are specified + - Color swatch is useful for app theme matching. Blue color swatch is provided by default if neither custom colors nor color swatch are specified - Max value now optional and is automatically calculated from data points if not provided ## 0.1.8 diff --git a/README.md b/README.md index 9d221a7..5427e0a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Pub](https://img.shields.io/pub/v/spider_chart.svg)](https://pub.dartlang.org/packages/spider_chart) -[![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/cnsumner/flutter-spider-chart.svg)](https://gitlab.com/cnsumner/flutter-spider-chart) # spider_chart @@ -36,3 +34,212 @@ Center( ), ) ``` + +```dart +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/material.dart'; +import 'package:spider_chart/spider_chart.dart'; + +class SpiderChartWithIndicatorText extends StatefulWidget { + const SpiderChartWithIndicatorText({ + Key? key, + this.width, + this.height, + this.data, + this.data2, + this.data3, + this.data4, + this.dataName, + this.data2Name, + this.data3Name, + this.data4Name, + }) : super(key: key); + + final double? width; + final double? height; + final List? data; + final List? data2; + final List? data3; + final List? data4; + final String? dataName; + final String? data2Name; + final String? data3Name; + final String? data4Name; + + @override + State createState() => + _SpiderChartWithIndicatorTextState(); +} + +class _SpiderChartWithIndicatorTextState + extends State { + List list = []; + int _current = 0; + final CarouselController _controller = CarouselController(); + final colorList = [ + const Color(0xff62ACD6), + const Color(0xffE69138), + const Color(0xff4EA8A8), + const Color(0xff38761D), + const Color(0xff6499E8), + ]; + List names = [ + 'Performance', + 'Power', + 'Quality', + 'Service', + 'Cost', + ]; + + @override + void initState() { + // TODO: implement initState + super.initState(); + get(); + } + + get() { + print('Data :${widget.data}'); + print('name :${widget.dataName}'); + + if (widget.data != null && widget.data!.length == 5) { + list.add(SpiderChart( + data: widget.data!, + colorSwatch: Colors.blue, + labels: names, + lineColor: Colors.blueAccent, + maxValue: 10, + )); + } + if (widget.data2 != null && widget.data2!.length == 5) { + list.add(SpiderChart( + data: widget.data2!, + colorSwatch: Colors.orange, + labels: names, + maxValue: 10, + lineColor: Colors.orangeAccent, + )); + } + if (widget.data3 != null && widget.data3!.length == 5) { + list.add(SpiderChart( + data: widget.data3!, + colorSwatch: Colors.deepPurple, + labels: names, + maxValue: 10, + lineColor: Colors.deepPurpleAccent, + )); + } + if (widget.data4 != null && widget.data4!.length == 5) { + list.add(SpiderChart( + data: widget.data4!, + colorSwatch: Colors.green, + labels: names, + lineColor: Colors.greenAccent, + maxValue: 10, + )); + } + + print(list); + } + + getTextName(int index) { + switch (index) { + case 0: + return widget.dataName ?? ''; + + case 1: + return widget.data2Name ?? ''; + + case 2: + return widget.data3Name ?? ''; + + case 3: + return widget.data4Name ?? ''; + + default: + return ''; + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + title: const Text( + 'Spider', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.blue, + ), + body: Column( + children: [ + CarouselSlider( + carouselController: _controller, + options: CarouselOptions( + pageSnapping: true, + autoPlay: true, + enlargeCenterPage: true, + aspectRatio: 2.0, + onPageChanged: (index, reason) { + setState(() { + _current = index; + }); + }, + height: widget.height ?? + MediaQuery.of(context).size.longestSide * 0.4, + ), + items: list.map((i) { + return Builder( + builder: (BuildContext context) { + return Container( + width: widget.width, + margin: const EdgeInsets.symmetric(horizontal: 5.0), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20))), + child: Padding( + padding: EdgeInsets.symmetric( + vertical: + MediaQuery.of(context).size.shortestSide * 0.1), + child: i, + )); + }, + ); + }).toList(), + ), + Text( + getTextName(_current), + style: TextStyle( + fontSize: MediaQuery.of(context).size.shortestSide * 0.05, + fontWeight: FontWeight.w600), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate( + list.length, + (index) => GestureDetector( + onTap: () { + print(index); + _controller.animateToPage(index); + }, + child: Container( + width: 12.0, + height: 12.0, + margin: const EdgeInsets.symmetric( + vertical: 8.0, horizontal: 4.0), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: (Theme.of(context).brightness == + Brightness.dark + ? Colors.white + : Colors.black) + .withOpacity(_current == index ? 0.9 : 0.4)), + ), + ))), + ], + ), + ); + } +} + +``` diff --git a/example/integration_test/screenshot.dart b/example/integration_test/screenshot.dart index fef57f4..6cb6eba 100644 --- a/example/integration_test/screenshot.dart +++ b/example/integration_test/screenshot.dart @@ -1,19 +1,19 @@ -// ignore_for_file: avoid_print +// // ignore_for_file: avoid_print -import 'dart:io'; -import 'package:integration_test/integration_test_driver_extended.dart'; +// import 'dart:io'; +// import 'package:integration_test/integration_test_driver_extended.dart'; -Future main() async { - try { - await integrationDriver( - onScreenshot: (String screenshotName, List screenshotBytes) async { - final File image = await File('screenshots/$screenshotName.png') - .create(recursive: true); - image.writeAsBytesSync(screenshotBytes); - return true; - }, - ); - } catch (e) { - print('Error occured: $e'); - } -} +// Future main() async { +// try { +// await integrationDriver( +// onScreenshot: (String screenshotName, List screenshotBytes) async { +// final File image = await File('screenshots/$screenshotName.png') +// .create(recursive: true); +// image.writeAsBytesSync(screenshotBytes); +// return true; +// }, +// ); +// } catch (e) { +// print('Error occured: $e'); +// } +// } diff --git a/example/integration_test/screenshot_test.dart b/example/integration_test/screenshot_test.dart index 44af01e..bafa9a4 100644 --- a/example/integration_test/screenshot_test.dart +++ b/example/integration_test/screenshot_test.dart @@ -1,99 +1,101 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:spider_chart_examples/main.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_test/flutter_test.dart'; -void main() { - final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); +// // import 'package:integration_test/integration_test.dart'; - group('Take screenshots', () { - testWidgets('screenshot basic chart', (tester) async { - await tester.pumpWidget(const App()); - await tester.pumpAndSettle(); +// import '../lib/main.dart'; - final finder = find.byKey(const Key("button_default_chart")); +// void main() { +// // final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - await tester.tap(finder); +// group('Take screenshots', () { +// testWidgets('screenshot basic chart', (tester) async { +// await tester.pumpWidget(const App()); +// await tester.pumpAndSettle(); - await tester.pumpAndSettle(); +// final finder = find.byKey(const Key("button_default_chart")); - await binding.convertFlutterSurfaceToImage(); +// await tester.tap(finder); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - await binding.takeScreenshot('default_chart'); - }); +// await binding.convertFlutterSurfaceToImage(); - testWidgets('screenshot chart with labels', (tester) async { - await tester.pumpWidget(const App()); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - final finder = find.byKey(const Key("button_chart_with_labels"), - skipOffstage: false); +// await binding.takeScreenshot('default_chart'); +// }); - await tester.tap(finder); +// testWidgets('screenshot chart with labels', (tester) async { +// await tester.pumpWidget(const App()); +// await tester.pumpAndSettle(); - await tester.pumpAndSettle(); +// final finder = find.byKey(const Key("button_chart_with_labels"), +// skipOffstage: false); - await binding.convertFlutterSurfaceToImage(); +// await tester.tap(finder); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - await binding.takeScreenshot('chart_with_labels'); - }); +// await binding.convertFlutterSurfaceToImage(); - testWidgets('screenshot chart with max value', (tester) async { - await tester.pumpWidget(const App()); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - final finder = find.byKey(const Key("button_chart_with_max_value"), - skipOffstage: false); +// await binding.takeScreenshot('chart_with_labels'); +// }); - await tester.tap(finder); +// testWidgets('screenshot chart with max value', (tester) async { +// await tester.pumpWidget(const App()); +// await tester.pumpAndSettle(); - await tester.pumpAndSettle(); +// final finder = find.byKey(const Key("button_chart_with_max_value"), +// skipOffstage: false); - await binding.convertFlutterSurfaceToImage(); +// await tester.tap(finder); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - await binding.takeScreenshot('chart_with_max_value'); - }); +// await binding.convertFlutterSurfaceToImage(); - testWidgets('screenshot chart with custom colors', (tester) async { - await tester.pumpWidget(const App()); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - final finder = find.byKey(const Key("button_chart_with_custom_colors"), - skipOffstage: false); +// await binding.takeScreenshot('chart_with_max_value'); +// }); - await tester.tap(finder); +// testWidgets('screenshot chart with custom colors', (tester) async { +// await tester.pumpWidget(const App()); +// await tester.pumpAndSettle(); - await tester.pumpAndSettle(); +// final finder = find.byKey(const Key("button_chart_with_custom_colors"), +// skipOffstage: false); - await binding.convertFlutterSurfaceToImage(); +// await tester.tap(finder); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - await binding.takeScreenshot('chart_with_custom_colors'); - }); +// await binding.convertFlutterSurfaceToImage(); - testWidgets('screenshot chart with color swatch', (tester) async { - await tester.pumpWidget(const App()); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - final finder = find.byKey(const Key("button_chart_with_color_swatch"), - skipOffstage: false); +// await binding.takeScreenshot('chart_with_custom_colors'); +// }); - await tester.tap(finder); +// testWidgets('screenshot chart with color swatch', (tester) async { +// await tester.pumpWidget(const App()); +// await tester.pumpAndSettle(); - await tester.pumpAndSettle(); +// final finder = find.byKey(const Key("button_chart_with_color_swatch"), +// skipOffstage: false); - await binding.convertFlutterSurfaceToImage(); +// await tester.tap(finder); - await tester.pumpAndSettle(); +// await tester.pumpAndSettle(); - await binding.takeScreenshot('chart_with_color_swatch'); - }); - }); -} +// await binding.convertFlutterSurfaceToImage(); + +// await tester.pumpAndSettle(); + +// await binding.takeScreenshot('chart_with_color_swatch'); +// }); +// }); +// } diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..fdcc671 --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/lib/chart_with_color_swatch.dart b/example/lib/chart_with_color_swatch.dart index ceff4d8..f07c3f9 100644 --- a/example/lib/chart_with_color_swatch.dart +++ b/example/lib/chart_with_color_swatch.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:spider_chart/spider_chart.dart'; +import 'package:spider_chart_updated/spider_chart_updated.dart'; class ChartWithColorSwatch extends StatelessWidget { - const ChartWithColorSwatch({super.key}); + const ChartWithColorSwatch({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -14,7 +14,7 @@ class ChartWithColorSwatch extends StatelessWidget { child: SizedBox( width: 200, height: 200, - child: SpiderChart( + child: SpiderChartUpdated( data: const [ 7, 5, diff --git a/example/lib/chart_with_custom_colors.dart b/example/lib/chart_with_custom_colors.dart index 759b1b9..b565830 100644 --- a/example/lib/chart_with_custom_colors.dart +++ b/example/lib/chart_with_custom_colors.dart @@ -1,36 +1,204 @@ +import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; -import 'package:spider_chart/spider_chart.dart'; +import 'package:spider_chart_updated/spider_chart_updated.dart'; -class ChartWithCustomColors extends StatelessWidget { - const ChartWithCustomColors({super.key}); +class SpiderChartWithIndicatorText extends StatefulWidget { + const SpiderChartWithIndicatorText({ + Key? key, + this.width, + this.height, + this.data, + this.data2, + this.data3, + this.data4, + this.dataName, + this.data2Name, + this.data3Name, + this.data4Name, + }) : super(key: key); + + final double? width; + final double? height; + final List? data; + final List? data2; + final List? data3; + final List? data4; + final String? dataName; + final String? data2Name; + final String? data3Name; + final String? data4Name; + + @override + State createState() => + _SpiderChartWithIndicatorTextState(); +} + +class _SpiderChartWithIndicatorTextState + extends State { + List list = []; + int _current = 0; + final CarouselController _controller = CarouselController(); + final colorList = [ + const Color(0xff62ACD6), + const Color(0xffE69138), + const Color(0xff4EA8A8), + const Color(0xff38761D), + const Color(0xff6499E8), + ]; + List names = [ + 'Performance', + 'Power', + 'Quality', + 'Service', + 'Cost', + ]; + + @override + void initState() { + // TODO: implement initState + super.initState(); + get(); + } + + get() { + print('Data :${widget.data}'); + print('name :${widget.dataName}'); + + if (widget.data != null && widget.data!.length == 5) { + list.add(SpiderChartUpdated( + data: widget.data!, + colorSwatch: Colors.blue, + labels: names, + lineColor: Colors.blueAccent, + maxValue: 10, + )); + } + if (widget.data2 != null && widget.data2!.length == 5) { + list.add(SpiderChartUpdated( + data: widget.data2!, + colorSwatch: Colors.orange, + labels: names, + maxValue: 10, + lineColor: Colors.orangeAccent, + )); + } + if (widget.data3 != null && widget.data3!.length == 5) { + list.add(SpiderChartUpdated( + data: widget.data3!, + colorSwatch: Colors.deepPurple, + labels: names, + maxValue: 10, + lineColor: Colors.deepPurpleAccent, + )); + } + if (widget.data4 != null && widget.data4!.length == 5) { + list.add(SpiderChartUpdated( + data: widget.data4!, + colorSwatch: Colors.green, + labels: names, + lineColor: Colors.greenAccent, + maxValue: 10, + )); + } + + print(list); + } + + getTextName(int index) { + switch (index) { + case 0: + return widget.dataName ?? ''; + + case 1: + return widget.data2Name ?? ''; + + case 2: + return widget.data3Name ?? ''; + + case 3: + return widget.data4Name ?? ''; + + default: + return ''; + } + } @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: Colors.white, appBar: AppBar( - title: const Text('Chart With Custom Colors'), + title: const Text( + 'Spider', + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.blue, ), - body: Center( - child: SizedBox( - width: 200, - height: 200, - child: SpiderChart( - data: const [ - 7, - 5, - 10, - 7, - 4, - ], - colors: const [ - Colors.red, - Colors.green, - Colors.blue, - Colors.yellow, - Colors.indigo, - ], + body: Column( + children: [ + CarouselSlider( + carouselController: _controller, + options: CarouselOptions( + pageSnapping: true, + autoPlay: true, + enlargeCenterPage: true, + aspectRatio: 2.0, + onPageChanged: (index, reason) { + setState(() { + _current = index; + }); + }, + height: widget.height ?? + MediaQuery.of(context).size.longestSide * 0.4, + ), + items: list.map((i) { + return Builder( + builder: (BuildContext context) { + return Container( + width: widget.width, + margin: const EdgeInsets.symmetric(horizontal: 5.0), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20))), + child: Padding( + padding: EdgeInsets.symmetric( + vertical: + MediaQuery.of(context).size.shortestSide * 0.1), + child: i, + )); + }, + ); + }).toList(), ), - ), + Text( + getTextName(_current), + style: TextStyle( + fontSize: MediaQuery.of(context).size.shortestSide * 0.05, + fontWeight: FontWeight.w600), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate( + list.length, + (index) => GestureDetector( + onTap: () { + print(index); + _controller.animateToPage(index); + }, + child: Container( + width: 12.0, + height: 12.0, + margin: const EdgeInsets.symmetric( + vertical: 8.0, horizontal: 4.0), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: (Theme.of(context).brightness == + Brightness.dark + ? Colors.white + : Colors.black) + .withOpacity(_current == index ? 0.9 : 0.4)), + ), + ))), + ], ), ); } diff --git a/example/lib/chart_with_labels.dart b/example/lib/chart_with_labels.dart index 157df4d..12a3294 100644 --- a/example/lib/chart_with_labels.dart +++ b/example/lib/chart_with_labels.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:spider_chart/spider_chart.dart'; +import 'package:spider_chart_updated/spider_chart_updated.dart'; class ChartWithLabels extends StatelessWidget { - const ChartWithLabels({super.key}); + const ChartWithLabels({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -14,7 +14,7 @@ class ChartWithLabels extends StatelessWidget { child: SizedBox( width: 200, height: 200, - child: SpiderChart( + child: SpiderChartUpdated( data: const [ 7, 5, diff --git a/example/lib/chart_with_max_value.dart b/example/lib/chart_with_max_value.dart index 9fc869b..0683b0e 100644 --- a/example/lib/chart_with_max_value.dart +++ b/example/lib/chart_with_max_value.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:spider_chart/spider_chart.dart'; +import 'package:spider_chart_updated/spider_chart_updated.dart'; class ChartWithMax extends StatelessWidget { - const ChartWithMax({super.key}); + const ChartWithMax({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -14,7 +14,7 @@ class ChartWithMax extends StatelessWidget { child: SizedBox( width: 200, height: 200, - child: SpiderChart( + child: SpiderChartUpdated( data: const [ 7, 5, diff --git a/example/lib/default_chart.dart b/example/lib/default_chart.dart index 218445e..94ec388 100644 --- a/example/lib/default_chart.dart +++ b/example/lib/default_chart.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:spider_chart/spider_chart.dart'; +import 'package:spider_chart_updated/spider_chart_updated.dart'; class DefaultChart extends StatelessWidget { - const DefaultChart({super.key}); + const DefaultChart({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -14,7 +14,7 @@ class DefaultChart extends StatelessWidget { child: SizedBox( width: 200, height: 200, - child: SpiderChart( + child: SpiderChartUpdated( data: const [ 7, 5, diff --git a/example/lib/home.dart b/example/lib/home.dart index 7cb6af0..8a93dd4 100644 --- a/example/lib/home.dart +++ b/example/lib/home.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:spider_chart_examples/chart_with_max_value.dart'; -import 'package:spider_chart_examples/default_chart.dart'; -import 'package:spider_chart_examples/chart_with_color_swatch.dart'; -import 'package:spider_chart_examples/chart_with_custom_colors.dart'; +import 'chart_with_color_swatch.dart'; +import 'chart_with_custom_colors.dart'; import 'chart_with_labels.dart'; +import 'chart_with_max_value.dart'; +import 'default_chart.dart'; class Home extends StatelessWidget { - const Home({super.key}); + const Home({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -68,7 +68,7 @@ class Home extends StatelessWidget { onPressed: () { Navigator.of(context) .push(MaterialPageRoute(builder: (context) { - return const ChartWithCustomColors(); + return const SpiderChartWithIndicatorText(); })); }, ), diff --git a/example/lib/main.dart b/example/lib/main.dart index 5462a96..e88e58f 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -5,7 +5,7 @@ import 'home.dart'; void main() => runApp(const App()); class App extends StatelessWidget { - const App({super.key}); + const App({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/example/pubspec.lock b/example/pubspec.lock index b72862c..406122f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,107 +5,122 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "4897882604d919befd350648c7f91926a9d5de99e67b455bf0917cc2362f4bb8" + url: "https://pub.dev" source: hosted version: "47.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "690e335554a8385bc9d787117d9eb52c0c03ee207a607e593de3c9d71b1cfe80" + url: "https://pub.dev" source: hosted version: "4.7.0" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 + url: "https://pub.dev" source: hosted version: "2.3.1" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" + url: "https://pub.dev" + source: hosted + version: "4.2.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.2" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.6.3" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "1.0.6" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.4" flutter: dependency: "direct main" description: flutter @@ -120,7 +135,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_test: @@ -132,9 +148,10 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "3.2.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -144,21 +161,24 @@ packages: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: c51b4fdfee4d281f49b8c957f1add91b815473597f76bcf07377987f66a55729 + url: "https://pub.dev" source: hosted version: "2.1.0" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" integration_test: @@ -170,133 +190,152 @@ packages: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "0d4c73c3653ab85bf696d51a9657604c900a370549196a91f33e4c39af760852" + url: "https://pub.dev" source: hosted version: "1.0.3" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted version: "0.6.5" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted version: "2.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 + url: "https://pub.dev" source: hosted version: "1.1.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: dab22e92b41aa1255ea90ddc4bc2feaf35544fd0728e209638cad041a6e3928a + url: "https://pub.dev" source: hosted version: "1.0.2" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" + url: "https://pub.dev" source: hosted version: "2.0.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: b959af0a045c3484c4a8f4997731f5bfe4cac60d732fd8ce35b351f2d6a459fe + url: "https://pub.dev" source: hosted version: "2.1.2" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + url: "https://pub.dev" source: hosted version: "1.4.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 + url: "https://pub.dev" source: hosted version: "3.0.1" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c + url: "https://pub.dev" source: hosted version: "1.1.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "6db16374bc3497d21aa0eebe674d3db9fdf82082aac0f04dc7b44e4af5b08afc" + url: "https://pub.dev" source: hosted version: "1.0.2" sky_engine: @@ -308,142 +347,168 @@ packages: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" source: hosted version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "490098075234dcedb83c5d949b4c93dad5e6b7702748de000be2b57b8e6b2427" + url: "https://pub.dev" source: hosted version: "0.10.11" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.0" - spider_chart: + version: "1.10.0" + spider_chart_updated: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.2.0" + version: "0.3.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" sync_http: dependency: transitive description: name: sync_http - url: "https://pub.dartlang.org" + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" source: hosted version: "0.3.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + url: "https://pub.dev" source: hosted - version: "1.21.4" + version: "1.24.3" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.0" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted version: "1.3.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + url: "https://pub.dev" source: hosted - version: "9.0.0" + version: "11.7.1" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" source: hosted version: "1.0.2" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd" + url: "https://pub.dev" source: hosted version: "2.2.0" webdriver: dependency: transitive description: name: webdriver - url: "https://pub.dartlang.org" + sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.2" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + url: "https://pub.dev" source: hosted version: "1.2.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted version: "3.1.1" sdks: - dart: ">=2.18.2 <3.0.0" - flutter: ">=1.17.0" + dart: ">=3.1.0-185.0.dev <4.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 37dec76..9a99c52 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,14 +4,15 @@ publish_to: none version: 1.0.0+1 environment: - sdk: '>=2.18.2 <3.0.0' + sdk: ">=2.18.2 <3.0.0" dependencies: flutter: sdk: flutter - cupertino_icons: ^0.1.2 - spider_chart: + cupertino_icons: + spider_chart_updated: path: ../ + carousel_slider: ^4.2.1 dev_dependencies: flutter_test: diff --git a/example/test/smoke_test.dart b/example/test/smoke_test.dart index 8f3c2b3..b674435 100644 --- a/example/test/smoke_test.dart +++ b/example/test/smoke_test.dart @@ -26,7 +26,8 @@ void main() { testWidgets('Smoke test chart with custom colors', (WidgetTester tester) async { - await tester.pumpWidget(const MaterialApp(home: ChartWithCustomColors())); + await tester + .pumpWidget(const MaterialApp(home: SpiderChartWithIndicatorText())); }); testWidgets('Smoke test chart with color swatch', diff --git a/lib/spider_chart.dart b/lib/spider_chart_updated.dart similarity index 92% rename from lib/spider_chart.dart rename to lib/spider_chart_updated.dart index 81b8020..710ae51 100644 --- a/lib/spider_chart.dart +++ b/lib/spider_chart_updated.dart @@ -1,13 +1,13 @@ /// A charting library for displaying spider/radar charts library spider_chart; +import 'dart:math' show pi, cos, sin, max; import 'dart:ui'; import 'package:flutter/material.dart'; -import 'dart:math' show pi, cos, sin, max; /// Displays a spider/radar chart -class SpiderChart extends StatelessWidget { +class SpiderChartUpdated extends StatelessWidget { /// The data points to be displayed final List data; @@ -26,10 +26,11 @@ class SpiderChart extends StatelessWidget { final Size size; final double fallbackHeight; final double fallbackWidth; + final Color? lineColor; /// Creates a widget that displays a spider chart - SpiderChart({ - super.key, + SpiderChartUpdated({ + Key? key, required this.data, this.colors = const [], this.maxValue, @@ -39,12 +40,14 @@ class SpiderChart extends StatelessWidget { this.fallbackHeight = 200, this.fallbackWidth = 200, this.colorSwatch, + this.lineColor, }) : assert(labels.isNotEmpty ? data.length == labels.length : true, 'Length of data and labels lists must be equal'), assert(colors.isNotEmpty ? colors.length == data.length : true, "Custom colors length and data length must be equal"), assert(colorSwatch != null ? data.length < 10 : true, - "For large data sets (>10 data points), please define custom colors using the [colors] parameter"); + "For large data sets (>10 data points), please define custom colors using the [colors] parameter"), + super(key: key); @override Widget build(BuildContext context) { @@ -76,20 +79,21 @@ class SpiderChart extends StatelessWidget { maxHeight: fallbackHeight, child: CustomPaint( size: size, - painter: SpiderChartPainter( - data, calculatedMax, dataPointColors, labels, decimalPrecision), + painter: SpiderChartPainter(data, calculatedMax, dataPointColors, + labels, decimalPrecision, lineColor ?? Colors.grey), ), ); } } -/// Custom painter for the [SpiderChart] widget +/// Custom painter for the [SpiderChartUpdated] widget class SpiderChartPainter extends CustomPainter { final List data; final double maxNumber; final List colors; final List labels; final int decimalPrecision; + final Color? lineColor; final Paint spokes = Paint()..color = Colors.grey; @@ -102,7 +106,7 @@ class SpiderChartPainter extends CustomPainter { ..style = PaintingStyle.stroke; SpiderChartPainter(this.data, this.maxNumber, this.colors, this.labels, - this.decimalPrecision); + this.decimalPrecision, this.lineColor); @override void paint(Canvas canvas, Size size) { @@ -129,6 +133,8 @@ class SpiderChartPainter extends CustomPainter { outerPoints.add(Offset(x, y) + center); } + spokes.color = lineColor ?? Colors.grey; + if (labels.isNotEmpty) { paintLabels(canvas, center, outerPoints, labels); } diff --git a/pubspec.lock b/pubspec.lock index 2791ec2..35d9d43 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,42 +5,48 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.2" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -52,7 +58,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_test: @@ -64,37 +71,42 @@ packages: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted version: "2.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" sky_engine: dependency: transitive description: flutter @@ -104,51 +116,65 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "0.1.4-beta" sdks: - dart: ">=2.18.2 <3.0.0" - flutter: ">=1.17.0" + dart: ">=3.1.0-185.0.dev <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5a61671..cca7ef2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,10 @@ -name: spider_chart -description: Spider Chart is a simple spider/radar charting library for Flutter -version: 0.2.0 -homepage: https://github.com/cnsumner/flutter-spider-chart -repository: https://github.com/cnsumner/flutter-spider-chart +name: spider_chart_updated +description: Spider Chart Updated is a simple spider/radar charting library for Flutter +version: 0.3.0 +homepage: https://github.com/ahzam-shahnil/flutter-spider-chart.git environment: - sdk: '>=2.18.2 <3.0.0' - flutter: ">=1.17.0" + sdk: ">=2.16.1 <4.0.0" dependencies: flutter: diff --git a/screenshots/example_chart.png b/screenshots/example_chart.png index 63f62da..045dde8 100644 Binary files a/screenshots/example_chart.png and b/screenshots/example_chart.png differ