diff --git a/web/charts/lib/a11y/domain_a11y_explore_bar_chart.dart b/web/charts/lib/a11y/domain_a11y_explore_bar_chart.dart index 4eaca18f1..6e8a6053a 100644 --- a/web/charts/lib/a11y/domain_a11y_explore_bar_chart.dart +++ b/web/charts/lib/a11y/domain_a11y_explore_bar_chart.dart @@ -38,10 +38,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class DomainA11yExploreBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DomainA11yExploreBarChart(this.seriesList, {this.animate, Key key}) + const DomainA11yExploreBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/app_config.dart b/web/charts/lib/app_config.dart index 55fdca610..760e8e680 100644 --- a/web/charts/lib/app_config.dart +++ b/web/charts/lib/app_config.dart @@ -22,8 +22,12 @@ class AppConfig { final ThemeData theme; final bool showPerformanceOverlay; - AppConfig( - {this.appName, this.appLink, this.theme, this.showPerformanceOverlay}); + AppConfig({ + required this.appName, + required this.appLink, + required this.theme, + required this.showPerformanceOverlay, + }); } /// The default configuration of the app. diff --git a/web/charts/lib/axes/bar_secondary_axis.dart b/web/charts/lib/axes/bar_secondary_axis.dart index 4e985af17..1197d6de4 100644 --- a/web/charts/lib/axes/bar_secondary_axis.dart +++ b/web/charts/lib/axes/bar_secondary_axis.dart @@ -36,10 +36,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// RTL.flipAxisLocations is set. class BarChartWithSecondaryAxis extends StatelessWidget { static const secondaryMeasureAxisId = 'secondaryMeasureAxisId'; - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const BarChartWithSecondaryAxis(this.seriesList, {this.animate, Key key}) + const BarChartWithSecondaryAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); factory BarChartWithSecondaryAxis.withSampleData() { diff --git a/web/charts/lib/axes/bar_secondary_axis_only.dart b/web/charts/lib/axes/bar_secondary_axis_only.dart index dc949b8db..3acc51239 100644 --- a/web/charts/lib/axes/bar_secondary_axis_only.dart +++ b/web/charts/lib/axes/bar_secondary_axis_only.dart @@ -30,10 +30,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// RTL.flipAxisLocations is set. class BarChartWithSecondaryAxisOnly extends StatelessWidget { static const secondaryMeasureAxisId = 'secondaryMeasureAxisId'; - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const BarChartWithSecondaryAxisOnly(this.seriesList, {this.animate, Key key}) + const BarChartWithSecondaryAxisOnly(this.seriesList, {this.animate, Key? key}) : super(key: key); factory BarChartWithSecondaryAxisOnly.withSampleData() { diff --git a/web/charts/lib/axes/custom_axis_tick_formatters.dart b/web/charts/lib/axes/custom_axis_tick_formatters.dart index 4b3b4ec4e..53f9c1f5e 100644 --- a/web/charts/lib/axes/custom_axis_tick_formatters.dart +++ b/web/charts/lib/axes/custom_axis_tick_formatters.dart @@ -22,10 +22,10 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; class CustomAxisTickFormatters extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const CustomAxisTickFormatters(this.seriesList, {this.animate, Key key}) + const CustomAxisTickFormatters(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/axes/custom_font_size_and_color.dart b/web/charts/lib/axes/custom_font_size_and_color.dart index c56a27f02..2f02cce22 100644 --- a/web/charts/lib/axes/custom_font_size_and_color.dart +++ b/web/charts/lib/axes/custom_font_size_and_color.dart @@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// There are many axis styling options in the SmallTickRenderer allowing you /// to customize the font, tick lengths, and offsets. class CustomFontSizeAndColor extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const CustomFontSizeAndColor(this.seriesList, {this.animate, Key key}) + const CustomFontSizeAndColor(this.seriesList, {this.animate, Key? key}) : super(key: key); factory CustomFontSizeAndColor.withSampleData() { diff --git a/web/charts/lib/axes/custom_measure_tick_count.dart b/web/charts/lib/axes/custom_measure_tick_count.dart index 67b93c2db..4c230113d 100644 --- a/web/charts/lib/axes/custom_measure_tick_count.dart +++ b/web/charts/lib/axes/custom_measure_tick_count.dart @@ -25,10 +25,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class CustomMeasureTickCount extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const CustomMeasureTickCount(this.seriesList, {this.animate, Key key}) + const CustomMeasureTickCount(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/axes/flipped_vertical_axis.dart b/web/charts/lib/axes/flipped_vertical_axis.dart index eaafaa2ed..475e32569 100644 --- a/web/charts/lib/axes/flipped_vertical_axis.dart +++ b/web/charts/lib/axes/flipped_vertical_axis.dart @@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Note: primary and secondary may flip left and right positioning when /// RTL.flipAxisLocations is set. class FlippedVerticalAxis extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const FlippedVerticalAxis(this.seriesList, {this.animate, Key key}) + const FlippedVerticalAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); factory FlippedVerticalAxis.withSampleData() { diff --git a/web/charts/lib/axes/gridline_dash_pattern.dart b/web/charts/lib/axes/gridline_dash_pattern.dart index 799240d78..fe6c20c3f 100644 --- a/web/charts/lib/axes/gridline_dash_pattern.dart +++ b/web/charts/lib/axes/gridline_dash_pattern.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class GridlineDashPattern extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GridlineDashPattern(this.seriesList, {this.animate, Key key}) + const GridlineDashPattern(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/axes/hidden_ticks_and_labels_axis.dart b/web/charts/lib/axes/hidden_ticks_and_labels_axis.dart index 895f4b3b2..aaee6565d 100644 --- a/web/charts/lib/axes/hidden_ticks_and_labels_axis.dart +++ b/web/charts/lib/axes/hidden_ticks_and_labels_axis.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Example of hiding both axis. class HiddenTicksAndLabelsAxis extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const HiddenTicksAndLabelsAxis(this.seriesList, {this.animate, Key key}) + const HiddenTicksAndLabelsAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); factory HiddenTicksAndLabelsAxis.withSampleData() { diff --git a/web/charts/lib/axes/horizontal_bar_secondary_axis.dart b/web/charts/lib/axes/horizontal_bar_secondary_axis.dart index 64a232e40..13fe15b73 100644 --- a/web/charts/lib/axes/horizontal_bar_secondary_axis.dart +++ b/web/charts/lib/axes/horizontal_bar_secondary_axis.dart @@ -36,11 +36,11 @@ import 'package:charts_flutter/flutter.dart' as charts; /// RTL.flipAxisLocations is set. class HorizontalBarChartWithSecondaryAxis extends StatelessWidget { static const secondaryMeasureAxisId = 'secondaryMeasureAxisId'; - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const HorizontalBarChartWithSecondaryAxis(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); factory HorizontalBarChartWithSecondaryAxis.withSampleData() { diff --git a/web/charts/lib/axes/integer_only_measure_axis.dart b/web/charts/lib/axes/integer_only_measure_axis.dart index 0af1e73cf..54a51c537 100644 --- a/web/charts/lib/axes/integer_only_measure_axis.dart +++ b/web/charts/lib/axes/integer_only_measure_axis.dart @@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class IntegerOnlyMeasureAxis extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const IntegerOnlyMeasureAxis(this.seriesList, {this.animate, Key key}) + const IntegerOnlyMeasureAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/axes/line_disjoint_axis.dart b/web/charts/lib/axes/line_disjoint_axis.dart index beab2ce95..d20329728 100644 --- a/web/charts/lib/axes/line_disjoint_axis.dart +++ b/web/charts/lib/axes/line_disjoint_axis.dart @@ -28,10 +28,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class DisjointMeasureAxisLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DisjointMeasureAxisLineChart(this.seriesList, {this.animate, Key key}) + const DisjointMeasureAxisLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. @@ -263,8 +263,8 @@ class DisjointMeasureAxisLineChart extends StatelessWidget { /// Sample linear data type. class LinearClicks { final int year; - final int clickCount; - final double clickRate; + final int? clickCount; + final double? clickRate; LinearClicks(this.year, {this.clickCount, this.clickRate}); } diff --git a/web/charts/lib/axes/measure_axis_label_alignment.dart b/web/charts/lib/axes/measure_axis_label_alignment.dart index e3e5895f1..9cf596642 100644 --- a/web/charts/lib/axes/measure_axis_label_alignment.dart +++ b/web/charts/lib/axes/measure_axis_label_alignment.dart @@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Example of using a custom primary measure replacing the renderSpec with one /// that aligns the text under the tick and left justifies. class MeasureAxisLabelAlignment extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const MeasureAxisLabelAlignment(this.seriesList, {this.animate, Key key}) + const MeasureAxisLabelAlignment(this.seriesList, {this.animate, Key? key}) : super(key: key); factory MeasureAxisLabelAlignment.withSampleData() { diff --git a/web/charts/lib/axes/nonzero_bound_measure_axis.dart b/web/charts/lib/axes/nonzero_bound_measure_axis.dart index 09e7f6a81..2ed666a4b 100644 --- a/web/charts/lib/axes/nonzero_bound_measure_axis.dart +++ b/web/charts/lib/axes/nonzero_bound_measure_axis.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class NonzeroBoundMeasureAxis extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const NonzeroBoundMeasureAxis(this.seriesList, {this.animate, Key key}) + const NonzeroBoundMeasureAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/axes/numeric_initial_viewport.dart b/web/charts/lib/axes/numeric_initial_viewport.dart index 75afcc3f3..ca3e1d363 100644 --- a/web/charts/lib/axes/numeric_initial_viewport.dart +++ b/web/charts/lib/axes/numeric_initial_viewport.dart @@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class NumericInitialViewport extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const NumericInitialViewport(this.seriesList, {this.animate, Key key}) + const NumericInitialViewport(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/axes/ordinal_initial_viewport.dart b/web/charts/lib/axes/ordinal_initial_viewport.dart index 5547548d8..cd48b2024 100644 --- a/web/charts/lib/axes/ordinal_initial_viewport.dart +++ b/web/charts/lib/axes/ordinal_initial_viewport.dart @@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class OrdinalInitialViewport extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const OrdinalInitialViewport(this.seriesList, {this.animate, Key key}) + const OrdinalInitialViewport(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/axes/short_tick_length_axis.dart b/web/charts/lib/axes/short_tick_length_axis.dart index f7ead863f..cc510b04b 100644 --- a/web/charts/lib/axes/short_tick_length_axis.dart +++ b/web/charts/lib/axes/short_tick_length_axis.dart @@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// There are many axis styling options in the SmallTickRenderer allowing you /// to customize the font, tick lengths, and offsets. class ShortTickLengthAxis extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const ShortTickLengthAxis(this.seriesList, {this.animate, Key key}) + const ShortTickLengthAxis(this.seriesList, {this.animate, Key? key}) : super(key: key); factory ShortTickLengthAxis.withSampleData() { diff --git a/web/charts/lib/axes/statically_provided_ticks.dart b/web/charts/lib/axes/statically_provided_ticks.dart index 6846f8152..5c9dfcea8 100644 --- a/web/charts/lib/axes/statically_provided_ticks.dart +++ b/web/charts/lib/axes/statically_provided_ticks.dart @@ -34,10 +34,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// For datetime axis, the [StaticDateTimeTickProviderSpec] can be used by /// passing in a list of ticks defined with [TickSpec] of datetime. class StaticallyProvidedTicks extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StaticallyProvidedTicks(this.seriesList, {this.animate, Key key}) + const StaticallyProvidedTicks(this.seriesList, {this.animate, Key? key}) : super(key: key); factory StaticallyProvidedTicks.withSampleData() { diff --git a/web/charts/lib/bar_chart/custom_rounded_bars.dart b/web/charts/lib/bar_chart/custom_rounded_bars.dart index a3fbd2d4d..7f0a755fc 100644 --- a/web/charts/lib/bar_chart/custom_rounded_bars.dart +++ b/web/charts/lib/bar_chart/custom_rounded_bars.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class CustomRoundedBars extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const CustomRoundedBars(this.seriesList, {this.animate, Key key}) + const CustomRoundedBars(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with custom rounded bars. diff --git a/web/charts/lib/bar_chart/grouped.dart b/web/charts/lib/bar_chart/grouped.dart index dcfbd7b08..db7357983 100644 --- a/web/charts/lib/bar_chart/grouped.dart +++ b/web/charts/lib/bar_chart/grouped.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class GroupedBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GroupedBarChart(this.seriesList, {this.animate, Key key}) + const GroupedBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory GroupedBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/grouped_fill_color.dart b/web/charts/lib/bar_chart/grouped_fill_color.dart index a3f22d7f1..887deaddd 100644 --- a/web/charts/lib/bar_chart/grouped_fill_color.dart +++ b/web/charts/lib/bar_chart/grouped_fill_color.dart @@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Example of a grouped bar chart with three series, each rendered with /// different fill colors. class GroupedFillColorBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GroupedFillColorBarChart(this.seriesList, {this.animate, Key key}) + const GroupedFillColorBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory GroupedFillColorBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/grouped_single_target_line.dart b/web/charts/lib/bar_chart/grouped_single_target_line.dart index efb464e05..fc767e1e8 100644 --- a/web/charts/lib/bar_chart/grouped_single_target_line.dart +++ b/web/charts/lib/bar_chart/grouped_single_target_line.dart @@ -21,11 +21,11 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class GroupedBarSingleTargetLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const GroupedBarSingleTargetLineChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); factory GroupedBarSingleTargetLineChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/grouped_stacked.dart b/web/charts/lib/bar_chart/grouped_stacked.dart index 968959347..98cfa51f6 100644 --- a/web/charts/lib/bar_chart/grouped_stacked.dart +++ b/web/charts/lib/bar_chart/grouped_stacked.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class GroupedStackedBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GroupedStackedBarChart(this.seriesList, {this.animate, Key key}) + const GroupedStackedBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory GroupedStackedBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/grouped_stacked_weight_pattern.dart b/web/charts/lib/bar_chart/grouped_stacked_weight_pattern.dart index 367024507..263a324a1 100644 --- a/web/charts/lib/bar_chart/grouped_stacked_weight_pattern.dart +++ b/web/charts/lib/bar_chart/grouped_stacked_weight_pattern.dart @@ -25,11 +25,11 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class GroupedStackedWeightPatternBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const GroupedStackedWeightPatternBarChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); factory GroupedStackedWeightPatternBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/grouped_target_line.dart b/web/charts/lib/bar_chart/grouped_target_line.dart index 776e336b7..a3ba85104 100644 --- a/web/charts/lib/bar_chart/grouped_target_line.dart +++ b/web/charts/lib/bar_chart/grouped_target_line.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class GroupedBarTargetLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GroupedBarTargetLineChart(this.seriesList, {this.animate, Key key}) + const GroupedBarTargetLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory GroupedBarTargetLineChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/horizontal.dart b/web/charts/lib/bar_chart/horizontal.dart index 3241919e3..18bc6cc0b 100644 --- a/web/charts/lib/bar_chart/horizontal.dart +++ b/web/charts/lib/bar_chart/horizontal.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class HorizontalBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const HorizontalBarChart(this.seriesList, {this.animate, Key key}) + const HorizontalBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/horizontal_bar_label.dart b/web/charts/lib/bar_chart/horizontal_bar_label.dart index f0dc4ed63..af5e38516 100644 --- a/web/charts/lib/bar_chart/horizontal_bar_label.dart +++ b/web/charts/lib/bar_chart/horizontal_bar_label.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class HorizontalBarLabelChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const HorizontalBarLabelChart(this.seriesList, {this.animate, Key key}) + const HorizontalBarLabelChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/horizontal_bar_label_custom.dart b/web/charts/lib/bar_chart/horizontal_bar_label_custom.dart index a43a088d5..f84332670 100644 --- a/web/charts/lib/bar_chart/horizontal_bar_label_custom.dart +++ b/web/charts/lib/bar_chart/horizontal_bar_label_custom.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class HorizontalBarLabelCustomChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const HorizontalBarLabelCustomChart(this.seriesList, {this.animate, Key key}) + const HorizontalBarLabelCustomChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/horizontal_pattern_forward_hatch.dart b/web/charts/lib/bar_chart/horizontal_pattern_forward_hatch.dart index ef45de2b4..fdb05814e 100644 --- a/web/charts/lib/bar_chart/horizontal_pattern_forward_hatch.dart +++ b/web/charts/lib/bar_chart/horizontal_pattern_forward_hatch.dart @@ -25,11 +25,11 @@ import 'package:charts_flutter/flutter.dart' as charts; /// The second series of bars is rendered with a pattern by defining a /// fillPatternFn mapping function. class HorizontalPatternForwardHatchBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const HorizontalPatternForwardHatchBarChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); factory HorizontalPatternForwardHatchBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/pattern_forward_hatch.dart b/web/charts/lib/bar_chart/pattern_forward_hatch.dart index 8a251d7cf..1ac515099 100644 --- a/web/charts/lib/bar_chart/pattern_forward_hatch.dart +++ b/web/charts/lib/bar_chart/pattern_forward_hatch.dart @@ -24,10 +24,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class PatternForwardHatchBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PatternForwardHatchBarChart(this.seriesList, {this.animate, Key key}) + const PatternForwardHatchBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory PatternForwardHatchBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/simple.dart b/web/charts/lib/bar_chart/simple.dart index 8fc3f64ab..4f90aaa1c 100644 --- a/web/charts/lib/bar_chart/simple.dart +++ b/web/charts/lib/bar_chart/simple.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimpleBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleBarChart(this.seriesList, {this.animate, Key key}) + const SimpleBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/spark_bar.dart b/web/charts/lib/bar_chart/spark_bar.dart index e388bfda0..abac92cf5 100644 --- a/web/charts/lib/bar_chart/spark_bar.dart +++ b/web/charts/lib/bar_chart/spark_bar.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Example of a Spark Bar by hiding both axis, reducing the chart margins. class SparkBar extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SparkBar(this.seriesList, {this.animate, Key key}) : super(key: key); + const SparkBar(this.seriesList, {this.animate, Key? key}) : super(key: key); factory SparkBar.withSampleData() { return SparkBar( diff --git a/web/charts/lib/bar_chart/stacked.dart b/web/charts/lib/bar_chart/stacked.dart index f6a0aeba6..44ffb0394 100644 --- a/web/charts/lib/bar_chart/stacked.dart +++ b/web/charts/lib/bar_chart/stacked.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class StackedBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedBarChart(this.seriesList, {this.animate, Key key}) + const StackedBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a stacked [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/stacked_fill_color.dart b/web/charts/lib/bar_chart/stacked_fill_color.dart index e50d35b27..772221dfa 100644 --- a/web/charts/lib/bar_chart/stacked_fill_color.dart +++ b/web/charts/lib/bar_chart/stacked_fill_color.dart @@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Example of a stacked bar chart with three series, each rendered with /// different fill colors. class StackedFillColorBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedFillColorBarChart(this.seriesList, {this.animate, Key key}) + const StackedFillColorBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory StackedFillColorBarChart.withSampleData() { diff --git a/web/charts/lib/bar_chart/stacked_horizontal.dart b/web/charts/lib/bar_chart/stacked_horizontal.dart index d43c9fd95..30c557e9c 100644 --- a/web/charts/lib/bar_chart/stacked_horizontal.dart +++ b/web/charts/lib/bar_chart/stacked_horizontal.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class StackedHorizontalBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedHorizontalBarChart(this.seriesList, {this.animate, Key key}) + const StackedHorizontalBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a stacked [BarChart] with sample data and no transition. diff --git a/web/charts/lib/bar_chart/stacked_target_line.dart b/web/charts/lib/bar_chart/stacked_target_line.dart index fac56a405..832059cad 100644 --- a/web/charts/lib/bar_chart/stacked_target_line.dart +++ b/web/charts/lib/bar_chart/stacked_target_line.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class StackedBarTargetLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedBarTargetLineChart(this.seriesList, {this.animate, Key key}) + const StackedBarTargetLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a stacked [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/chart_title.dart b/web/charts/lib/behaviors/chart_title.dart index 23fb96c67..f1daa3faf 100644 --- a/web/charts/lib/behaviors/chart_title.dart +++ b/web/charts/lib/behaviors/chart_title.dart @@ -23,10 +23,10 @@ import 'package:flutter/material.dart'; /// A series of [ChartTitle] behaviors are used to render titles, one per /// margin. class ChartTitleLine extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const ChartTitleLine(this.seriesList, {this.animate, Key key}) + const ChartTitleLine(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/initial_hint_animation.dart b/web/charts/lib/behaviors/initial_hint_animation.dart index af550db0e..65827ae55 100644 --- a/web/charts/lib/behaviors/initial_hint_animation.dart +++ b/web/charts/lib/behaviors/initial_hint_animation.dart @@ -48,10 +48,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class InitialHintAnimation extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const InitialHintAnimation(this.seriesList, {this.animate, Key key}) + const InitialHintAnimation(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/initial_selection.dart b/web/charts/lib/behaviors/initial_selection.dart index b49e345ff..4f3fed928 100644 --- a/web/charts/lib/behaviors/initial_selection.dart +++ b/web/charts/lib/behaviors/initial_selection.dart @@ -31,10 +31,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class InitialSelection extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const InitialSelection(this.seriesList, {this.animate, Key key}) + const InitialSelection(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with initial selection behavior. diff --git a/web/charts/lib/behaviors/percent_of_domain.dart b/web/charts/lib/behaviors/percent_of_domain.dart index 243a99e7c..bdefa6292 100644 --- a/web/charts/lib/behaviors/percent_of_domain.dart +++ b/web/charts/lib/behaviors/percent_of_domain.dart @@ -24,10 +24,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class PercentOfDomainBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PercentOfDomainBarChart(this.seriesList, {this.animate, Key key}) + const PercentOfDomainBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a stacked [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/percent_of_domain_by_category.dart b/web/charts/lib/behaviors/percent_of_domain_by_category.dart index f89de500a..86a519d3e 100644 --- a/web/charts/lib/behaviors/percent_of_domain_by_category.dart +++ b/web/charts/lib/behaviors/percent_of_domain_by_category.dart @@ -25,11 +25,11 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class PercentOfDomainByCategoryBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const PercentOfDomainByCategoryBarChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); factory PercentOfDomainByCategoryBarChart.withSampleData() { diff --git a/web/charts/lib/behaviors/percent_of_series.dart b/web/charts/lib/behaviors/percent_of_series.dart index 8fe8410da..70dd79cb0 100644 --- a/web/charts/lib/behaviors/percent_of_series.dart +++ b/web/charts/lib/behaviors/percent_of_series.dart @@ -22,10 +22,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class PercentOfSeriesBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PercentOfSeriesBarChart(this.seriesList, {this.animate, Key key}) + const PercentOfSeriesBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a stacked [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/selection_bar_highlight.dart b/web/charts/lib/behaviors/selection_bar_highlight.dart index 091cd1e80..ed6abc14b 100644 --- a/web/charts/lib/behaviors/selection_bar_highlight.dart +++ b/web/charts/lib/behaviors/selection_bar_highlight.dart @@ -19,10 +19,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionBarHighlight extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SelectionBarHighlight(this.seriesList, {this.animate, Key key}) + const SelectionBarHighlight(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/selection_callback_example.dart b/web/charts/lib/behaviors/selection_callback_example.dart index 48f612b42..886a49de8 100644 --- a/web/charts/lib/behaviors/selection_callback_example.dart +++ b/web/charts/lib/behaviors/selection_callback_example.dart @@ -33,10 +33,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionCallbackExample extends StatefulWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SelectionCallbackExample(this.seriesList, {this.animate, Key key}) + const SelectionCallbackExample(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [charts.TimeSeriesChart] with sample data and no transition. @@ -130,8 +130,8 @@ class SelectionCallbackExample extends StatefulWidget { } class _SelectionCallbackState extends State { - DateTime _time; - Map _measures; + DateTime? _time; + Map? _measures; // Listens to the underlying selection changes, and updates the information // relevant to building the primitive legend like information under the @@ -139,8 +139,8 @@ class _SelectionCallbackState extends State { _onSelectionChanged(charts.SelectionModel model) { final selectedDatum = model.selectedDatum; - DateTime time; - final measures = {}; + DateTime? time; + final measures = {}; // We get the model that updated with a list of [SeriesDatum] which is // simply a pair of series & datum. @@ -185,7 +185,7 @@ class _SelectionCallbackState extends State { padding: const EdgeInsets.only(top: 5.0), child: Text(_time.toString()))); } - _measures?.forEach((String series, num value) { + _measures?.forEach((String? series, num? value) { children.add(Text('$series: $value')); }); diff --git a/web/charts/lib/behaviors/selection_line_highlight.dart b/web/charts/lib/behaviors/selection_line_highlight.dart index cc34e37cc..b80e71b4f 100644 --- a/web/charts/lib/behaviors/selection_line_highlight.dart +++ b/web/charts/lib/behaviors/selection_line_highlight.dart @@ -19,10 +19,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionLineHighlight extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SelectionLineHighlight(this.seriesList, {this.animate, Key key}) + const SelectionLineHighlight(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/selection_line_highlight_custom_shape.dart b/web/charts/lib/behaviors/selection_line_highlight_custom_shape.dart index c974a8d52..e85e65f7f 100644 --- a/web/charts/lib/behaviors/selection_line_highlight_custom_shape.dart +++ b/web/charts/lib/behaviors/selection_line_highlight_custom_shape.dart @@ -19,11 +19,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionLineHighlightCustomShape extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const SelectionLineHighlightCustomShape(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/selection_scatter_plot_highlight.dart b/web/charts/lib/behaviors/selection_scatter_plot_highlight.dart index 200ef70f0..5afe543a9 100644 --- a/web/charts/lib/behaviors/selection_scatter_plot_highlight.dart +++ b/web/charts/lib/behaviors/selection_scatter_plot_highlight.dart @@ -38,10 +38,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionScatterPlotHighlight extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SelectionScatterPlotHighlight(this.seriesList, {this.animate, Key key}) + const SelectionScatterPlotHighlight(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. @@ -225,9 +225,9 @@ class LinearSales { final int year; final int sales; final double radius; - final String shape; - final charts.Color fillColor; - final double strokeWidth; + final String? shape; + final charts.Color? fillColor; + final double? strokeWidth; LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor, this.strokeWidth); diff --git a/web/charts/lib/behaviors/selection_user_managed.dart b/web/charts/lib/behaviors/selection_user_managed.dart index 80bab816e..c5760b45f 100644 --- a/web/charts/lib/behaviors/selection_user_managed.dart +++ b/web/charts/lib/behaviors/selection_user_managed.dart @@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SelectionUserManaged extends StatefulWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SelectionUserManaged(this.seriesList, {this.animate, Key key}) + const SelectionUserManaged(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/behaviors/slider.dart b/web/charts/lib/behaviors/slider.dart index 6dce65d8c..20ec73b23 100644 --- a/web/charts/lib/behaviors/slider.dart +++ b/web/charts/lib/behaviors/slider.dart @@ -33,10 +33,10 @@ import 'package:flutter/scheduler.dart'; /// [Slider.moveSliderToDomain] can be called to programmatically position the /// slider. This is useful for synchronizing the slider with external elements. class SliderLine extends StatefulWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SliderLine(this.seriesList, {this.animate, Key key}) : super(key: key); + const SliderLine(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. factory SliderLine.withSampleData() { @@ -103,9 +103,9 @@ class SliderLine extends StatefulWidget { } class _SliderCallbackState extends State { - num _sliderDomainValue; - String _sliderDragState; - Point _sliderPosition; + num? _sliderDomainValue; + String? _sliderDragState; + Point? _sliderPosition; // Handles callbacks when the user drags the slider. _onSliderChange(Point point, dynamic domain, String roleId, @@ -119,7 +119,7 @@ class _SliderCallbackState extends State { }); } - SchedulerBinding.instance.addPostFrameCallback(rebuild); + SchedulerBinding.instance!.addPostFrameCallback(rebuild); } @override @@ -175,7 +175,7 @@ class _SliderCallbackState extends State { children.add(Padding( padding: const EdgeInsets.only(top: 5.0), child: Text( - 'Slider position: ${_sliderPosition.x}, ${_sliderPosition.y}'))); + 'Slider position: ${_sliderPosition!.x}, ${_sliderPosition!.y}'))); } if (_sliderDragState != null) { children.add(Padding( diff --git a/web/charts/lib/behaviors/sliding_viewport_on_selection.dart b/web/charts/lib/behaviors/sliding_viewport_on_selection.dart index 700210a8c..585400b50 100644 --- a/web/charts/lib/behaviors/sliding_viewport_on_selection.dart +++ b/web/charts/lib/behaviors/sliding_viewport_on_selection.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SlidingViewportOnSelection extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SlidingViewportOnSelection(this.seriesList, {this.animate, Key key}) + const SlidingViewportOnSelection(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/combo_chart/date_time_line_point.dart b/web/charts/lib/combo_chart/date_time_line_point.dart index 646adecf5..87f76e1e2 100644 --- a/web/charts/lib/combo_chart/date_time_line_point.dart +++ b/web/charts/lib/combo_chart/date_time_line_point.dart @@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class DateTimeComboLinePointChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DateTimeComboLinePointChart(this.seriesList, {this.animate, Key key}) + const DateTimeComboLinePointChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/combo_chart/numeric_line_bar.dart b/web/charts/lib/combo_chart/numeric_line_bar.dart index c3053a6de..4739bafed 100644 --- a/web/charts/lib/combo_chart/numeric_line_bar.dart +++ b/web/charts/lib/combo_chart/numeric_line_bar.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class NumericComboLineBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const NumericComboLineBarChart(this.seriesList, {this.animate, Key key}) + const NumericComboLineBarChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/combo_chart/numeric_line_point.dart b/web/charts/lib/combo_chart/numeric_line_point.dart index 059586810..184631b4b 100644 --- a/web/charts/lib/combo_chart/numeric_line_point.dart +++ b/web/charts/lib/combo_chart/numeric_line_point.dart @@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class NumericComboLinePointChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const NumericComboLinePointChart(this.seriesList, {this.animate, Key key}) + const NumericComboLinePointChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/combo_chart/ordinal_bar_line.dart b/web/charts/lib/combo_chart/ordinal_bar_line.dart index 4d65dc8d7..9263dd9b1 100644 --- a/web/charts/lib/combo_chart/ordinal_bar_line.dart +++ b/web/charts/lib/combo_chart/ordinal_bar_line.dart @@ -22,10 +22,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class OrdinalComboBarLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const OrdinalComboBarLineChart(this.seriesList, {this.animate, Key key}) + const OrdinalComboBarLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); factory OrdinalComboBarLineChart.withSampleData() { diff --git a/web/charts/lib/combo_chart/scatter_plot_line.dart b/web/charts/lib/combo_chart/scatter_plot_line.dart index 0912df585..48b63e9e1 100644 --- a/web/charts/lib/combo_chart/scatter_plot_line.dart +++ b/web/charts/lib/combo_chart/scatter_plot_line.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class ScatterPlotComboLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const ScatterPlotComboLineChart(this.seriesList, {this.animate, Key key}) + const ScatterPlotComboLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. diff --git a/web/charts/lib/drawer.dart b/web/charts/lib/drawer.dart index d0647afa5..464021019 100644 --- a/web/charts/lib/drawer.dart +++ b/web/charts/lib/drawer.dart @@ -21,9 +21,9 @@ class GalleryDrawer extends StatelessWidget { final ValueChanged onShowPerformanceOverlayChanged; const GalleryDrawer( - {Key key, - this.showPerformanceOverlay, - this.onShowPerformanceOverlayChanged}) + {Key? key, + required this.showPerformanceOverlay, + required this.onShowPerformanceOverlayChanged}) : super(key: key); @override @@ -40,7 +40,7 @@ class GalleryDrawer extends StatelessWidget { selected: showPerformanceOverlay, trailing: Checkbox( value: showPerformanceOverlay, - onChanged: (bool value) { + onChanged: (bool? value) { onShowPerformanceOverlayChanged(!showPerformanceOverlay); }, ), diff --git a/web/charts/lib/gallery_scaffold.dart b/web/charts/lib/gallery_scaffold.dart index 332ad47ef..b2037e3cf 100644 --- a/web/charts/lib/gallery_scaffold.dart +++ b/web/charts/lib/gallery_scaffold.dart @@ -20,17 +20,17 @@ typedef GalleryWidgetBuilder = Widget Function(); /// Helper to build gallery. class GalleryScaffold extends StatefulWidget { /// The widget used for leading in a [ListTile]. - final Widget listTileIcon; + final Widget? listTileIcon; final String title; final String subtitle; final GalleryWidgetBuilder childBuilder; const GalleryScaffold( {this.listTileIcon, - this.title, - this.subtitle, - this.childBuilder, - Key key}) + required this.title, + required this.subtitle, + required this.childBuilder, + Key? key}) : super(key: key); /// Gets the gallery diff --git a/web/charts/lib/home.dart b/web/charts/lib/home.dart index b40833965..377c286cb 100644 --- a/web/charts/lib/home.dart +++ b/web/charts/lib/home.dart @@ -51,12 +51,10 @@ class Home extends StatelessWidget { final legendsGalleries = legends.buildGallery(); Home( - {Key key, - this.showPerformanceOverlay, - @required this.onShowPerformanceOverlayChanged}) - : super(key: key) { - assert(onShowPerformanceOverlayChanged != null); - } + {Key? key, + required this.showPerformanceOverlay, + required this.onShowPerformanceOverlayChanged}) + : super(key: key); @override Widget build(BuildContext context) { diff --git a/web/charts/lib/i18n/rtl_bar_chart.dart b/web/charts/lib/i18n/rtl_bar_chart.dart index b88ed26e2..7f7a1f807 100644 --- a/web/charts/lib/i18n/rtl_bar_chart.dart +++ b/web/charts/lib/i18n/rtl_bar_chart.dart @@ -21,10 +21,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class RTLBarChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const RTLBarChart(this.seriesList, {this.animate, Key key}) : super(key: key); + const RTLBarChart(this.seriesList, {this.animate, Key? key}) + : super(key: key); /// Creates a [BarChart] with sample data and no transition. factory RTLBarChart.withSampleData() { diff --git a/web/charts/lib/i18n/rtl_line_chart.dart b/web/charts/lib/i18n/rtl_line_chart.dart index d43d51c44..9385f5dd3 100644 --- a/web/charts/lib/i18n/rtl_line_chart.dart +++ b/web/charts/lib/i18n/rtl_line_chart.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class RTLLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const RTLLineChart(this.seriesList, {this.animate, Key key}) + const RTLLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/i18n/rtl_line_segments.dart b/web/charts/lib/i18n/rtl_line_segments.dart index c981438b3..ac5a00af1 100644 --- a/web/charts/lib/i18n/rtl_line_segments.dart +++ b/web/charts/lib/i18n/rtl_line_segments.dart @@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class RTLLineSegments extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const RTLLineSegments(this.seriesList, {this.animate, Key key}) + const RTLLineSegments(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. @@ -242,7 +242,7 @@ class RTLLineSegments extends StatelessWidget { class LinearSales { final int year; final int sales; - final List dashPattern; + final List? dashPattern; final double strokeWidthPx; LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx); diff --git a/web/charts/lib/i18n/rtl_series_legend.dart b/web/charts/lib/i18n/rtl_series_legend.dart index e46b167ec..419d7a110 100644 --- a/web/charts/lib/i18n/rtl_series_legend.dart +++ b/web/charts/lib/i18n/rtl_series_legend.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class RTLSeriesLegend extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const RTLSeriesLegend(this.seriesList, {this.animate, Key key}) + const RTLSeriesLegend(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [BarChart] with sample data and no transition. diff --git a/web/charts/lib/legends/datum_legend_options.dart b/web/charts/lib/legends/datum_legend_options.dart index f052b7e53..e2184beed 100644 --- a/web/charts/lib/legends/datum_legend_options.dart +++ b/web/charts/lib/legends/datum_legend_options.dart @@ -25,10 +25,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class DatumLegendOptions extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DatumLegendOptions(this.seriesList, {this.animate, Key key}) + const DatumLegendOptions(this.seriesList, {this.animate, Key? key}) : super(key: key); factory DatumLegendOptions.withSampleData() { diff --git a/web/charts/lib/legends/datum_legend_with_measures.dart b/web/charts/lib/legends/datum_legend_with_measures.dart index 625b25a42..c36716291 100644 --- a/web/charts/lib/legends/datum_legend_with_measures.dart +++ b/web/charts/lib/legends/datum_legend_with_measures.dart @@ -29,9 +29,9 @@ import 'package:charts_flutter/flutter.dart' as charts; /// Also shows the option to provide a custom measure formatter. class DatumLegendWithMeasures extends StatelessWidget { final List> seriesList; - final bool animate; + final bool? animate; - const DatumLegendWithMeasures(this.seriesList, {this.animate, Key key}) + const DatumLegendWithMeasures(this.seriesList, {this.animate, Key? key}) : super(key: key); factory DatumLegendWithMeasures.withSampleData() { @@ -110,7 +110,7 @@ class DatumLegendWithMeasures extends StatelessWidget { legendDefaultMeasure: charts.LegendDefaultMeasure.firstValue, // Optionally provide a measure formatter to format the measure value. // If none is specified the value is formatted as a decimal. - measureFormatter: (num value) { + measureFormatter: (num? value) { return value == null ? '-' : '${value}k'; }, ), diff --git a/web/charts/lib/legends/default_hidden_series_legend.dart b/web/charts/lib/legends/default_hidden_series_legend.dart index 60026a2d0..8ddb3991c 100644 --- a/web/charts/lib/legends/default_hidden_series_legend.dart +++ b/web/charts/lib/legends/default_hidden_series_legend.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class DefaultHiddenSeriesLegend extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DefaultHiddenSeriesLegend(this.seriesList, {this.animate, Key key}) + const DefaultHiddenSeriesLegend(this.seriesList, {this.animate, Key? key}) : super(key: key); factory DefaultHiddenSeriesLegend.withSampleData() { diff --git a/web/charts/lib/legends/legend_custom_symbol.dart b/web/charts/lib/legends/legend_custom_symbol.dart index 8c8dc7eb0..67a52cf50 100644 --- a/web/charts/lib/legends/legend_custom_symbol.dart +++ b/web/charts/lib/legends/legend_custom_symbol.dart @@ -30,11 +30,11 @@ class IconRenderer extends charts.CustomSymbolRenderer { @override Widget build(BuildContext context, - {Size size, Color color, bool enabled = true}) { + {Size? size, Color? color, bool enabled = true}) { // Lighten the color if the symbol is not enabled // Example: If user has tapped on a Series deselecting it. if (!enabled) { - color = color.withOpacity(0.26); + color = color!.withOpacity(0.26); } return SizedBox.fromSize( @@ -43,10 +43,10 @@ class IconRenderer extends charts.CustomSymbolRenderer { } class LegendWithCustomSymbol extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LegendWithCustomSymbol(this.seriesList, {this.animate, Key key}) + const LegendWithCustomSymbol(this.seriesList, {this.animate, Key? key}) : super(key: key); factory LegendWithCustomSymbol.withSampleData() { diff --git a/web/charts/lib/legends/series_legend_options.dart b/web/charts/lib/legends/series_legend_options.dart index 6c9db191c..b44fcf80d 100644 --- a/web/charts/lib/legends/series_legend_options.dart +++ b/web/charts/lib/legends/series_legend_options.dart @@ -25,10 +25,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class LegendOptions extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LegendOptions(this.seriesList, {this.animate, Key key}) + const LegendOptions(this.seriesList, {this.animate, Key? key}) : super(key: key); factory LegendOptions.withSampleData() { diff --git a/web/charts/lib/legends/series_legend_with_measures.dart b/web/charts/lib/legends/series_legend_with_measures.dart index 464e46eef..c132bdac6 100644 --- a/web/charts/lib/legends/series_legend_with_measures.dart +++ b/web/charts/lib/legends/series_legend_with_measures.dart @@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts; /// /// Also shows the option to provide a custom measure formatter. class LegendWithMeasures extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LegendWithMeasures(this.seriesList, {this.animate, Key key}) + const LegendWithMeasures(this.seriesList, {this.animate, Key? key}) : super(key: key); factory LegendWithMeasures.withSampleData() { @@ -153,7 +153,7 @@ class LegendWithMeasures extends StatelessWidget { showMeasures: true, // Optionally provide a measure formatter to format the measure value. // If none is specified the value is formatted as a decimal. - measureFormatter: (num value) { + measureFormatter: (num? value) { return value == null ? '-' : '${value}k'; }, ), diff --git a/web/charts/lib/legends/simple_datum_legend.dart b/web/charts/lib/legends/simple_datum_legend.dart index ce41b4d8e..c5b2edec2 100644 --- a/web/charts/lib/legends/simple_datum_legend.dart +++ b/web/charts/lib/legends/simple_datum_legend.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class SimpleDatumLegend extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleDatumLegend(this.seriesList, {this.animate, Key key}) + const SimpleDatumLegend(this.seriesList, {this.animate, Key? key}) : super(key: key); factory SimpleDatumLegend.withSampleData() { diff --git a/web/charts/lib/legends/simple_series_legend.dart b/web/charts/lib/legends/simple_series_legend.dart index c363f80fd..41f8c3936 100644 --- a/web/charts/lib/legends/simple_series_legend.dart +++ b/web/charts/lib/legends/simple_series_legend.dart @@ -21,10 +21,10 @@ import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; class SimpleSeriesLegend extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleSeriesLegend(this.seriesList, {this.animate, Key key}) + const SimpleSeriesLegend(this.seriesList, {this.animate, Key? key}) : super(key: key); factory SimpleSeriesLegend.withSampleData() { diff --git a/web/charts/lib/line_chart/animation_zoom.dart b/web/charts/lib/line_chart/animation_zoom.dart index aa2d611c2..c58189d2a 100644 --- a/web/charts/lib/line_chart/animation_zoom.dart +++ b/web/charts/lib/line_chart/animation_zoom.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class LineAnimationZoomChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LineAnimationZoomChart(this.seriesList, {this.animate, Key key}) + const LineAnimationZoomChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/area_and_line.dart b/web/charts/lib/line_chart/area_and_line.dart index 987096135..cf4d0d210 100644 --- a/web/charts/lib/line_chart/area_and_line.dart +++ b/web/charts/lib/line_chart/area_and_line.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class AreaAndLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const AreaAndLineChart(this.seriesList, {this.animate, Key key}) + const AreaAndLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/dash_pattern.dart b/web/charts/lib/line_chart/dash_pattern.dart index 29a656977..cc9e86b7d 100644 --- a/web/charts/lib/line_chart/dash_pattern.dart +++ b/web/charts/lib/line_chart/dash_pattern.dart @@ -22,10 +22,10 @@ import 'package:flutter/material.dart'; /// Example of a line chart rendered with dash patterns. class DashPatternLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DashPatternLineChart(this.seriesList, {this.animate, Key key}) + const DashPatternLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/line_annotation.dart b/web/charts/lib/line_chart/line_annotation.dart index dcdc42a0d..107537d5f 100644 --- a/web/charts/lib/line_chart/line_annotation.dart +++ b/web/charts/lib/line_chart/line_annotation.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class LineLineAnnotationChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LineLineAnnotationChart(this.seriesList, {this.animate, Key key}) + const LineLineAnnotationChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and line annotations. diff --git a/web/charts/lib/line_chart/points.dart b/web/charts/lib/line_chart/points.dart index 2b9034de8..d701569b2 100644 --- a/web/charts/lib/line_chart/points.dart +++ b/web/charts/lib/line_chart/points.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class PointsLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PointsLineChart(this.seriesList, {this.animate, Key key}) + const PointsLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/range_annotation.dart b/web/charts/lib/line_chart/range_annotation.dart index 4283e44f8..840234463 100644 --- a/web/charts/lib/line_chart/range_annotation.dart +++ b/web/charts/lib/line_chart/range_annotation.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class LineRangeAnnotationChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LineRangeAnnotationChart(this.seriesList, {this.animate, Key key}) + const LineRangeAnnotationChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and range annotations. diff --git a/web/charts/lib/line_chart/range_annotation_margin.dart b/web/charts/lib/line_chart/range_annotation_margin.dart index c44343fcd..14f521b69 100644 --- a/web/charts/lib/line_chart/range_annotation_margin.dart +++ b/web/charts/lib/line_chart/range_annotation_margin.dart @@ -22,10 +22,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class LineRangeAnnotationMarginChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const LineRangeAnnotationMarginChart(this.seriesList, {this.animate, Key key}) + const LineRangeAnnotationMarginChart(this.seriesList, + {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and range annotations. diff --git a/web/charts/lib/line_chart/segments.dart b/web/charts/lib/line_chart/segments.dart index dfdb6f40e..1f0c81b08 100644 --- a/web/charts/lib/line_chart/segments.dart +++ b/web/charts/lib/line_chart/segments.dart @@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SegmentsLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SegmentsLineChart(this.seriesList, {this.animate, Key key}) + const SegmentsLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. @@ -227,7 +227,7 @@ class SegmentsLineChart extends StatelessWidget { class LinearSales { final int year; final int sales; - final List dashPattern; + final List? dashPattern; final double strokeWidthPx; LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx); diff --git a/web/charts/lib/line_chart/simple.dart b/web/charts/lib/line_chart/simple.dart index 99462f1c9..b8abd849d 100644 --- a/web/charts/lib/line_chart/simple.dart +++ b/web/charts/lib/line_chart/simple.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimpleLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleLineChart(this.seriesList, {this.animate, Key key}) + const SimpleLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/simple_nulls.dart b/web/charts/lib/line_chart/simple_nulls.dart index 633f11c21..1a7046c6b 100644 --- a/web/charts/lib/line_chart/simple_nulls.dart +++ b/web/charts/lib/line_chart/simple_nulls.dart @@ -25,10 +25,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimpleNullsLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleNullsLineChart(this.seriesList, {this.animate, Key key}) + const SimpleNullsLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. @@ -174,7 +174,7 @@ class SimpleNullsLineChart extends StatelessWidget { /// Sample linear data type. class LinearSales { final int year; - final int sales; + final int? sales; LinearSales(this.year, this.sales); } diff --git a/web/charts/lib/line_chart/stacked_area.dart b/web/charts/lib/line_chart/stacked_area.dart index cb1b7aa72..6c6d06ac4 100644 --- a/web/charts/lib/line_chart/stacked_area.dart +++ b/web/charts/lib/line_chart/stacked_area.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class StackedAreaLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedAreaLineChart(this.seriesList, {this.animate, Key key}) + const StackedAreaLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/stacked_area_custom_color.dart b/web/charts/lib/line_chart/stacked_area_custom_color.dart index 6e2c92dd8..04b83f120 100644 --- a/web/charts/lib/line_chart/stacked_area_custom_color.dart +++ b/web/charts/lib/line_chart/stacked_area_custom_color.dart @@ -25,11 +25,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class StackedAreaCustomColorLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const StackedAreaCustomColorLineChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. diff --git a/web/charts/lib/line_chart/stacked_area_nulls.dart b/web/charts/lib/line_chart/stacked_area_nulls.dart index 115e1b54c..3343c06e8 100644 --- a/web/charts/lib/line_chart/stacked_area_nulls.dart +++ b/web/charts/lib/line_chart/stacked_area_nulls.dart @@ -34,10 +34,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class StackedAreaNullsLineChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const StackedAreaNullsLineChart(this.seriesList, {this.animate, Key key}) + const StackedAreaNullsLineChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [LineChart] with sample data and no transition. @@ -186,7 +186,7 @@ class StackedAreaNullsLineChart extends StatelessWidget { /// Sample linear data type. class LinearSales { final int year; - final int sales; + final int? sales; LinearSales(this.year, this.sales); } diff --git a/web/charts/lib/main.dart b/web/charts/lib/main.dart index 5dcfe1c20..93c130dfe 100644 --- a/web/charts/lib/main.dart +++ b/web/charts/lib/main.dart @@ -19,7 +19,7 @@ import 'home.dart'; /// The main gallery app widget. class GalleryApp extends StatefulWidget { - const GalleryApp({Key key}) : super(key: key); + const GalleryApp({Key? key}) : super(key: key); @override GalleryAppState createState() => GalleryAppState(); diff --git a/web/charts/lib/pie_chart/auto_label.dart b/web/charts/lib/pie_chart/auto_label.dart index 0002d562d..93d03d1df 100644 --- a/web/charts/lib/pie_chart/auto_label.dart +++ b/web/charts/lib/pie_chart/auto_label.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class DonutAutoLabelChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DonutAutoLabelChart(this.seriesList, {this.animate, Key key}) + const DonutAutoLabelChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. diff --git a/web/charts/lib/pie_chart/donut.dart b/web/charts/lib/pie_chart/donut.dart index 3ecbc1b56..325a9903a 100644 --- a/web/charts/lib/pie_chart/donut.dart +++ b/web/charts/lib/pie_chart/donut.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class DonutPieChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const DonutPieChart(this.seriesList, {this.animate, Key key}) + const DonutPieChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. diff --git a/web/charts/lib/pie_chart/gauge.dart b/web/charts/lib/pie_chart/gauge.dart index 9f3f7ff8a..10e0a21cd 100644 --- a/web/charts/lib/pie_chart/gauge.dart +++ b/web/charts/lib/pie_chart/gauge.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class GaugeChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const GaugeChart(this.seriesList, {this.animate, Key key}) : super(key: key); + const GaugeChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. factory GaugeChart.withSampleData() { diff --git a/web/charts/lib/pie_chart/outside_label.dart b/web/charts/lib/pie_chart/outside_label.dart index 9862c546b..0897149bb 100644 --- a/web/charts/lib/pie_chart/outside_label.dart +++ b/web/charts/lib/pie_chart/outside_label.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class PieOutsideLabelChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PieOutsideLabelChart(this.seriesList, {this.animate, Key key}) + const PieOutsideLabelChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. diff --git a/web/charts/lib/pie_chart/partial_pie.dart b/web/charts/lib/pie_chart/partial_pie.dart index ea0dd1f69..e7be30b65 100644 --- a/web/charts/lib/pie_chart/partial_pie.dart +++ b/web/charts/lib/pie_chart/partial_pie.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class PartialPieChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const PartialPieChart(this.seriesList, {this.animate, Key key}) + const PartialPieChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. diff --git a/web/charts/lib/pie_chart/simple.dart b/web/charts/lib/pie_chart/simple.dart index cdf80772f..fd95084c4 100644 --- a/web/charts/lib/pie_chart/simple.dart +++ b/web/charts/lib/pie_chart/simple.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimplePieChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimplePieChart(this.seriesList, {this.animate, Key key}) + const SimplePieChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [PieChart] with sample data and no transition. diff --git a/web/charts/lib/scatter_plot_chart/animation_zoom.dart b/web/charts/lib/scatter_plot_chart/animation_zoom.dart index 2f8b472c8..8a42573c9 100644 --- a/web/charts/lib/scatter_plot_chart/animation_zoom.dart +++ b/web/charts/lib/scatter_plot_chart/animation_zoom.dart @@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class ScatterPlotAnimationZoomChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const ScatterPlotAnimationZoomChart(this.seriesList, {this.animate, Key key}) + const ScatterPlotAnimationZoomChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. diff --git a/web/charts/lib/scatter_plot_chart/bucketing_axis.dart b/web/charts/lib/scatter_plot_chart/bucketing_axis.dart index c8f1e3a31..d7a9fdd46 100644 --- a/web/charts/lib/scatter_plot_chart/bucketing_axis.dart +++ b/web/charts/lib/scatter_plot_chart/bucketing_axis.dart @@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class BucketingAxisScatterPlotChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const BucketingAxisScatterPlotChart(this.seriesList, {this.animate, Key key}) + const BucketingAxisScatterPlotChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. diff --git a/web/charts/lib/scatter_plot_chart/comparison_points.dart b/web/charts/lib/scatter_plot_chart/comparison_points.dart index 7dc628d4d..04f00fa43 100644 --- a/web/charts/lib/scatter_plot_chart/comparison_points.dart +++ b/web/charts/lib/scatter_plot_chart/comparison_points.dart @@ -21,11 +21,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class ComparisonPointsScatterPlotChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const ComparisonPointsScatterPlotChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. diff --git a/web/charts/lib/scatter_plot_chart/shapes.dart b/web/charts/lib/scatter_plot_chart/shapes.dart index 60dca2013..be93d7003 100644 --- a/web/charts/lib/scatter_plot_chart/shapes.dart +++ b/web/charts/lib/scatter_plot_chart/shapes.dart @@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class ShapesScatterPlotChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const ShapesScatterPlotChart(this.seriesList, {this.animate, Key key}) + const ShapesScatterPlotChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. @@ -196,9 +196,9 @@ class LinearSales { final int year; final int sales; final double radius; - final String shape; - final charts.Color fillColor; - final double strokeWidth; + final String? shape; + final charts.Color? fillColor; + final double? strokeWidth; LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor, this.strokeWidth); diff --git a/web/charts/lib/scatter_plot_chart/simple.dart b/web/charts/lib/scatter_plot_chart/simple.dart index 4b1945a90..4a033fbdd 100644 --- a/web/charts/lib/scatter_plot_chart/simple.dart +++ b/web/charts/lib/scatter_plot_chart/simple.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimpleScatterPlotChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleScatterPlotChart(this.seriesList, {this.animate, Key key}) + const SimpleScatterPlotChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [ScatterPlotChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/confidence_interval.dart b/web/charts/lib/time_series_chart/confidence_interval.dart index b9a0544cc..914d462ba 100644 --- a/web/charts/lib/time_series_chart/confidence_interval.dart +++ b/web/charts/lib/time_series_chart/confidence_interval.dart @@ -24,10 +24,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class TimeSeriesConfidenceInterval extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const TimeSeriesConfidenceInterval(this.seriesList, {this.animate, Key key}) + const TimeSeriesConfidenceInterval(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/end_points_axis.dart b/web/charts/lib/time_series_chart/end_points_axis.dart index 2d1c3ab22..e0b312ee4 100644 --- a/web/charts/lib/time_series_chart/end_points_axis.dart +++ b/web/charts/lib/time_series_chart/end_points_axis.dart @@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class EndPointsAxisTimeSeriesChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const EndPointsAxisTimeSeriesChart(this.seriesList, {this.animate, Key key}) + const EndPointsAxisTimeSeriesChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/line_annotation.dart b/web/charts/lib/time_series_chart/line_annotation.dart index ba90694aa..726cecff8 100644 --- a/web/charts/lib/time_series_chart/line_annotation.dart +++ b/web/charts/lib/time_series_chart/line_annotation.dart @@ -28,10 +28,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class TimeSeriesLineAnnotationChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const TimeSeriesLineAnnotationChart(this.seriesList, {this.animate, Key key}) + const TimeSeriesLineAnnotationChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/range_annotation.dart b/web/charts/lib/time_series_chart/range_annotation.dart index 2282ba526..b6a077f71 100644 --- a/web/charts/lib/time_series_chart/range_annotation.dart +++ b/web/charts/lib/time_series_chart/range_annotation.dart @@ -28,10 +28,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class TimeSeriesRangeAnnotationChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const TimeSeriesRangeAnnotationChart(this.seriesList, {this.animate, Key key}) + const TimeSeriesRangeAnnotationChart(this.seriesList, + {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/range_annotation_margin.dart b/web/charts/lib/time_series_chart/range_annotation_margin.dart index 85b96bd98..c0b2f4cdf 100644 --- a/web/charts/lib/time_series_chart/range_annotation_margin.dart +++ b/web/charts/lib/time_series_chart/range_annotation_margin.dart @@ -22,11 +22,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class TimeSeriesRangeAnnotationMarginChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const TimeSeriesRangeAnnotationMarginChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/simple.dart b/web/charts/lib/time_series_chart/simple.dart index c47abf15a..a2db3e033 100644 --- a/web/charts/lib/time_series_chart/simple.dart +++ b/web/charts/lib/time_series_chart/simple.dart @@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class SimpleTimeSeriesChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; - const SimpleTimeSeriesChart(this.seriesList, {this.animate, Key key}) + const SimpleTimeSeriesChart(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/lib/time_series_chart/symbol_annotation.dart b/web/charts/lib/time_series_chart/symbol_annotation.dart index bd338cfb1..1222eb9a1 100644 --- a/web/charts/lib/time_series_chart/symbol_annotation.dart +++ b/web/charts/lib/time_series_chart/symbol_annotation.dart @@ -32,11 +32,11 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; class TimeSeriesSymbolAnnotationChart extends StatelessWidget { - final List seriesList; - final bool animate; + final List> seriesList; + final bool? animate; const TimeSeriesSymbolAnnotationChart(this.seriesList, - {this.animate, Key key}) + {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. @@ -287,10 +287,14 @@ class TimeSeriesSymbolAnnotationChart extends StatelessWidget { /// Sample time series data type. class TimeSeriesSales { final DateTime timeCurrent; - final DateTime timePrevious; - final DateTime timeTarget; - final int sales; + final DateTime? timePrevious; + final DateTime? timeTarget; + final int? sales; - TimeSeriesSales( - {this.timeCurrent, this.timePrevious, this.timeTarget, this.sales}); + TimeSeriesSales({ + required this.timeCurrent, + this.timePrevious, + this.timeTarget, + this.sales, + }); } diff --git a/web/charts/lib/time_series_chart/with_bar_renderer.dart b/web/charts/lib/time_series_chart/with_bar_renderer.dart index 5bd2956f2..df9e9fd5b 100644 --- a/web/charts/lib/time_series_chart/with_bar_renderer.dart +++ b/web/charts/lib/time_series_chart/with_bar_renderer.dart @@ -22,9 +22,9 @@ import 'package:flutter/material.dart'; class TimeSeriesBar extends StatelessWidget { final List> seriesList; - final bool animate; + final bool? animate; - const TimeSeriesBar(this.seriesList, {this.animate, Key key}) + const TimeSeriesBar(this.seriesList, {this.animate, Key? key}) : super(key: key); /// Creates a [TimeSeriesChart] with sample data and no transition. diff --git a/web/charts/pubspec.lock b/web/charts/pubspec.lock index b78dec285..be03eb017 100644 --- a/web/charts/pubspec.lock +++ b/web/charts/pubspec.lock @@ -7,7 +7,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charts_common: dependency: transitive description: diff --git a/web/charts/pubspec.yaml b/web/charts/pubspec.yaml index 2204ad780..bed5942d9 100644 --- a/web/charts/pubspec.yaml +++ b/web/charts/pubspec.yaml @@ -3,7 +3,7 @@ description: Charts-Flutter Demo publish_to: none environment: - sdk: '>=2.10.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: