mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
web/charts: Migrate to null safety (#921)
This commit is contained in:
@@ -38,10 +38,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DomainA11yExploreBarChart extends StatelessWidget {
|
class DomainA11yExploreBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DomainA11yExploreBarChart(this.seriesList, {this.animate, Key key})
|
const DomainA11yExploreBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,8 +22,12 @@ class AppConfig {
|
|||||||
final ThemeData theme;
|
final ThemeData theme;
|
||||||
final bool showPerformanceOverlay;
|
final bool showPerformanceOverlay;
|
||||||
|
|
||||||
AppConfig(
|
AppConfig({
|
||||||
{this.appName, this.appLink, this.theme, this.showPerformanceOverlay});
|
required this.appName,
|
||||||
|
required this.appLink,
|
||||||
|
required this.theme,
|
||||||
|
required this.showPerformanceOverlay,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The default configuration of the app.
|
/// The default configuration of the app.
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// RTL.flipAxisLocations is set.
|
/// RTL.flipAxisLocations is set.
|
||||||
class BarChartWithSecondaryAxis extends StatelessWidget {
|
class BarChartWithSecondaryAxis extends StatelessWidget {
|
||||||
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const BarChartWithSecondaryAxis(this.seriesList, {this.animate, Key key})
|
const BarChartWithSecondaryAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory BarChartWithSecondaryAxis.withSampleData() {
|
factory BarChartWithSecondaryAxis.withSampleData() {
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// RTL.flipAxisLocations is set.
|
/// RTL.flipAxisLocations is set.
|
||||||
class BarChartWithSecondaryAxisOnly extends StatelessWidget {
|
class BarChartWithSecondaryAxisOnly extends StatelessWidget {
|
||||||
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const BarChartWithSecondaryAxisOnly(this.seriesList, {this.animate, Key key})
|
const BarChartWithSecondaryAxisOnly(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory BarChartWithSecondaryAxisOnly.withSampleData() {
|
factory BarChartWithSecondaryAxisOnly.withSampleData() {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class CustomAxisTickFormatters extends StatelessWidget {
|
class CustomAxisTickFormatters extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const CustomAxisTickFormatters(this.seriesList, {this.animate, Key key})
|
const CustomAxisTickFormatters(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// There are many axis styling options in the SmallTickRenderer allowing you
|
/// There are many axis styling options in the SmallTickRenderer allowing you
|
||||||
/// to customize the font, tick lengths, and offsets.
|
/// to customize the font, tick lengths, and offsets.
|
||||||
class CustomFontSizeAndColor extends StatelessWidget {
|
class CustomFontSizeAndColor extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const CustomFontSizeAndColor(this.seriesList, {this.animate, Key key})
|
const CustomFontSizeAndColor(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory CustomFontSizeAndColor.withSampleData() {
|
factory CustomFontSizeAndColor.withSampleData() {
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class CustomMeasureTickCount extends StatelessWidget {
|
class CustomMeasureTickCount extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const CustomMeasureTickCount(this.seriesList, {this.animate, Key key})
|
const CustomMeasureTickCount(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// Note: primary and secondary may flip left and right positioning when
|
/// Note: primary and secondary may flip left and right positioning when
|
||||||
/// RTL.flipAxisLocations is set.
|
/// RTL.flipAxisLocations is set.
|
||||||
class FlippedVerticalAxis extends StatelessWidget {
|
class FlippedVerticalAxis extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const FlippedVerticalAxis(this.seriesList, {this.animate, Key key})
|
const FlippedVerticalAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory FlippedVerticalAxis.withSampleData() {
|
factory FlippedVerticalAxis.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class GridlineDashPattern extends StatelessWidget {
|
class GridlineDashPattern extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GridlineDashPattern(this.seriesList, {this.animate, Key key})
|
const GridlineDashPattern(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
|
|
||||||
/// Example of hiding both axis.
|
/// Example of hiding both axis.
|
||||||
class HiddenTicksAndLabelsAxis extends StatelessWidget {
|
class HiddenTicksAndLabelsAxis extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HiddenTicksAndLabelsAxis(this.seriesList, {this.animate, Key key})
|
const HiddenTicksAndLabelsAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory HiddenTicksAndLabelsAxis.withSampleData() {
|
factory HiddenTicksAndLabelsAxis.withSampleData() {
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// RTL.flipAxisLocations is set.
|
/// RTL.flipAxisLocations is set.
|
||||||
class HorizontalBarChartWithSecondaryAxis extends StatelessWidget {
|
class HorizontalBarChartWithSecondaryAxis extends StatelessWidget {
|
||||||
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HorizontalBarChartWithSecondaryAxis(this.seriesList,
|
const HorizontalBarChartWithSecondaryAxis(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory HorizontalBarChartWithSecondaryAxis.withSampleData() {
|
factory HorizontalBarChartWithSecondaryAxis.withSampleData() {
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class IntegerOnlyMeasureAxis extends StatelessWidget {
|
class IntegerOnlyMeasureAxis extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const IntegerOnlyMeasureAxis(this.seriesList, {this.animate, Key key})
|
const IntegerOnlyMeasureAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DisjointMeasureAxisLineChart extends StatelessWidget {
|
class DisjointMeasureAxisLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DisjointMeasureAxisLineChart(this.seriesList, {this.animate, Key key})
|
const DisjointMeasureAxisLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
@@ -263,8 +263,8 @@ class DisjointMeasureAxisLineChart extends StatelessWidget {
|
|||||||
/// Sample linear data type.
|
/// Sample linear data type.
|
||||||
class LinearClicks {
|
class LinearClicks {
|
||||||
final int year;
|
final int year;
|
||||||
final int clickCount;
|
final int? clickCount;
|
||||||
final double clickRate;
|
final double? clickRate;
|
||||||
|
|
||||||
LinearClicks(this.year, {this.clickCount, this.clickRate});
|
LinearClicks(this.year, {this.clickCount, this.clickRate});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// Example of using a custom primary measure replacing the renderSpec with one
|
/// Example of using a custom primary measure replacing the renderSpec with one
|
||||||
/// that aligns the text under the tick and left justifies.
|
/// that aligns the text under the tick and left justifies.
|
||||||
class MeasureAxisLabelAlignment extends StatelessWidget {
|
class MeasureAxisLabelAlignment extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const MeasureAxisLabelAlignment(this.seriesList, {this.animate, Key key})
|
const MeasureAxisLabelAlignment(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory MeasureAxisLabelAlignment.withSampleData() {
|
factory MeasureAxisLabelAlignment.withSampleData() {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class NonzeroBoundMeasureAxis extends StatelessWidget {
|
class NonzeroBoundMeasureAxis extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const NonzeroBoundMeasureAxis(this.seriesList, {this.animate, Key key})
|
const NonzeroBoundMeasureAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class NumericInitialViewport extends StatelessWidget {
|
class NumericInitialViewport extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const NumericInitialViewport(this.seriesList, {this.animate, Key key})
|
const NumericInitialViewport(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class OrdinalInitialViewport extends StatelessWidget {
|
class OrdinalInitialViewport extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const OrdinalInitialViewport(this.seriesList, {this.animate, Key key})
|
const OrdinalInitialViewport(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// There are many axis styling options in the SmallTickRenderer allowing you
|
/// There are many axis styling options in the SmallTickRenderer allowing you
|
||||||
/// to customize the font, tick lengths, and offsets.
|
/// to customize the font, tick lengths, and offsets.
|
||||||
class ShortTickLengthAxis extends StatelessWidget {
|
class ShortTickLengthAxis extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ShortTickLengthAxis(this.seriesList, {this.animate, Key key})
|
const ShortTickLengthAxis(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory ShortTickLengthAxis.withSampleData() {
|
factory ShortTickLengthAxis.withSampleData() {
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// For datetime axis, the [StaticDateTimeTickProviderSpec] can be used by
|
/// For datetime axis, the [StaticDateTimeTickProviderSpec] can be used by
|
||||||
/// passing in a list of ticks defined with [TickSpec] of datetime.
|
/// passing in a list of ticks defined with [TickSpec] of datetime.
|
||||||
class StaticallyProvidedTicks extends StatelessWidget {
|
class StaticallyProvidedTicks extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StaticallyProvidedTicks(this.seriesList, {this.animate, Key key})
|
const StaticallyProvidedTicks(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory StaticallyProvidedTicks.withSampleData() {
|
factory StaticallyProvidedTicks.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class CustomRoundedBars extends StatelessWidget {
|
class CustomRoundedBars extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const CustomRoundedBars(this.seriesList, {this.animate, Key key})
|
const CustomRoundedBars(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with custom rounded bars.
|
/// Creates a [BarChart] with custom rounded bars.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class GroupedBarChart extends StatelessWidget {
|
class GroupedBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedBarChart(this.seriesList, {this.animate, Key key})
|
const GroupedBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedBarChart.withSampleData() {
|
factory GroupedBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// Example of a grouped bar chart with three series, each rendered with
|
/// Example of a grouped bar chart with three series, each rendered with
|
||||||
/// different fill colors.
|
/// different fill colors.
|
||||||
class GroupedFillColorBarChart extends StatelessWidget {
|
class GroupedFillColorBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedFillColorBarChart(this.seriesList, {this.animate, Key key})
|
const GroupedFillColorBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedFillColorBarChart.withSampleData() {
|
factory GroupedFillColorBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class GroupedBarSingleTargetLineChart extends StatelessWidget {
|
class GroupedBarSingleTargetLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedBarSingleTargetLineChart(this.seriesList,
|
const GroupedBarSingleTargetLineChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedBarSingleTargetLineChart.withSampleData() {
|
factory GroupedBarSingleTargetLineChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class GroupedStackedBarChart extends StatelessWidget {
|
class GroupedStackedBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedStackedBarChart(this.seriesList, {this.animate, Key key})
|
const GroupedStackedBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedStackedBarChart.withSampleData() {
|
factory GroupedStackedBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class GroupedStackedWeightPatternBarChart extends StatelessWidget {
|
class GroupedStackedWeightPatternBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedStackedWeightPatternBarChart(this.seriesList,
|
const GroupedStackedWeightPatternBarChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedStackedWeightPatternBarChart.withSampleData() {
|
factory GroupedStackedWeightPatternBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class GroupedBarTargetLineChart extends StatelessWidget {
|
class GroupedBarTargetLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const GroupedBarTargetLineChart(this.seriesList, {this.animate, Key key})
|
const GroupedBarTargetLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory GroupedBarTargetLineChart.withSampleData() {
|
factory GroupedBarTargetLineChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class HorizontalBarChart extends StatelessWidget {
|
class HorizontalBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HorizontalBarChart(this.seriesList, {this.animate, Key key})
|
const HorizontalBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class HorizontalBarLabelChart extends StatelessWidget {
|
class HorizontalBarLabelChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HorizontalBarLabelChart(this.seriesList, {this.animate, Key key})
|
const HorizontalBarLabelChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class HorizontalBarLabelCustomChart extends StatelessWidget {
|
class HorizontalBarLabelCustomChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HorizontalBarLabelCustomChart(this.seriesList, {this.animate, Key key})
|
const HorizontalBarLabelCustomChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -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
|
/// The second series of bars is rendered with a pattern by defining a
|
||||||
/// fillPatternFn mapping function.
|
/// fillPatternFn mapping function.
|
||||||
class HorizontalPatternForwardHatchBarChart extends StatelessWidget {
|
class HorizontalPatternForwardHatchBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const HorizontalPatternForwardHatchBarChart(this.seriesList,
|
const HorizontalPatternForwardHatchBarChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory HorizontalPatternForwardHatchBarChart.withSampleData() {
|
factory HorizontalPatternForwardHatchBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class PatternForwardHatchBarChart extends StatelessWidget {
|
class PatternForwardHatchBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PatternForwardHatchBarChart(this.seriesList, {this.animate, Key key})
|
const PatternForwardHatchBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory PatternForwardHatchBarChart.withSampleData() {
|
factory PatternForwardHatchBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimpleBarChart extends StatelessWidget {
|
class SimpleBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleBarChart(this.seriesList, {this.animate, Key key})
|
const SimpleBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -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.
|
/// Example of a Spark Bar by hiding both axis, reducing the chart margins.
|
||||||
class SparkBar extends StatelessWidget {
|
class SparkBar extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
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() {
|
factory SparkBar.withSampleData() {
|
||||||
return SparkBar(
|
return SparkBar(
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class StackedBarChart extends StatelessWidget {
|
class StackedBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedBarChart(this.seriesList, {this.animate, Key key})
|
const StackedBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a stacked [BarChart] with sample data and no transition.
|
/// Creates a stacked [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// Example of a stacked bar chart with three series, each rendered with
|
/// Example of a stacked bar chart with three series, each rendered with
|
||||||
/// different fill colors.
|
/// different fill colors.
|
||||||
class StackedFillColorBarChart extends StatelessWidget {
|
class StackedFillColorBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedFillColorBarChart(this.seriesList, {this.animate, Key key})
|
const StackedFillColorBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory StackedFillColorBarChart.withSampleData() {
|
factory StackedFillColorBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class StackedHorizontalBarChart extends StatelessWidget {
|
class StackedHorizontalBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedHorizontalBarChart(this.seriesList, {this.animate, Key key})
|
const StackedHorizontalBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a stacked [BarChart] with sample data and no transition.
|
/// Creates a stacked [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class StackedBarTargetLineChart extends StatelessWidget {
|
class StackedBarTargetLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedBarTargetLineChart(this.seriesList, {this.animate, Key key})
|
const StackedBarTargetLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a stacked [BarChart] with sample data and no transition.
|
/// Creates a stacked [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import 'package:flutter/material.dart';
|
|||||||
/// A series of [ChartTitle] behaviors are used to render titles, one per
|
/// A series of [ChartTitle] behaviors are used to render titles, one per
|
||||||
/// margin.
|
/// margin.
|
||||||
class ChartTitleLine extends StatelessWidget {
|
class ChartTitleLine extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ChartTitleLine(this.seriesList, {this.animate, Key key})
|
const ChartTitleLine(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class InitialHintAnimation extends StatelessWidget {
|
class InitialHintAnimation extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const InitialHintAnimation(this.seriesList, {this.animate, Key key})
|
const InitialHintAnimation(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class InitialSelection extends StatelessWidget {
|
class InitialSelection extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const InitialSelection(this.seriesList, {this.animate, Key key})
|
const InitialSelection(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with initial selection behavior.
|
/// Creates a [BarChart] with initial selection behavior.
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class PercentOfDomainBarChart extends StatelessWidget {
|
class PercentOfDomainBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PercentOfDomainBarChart(this.seriesList, {this.animate, Key key})
|
const PercentOfDomainBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a stacked [BarChart] with sample data and no transition.
|
/// Creates a stacked [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class PercentOfDomainByCategoryBarChart extends StatelessWidget {
|
class PercentOfDomainByCategoryBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PercentOfDomainByCategoryBarChart(this.seriesList,
|
const PercentOfDomainByCategoryBarChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory PercentOfDomainByCategoryBarChart.withSampleData() {
|
factory PercentOfDomainByCategoryBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class PercentOfSeriesBarChart extends StatelessWidget {
|
class PercentOfSeriesBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PercentOfSeriesBarChart(this.seriesList, {this.animate, Key key})
|
const PercentOfSeriesBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a stacked [BarChart] with sample data and no transition.
|
/// Creates a stacked [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionBarHighlight extends StatelessWidget {
|
class SelectionBarHighlight extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionBarHighlight(this.seriesList, {this.animate, Key key})
|
const SelectionBarHighlight(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionCallbackExample extends StatefulWidget {
|
class SelectionCallbackExample extends StatefulWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionCallbackExample(this.seriesList, {this.animate, Key key})
|
const SelectionCallbackExample(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [charts.TimeSeriesChart] with sample data and no transition.
|
/// Creates a [charts.TimeSeriesChart] with sample data and no transition.
|
||||||
@@ -130,8 +130,8 @@ class SelectionCallbackExample extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SelectionCallbackState extends State<SelectionCallbackExample> {
|
class _SelectionCallbackState extends State<SelectionCallbackExample> {
|
||||||
DateTime _time;
|
DateTime? _time;
|
||||||
Map<String, num> _measures;
|
Map<String?, num?>? _measures;
|
||||||
|
|
||||||
// Listens to the underlying selection changes, and updates the information
|
// Listens to the underlying selection changes, and updates the information
|
||||||
// relevant to building the primitive legend like information under the
|
// relevant to building the primitive legend like information under the
|
||||||
@@ -139,8 +139,8 @@ class _SelectionCallbackState extends State<SelectionCallbackExample> {
|
|||||||
_onSelectionChanged(charts.SelectionModel model) {
|
_onSelectionChanged(charts.SelectionModel model) {
|
||||||
final selectedDatum = model.selectedDatum;
|
final selectedDatum = model.selectedDatum;
|
||||||
|
|
||||||
DateTime time;
|
DateTime? time;
|
||||||
final measures = <String, num>{};
|
final measures = <String?, num?>{};
|
||||||
|
|
||||||
// We get the model that updated with a list of [SeriesDatum] which is
|
// We get the model that updated with a list of [SeriesDatum] which is
|
||||||
// simply a pair of series & datum.
|
// simply a pair of series & datum.
|
||||||
@@ -185,7 +185,7 @@ class _SelectionCallbackState extends State<SelectionCallbackExample> {
|
|||||||
padding: const EdgeInsets.only(top: 5.0),
|
padding: const EdgeInsets.only(top: 5.0),
|
||||||
child: Text(_time.toString())));
|
child: Text(_time.toString())));
|
||||||
}
|
}
|
||||||
_measures?.forEach((String series, num value) {
|
_measures?.forEach((String? series, num? value) {
|
||||||
children.add(Text('$series: $value'));
|
children.add(Text('$series: $value'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionLineHighlight extends StatelessWidget {
|
class SelectionLineHighlight extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionLineHighlight(this.seriesList, {this.animate, Key key})
|
const SelectionLineHighlight(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionLineHighlightCustomShape extends StatelessWidget {
|
class SelectionLineHighlightCustomShape extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionLineHighlightCustomShape(this.seriesList,
|
const SelectionLineHighlightCustomShape(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionScatterPlotHighlight extends StatelessWidget {
|
class SelectionScatterPlotHighlight extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionScatterPlotHighlight(this.seriesList, {this.animate, Key key})
|
const SelectionScatterPlotHighlight(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
@@ -225,9 +225,9 @@ class LinearSales {
|
|||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int sales;
|
||||||
final double radius;
|
final double radius;
|
||||||
final String shape;
|
final String? shape;
|
||||||
final charts.Color fillColor;
|
final charts.Color? fillColor;
|
||||||
final double strokeWidth;
|
final double? strokeWidth;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor,
|
LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor,
|
||||||
this.strokeWidth);
|
this.strokeWidth);
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SelectionUserManaged extends StatefulWidget {
|
class SelectionUserManaged extends StatefulWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SelectionUserManaged(this.seriesList, {this.animate, Key key})
|
const SelectionUserManaged(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ import 'package:flutter/scheduler.dart';
|
|||||||
/// [Slider.moveSliderToDomain] can be called to programmatically position the
|
/// [Slider.moveSliderToDomain] can be called to programmatically position the
|
||||||
/// slider. This is useful for synchronizing the slider with external elements.
|
/// slider. This is useful for synchronizing the slider with external elements.
|
||||||
class SliderLine extends StatefulWidget {
|
class SliderLine extends StatefulWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
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.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
factory SliderLine.withSampleData() {
|
factory SliderLine.withSampleData() {
|
||||||
@@ -103,9 +103,9 @@ class SliderLine extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SliderCallbackState extends State<SliderLine> {
|
class _SliderCallbackState extends State<SliderLine> {
|
||||||
num _sliderDomainValue;
|
num? _sliderDomainValue;
|
||||||
String _sliderDragState;
|
String? _sliderDragState;
|
||||||
Point<int> _sliderPosition;
|
Point<int>? _sliderPosition;
|
||||||
|
|
||||||
// Handles callbacks when the user drags the slider.
|
// Handles callbacks when the user drags the slider.
|
||||||
_onSliderChange(Point<int> point, dynamic domain, String roleId,
|
_onSliderChange(Point<int> point, dynamic domain, String roleId,
|
||||||
@@ -119,7 +119,7 @@ class _SliderCallbackState extends State<SliderLine> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SchedulerBinding.instance.addPostFrameCallback(rebuild);
|
SchedulerBinding.instance!.addPostFrameCallback(rebuild);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -175,7 +175,7 @@ class _SliderCallbackState extends State<SliderLine> {
|
|||||||
children.add(Padding(
|
children.add(Padding(
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
padding: const EdgeInsets.only(top: 5.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Slider position: ${_sliderPosition.x}, ${_sliderPosition.y}')));
|
'Slider position: ${_sliderPosition!.x}, ${_sliderPosition!.y}')));
|
||||||
}
|
}
|
||||||
if (_sliderDragState != null) {
|
if (_sliderDragState != null) {
|
||||||
children.add(Padding(
|
children.add(Padding(
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SlidingViewportOnSelection extends StatelessWidget {
|
class SlidingViewportOnSelection extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SlidingViewportOnSelection(this.seriesList, {this.animate, Key key})
|
const SlidingViewportOnSelection(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DateTimeComboLinePointChart extends StatelessWidget {
|
class DateTimeComboLinePointChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DateTimeComboLinePointChart(this.seriesList, {this.animate, Key key})
|
const DateTimeComboLinePointChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class NumericComboLineBarChart extends StatelessWidget {
|
class NumericComboLineBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const NumericComboLineBarChart(this.seriesList, {this.animate, Key key})
|
const NumericComboLineBarChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class NumericComboLinePointChart extends StatelessWidget {
|
class NumericComboLinePointChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const NumericComboLinePointChart(this.seriesList, {this.animate, Key key})
|
const NumericComboLinePointChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class OrdinalComboBarLineChart extends StatelessWidget {
|
class OrdinalComboBarLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const OrdinalComboBarLineChart(this.seriesList, {this.animate, Key key})
|
const OrdinalComboBarLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory OrdinalComboBarLineChart.withSampleData() {
|
factory OrdinalComboBarLineChart.withSampleData() {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ScatterPlotComboLineChart extends StatelessWidget {
|
class ScatterPlotComboLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ScatterPlotComboLineChart(this.seriesList, {this.animate, Key key})
|
const ScatterPlotComboLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ class GalleryDrawer extends StatelessWidget {
|
|||||||
final ValueChanged<bool> onShowPerformanceOverlayChanged;
|
final ValueChanged<bool> onShowPerformanceOverlayChanged;
|
||||||
|
|
||||||
const GalleryDrawer(
|
const GalleryDrawer(
|
||||||
{Key key,
|
{Key? key,
|
||||||
this.showPerformanceOverlay,
|
required this.showPerformanceOverlay,
|
||||||
this.onShowPerformanceOverlayChanged})
|
required this.onShowPerformanceOverlayChanged})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -40,7 +40,7 @@ class GalleryDrawer extends StatelessWidget {
|
|||||||
selected: showPerformanceOverlay,
|
selected: showPerformanceOverlay,
|
||||||
trailing: Checkbox(
|
trailing: Checkbox(
|
||||||
value: showPerformanceOverlay,
|
value: showPerformanceOverlay,
|
||||||
onChanged: (bool value) {
|
onChanged: (bool? value) {
|
||||||
onShowPerformanceOverlayChanged(!showPerformanceOverlay);
|
onShowPerformanceOverlayChanged(!showPerformanceOverlay);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -20,17 +20,17 @@ typedef GalleryWidgetBuilder = Widget Function();
|
|||||||
/// Helper to build gallery.
|
/// Helper to build gallery.
|
||||||
class GalleryScaffold extends StatefulWidget {
|
class GalleryScaffold extends StatefulWidget {
|
||||||
/// The widget used for leading in a [ListTile].
|
/// The widget used for leading in a [ListTile].
|
||||||
final Widget listTileIcon;
|
final Widget? listTileIcon;
|
||||||
final String title;
|
final String title;
|
||||||
final String subtitle;
|
final String subtitle;
|
||||||
final GalleryWidgetBuilder childBuilder;
|
final GalleryWidgetBuilder childBuilder;
|
||||||
|
|
||||||
const GalleryScaffold(
|
const GalleryScaffold(
|
||||||
{this.listTileIcon,
|
{this.listTileIcon,
|
||||||
this.title,
|
required this.title,
|
||||||
this.subtitle,
|
required this.subtitle,
|
||||||
this.childBuilder,
|
required this.childBuilder,
|
||||||
Key key})
|
Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Gets the gallery
|
/// Gets the gallery
|
||||||
|
|||||||
@@ -51,12 +51,10 @@ class Home extends StatelessWidget {
|
|||||||
final legendsGalleries = legends.buildGallery();
|
final legendsGalleries = legends.buildGallery();
|
||||||
|
|
||||||
Home(
|
Home(
|
||||||
{Key key,
|
{Key? key,
|
||||||
this.showPerformanceOverlay,
|
required this.showPerformanceOverlay,
|
||||||
@required this.onShowPerformanceOverlayChanged})
|
required this.onShowPerformanceOverlayChanged})
|
||||||
: super(key: key) {
|
: super(key: key);
|
||||||
assert(onShowPerformanceOverlayChanged != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RTLBarChart extends StatelessWidget {
|
class RTLBarChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
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.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
factory RTLBarChart.withSampleData() {
|
factory RTLBarChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RTLLineChart extends StatelessWidget {
|
class RTLLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const RTLLineChart(this.seriesList, {this.animate, Key key})
|
const RTLLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RTLLineSegments extends StatelessWidget {
|
class RTLLineSegments extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const RTLLineSegments(this.seriesList, {this.animate, Key key})
|
const RTLLineSegments(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
@@ -242,7 +242,7 @@ class RTLLineSegments extends StatelessWidget {
|
|||||||
class LinearSales {
|
class LinearSales {
|
||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int sales;
|
||||||
final List<int> dashPattern;
|
final List<int>? dashPattern;
|
||||||
final double strokeWidthPx;
|
final double strokeWidthPx;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx);
|
LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx);
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RTLSeriesLegend extends StatelessWidget {
|
class RTLSeriesLegend extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const RTLSeriesLegend(this.seriesList, {this.animate, Key key})
|
const RTLSeriesLegend(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [BarChart] with sample data and no transition.
|
/// Creates a [BarChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class DatumLegendOptions extends StatelessWidget {
|
class DatumLegendOptions extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DatumLegendOptions(this.seriesList, {this.animate, Key key})
|
const DatumLegendOptions(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory DatumLegendOptions.withSampleData() {
|
factory DatumLegendOptions.withSampleData() {
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
/// Also shows the option to provide a custom measure formatter.
|
/// Also shows the option to provide a custom measure formatter.
|
||||||
class DatumLegendWithMeasures extends StatelessWidget {
|
class DatumLegendWithMeasures extends StatelessWidget {
|
||||||
final List<charts.Series<LinearSales, int>> seriesList;
|
final List<charts.Series<LinearSales, int>> 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);
|
: super(key: key);
|
||||||
|
|
||||||
factory DatumLegendWithMeasures.withSampleData() {
|
factory DatumLegendWithMeasures.withSampleData() {
|
||||||
@@ -110,7 +110,7 @@ class DatumLegendWithMeasures extends StatelessWidget {
|
|||||||
legendDefaultMeasure: charts.LegendDefaultMeasure.firstValue,
|
legendDefaultMeasure: charts.LegendDefaultMeasure.firstValue,
|
||||||
// Optionally provide a measure formatter to format the measure value.
|
// Optionally provide a measure formatter to format the measure value.
|
||||||
// If none is specified the value is formatted as a decimal.
|
// If none is specified the value is formatted as a decimal.
|
||||||
measureFormatter: (num value) {
|
measureFormatter: (num? value) {
|
||||||
return value == null ? '-' : '${value}k';
|
return value == null ? '-' : '${value}k';
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class DefaultHiddenSeriesLegend extends StatelessWidget {
|
class DefaultHiddenSeriesLegend extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DefaultHiddenSeriesLegend(this.seriesList, {this.animate, Key key})
|
const DefaultHiddenSeriesLegend(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory DefaultHiddenSeriesLegend.withSampleData() {
|
factory DefaultHiddenSeriesLegend.withSampleData() {
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ class IconRenderer extends charts.CustomSymbolRenderer {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context,
|
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
|
// Lighten the color if the symbol is not enabled
|
||||||
// Example: If user has tapped on a Series deselecting it.
|
// Example: If user has tapped on a Series deselecting it.
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
color = color.withOpacity(0.26);
|
color = color!.withOpacity(0.26);
|
||||||
}
|
}
|
||||||
|
|
||||||
return SizedBox.fromSize(
|
return SizedBox.fromSize(
|
||||||
@@ -43,10 +43,10 @@ class IconRenderer extends charts.CustomSymbolRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LegendWithCustomSymbol extends StatelessWidget {
|
class LegendWithCustomSymbol extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LegendWithCustomSymbol(this.seriesList, {this.animate, Key key})
|
const LegendWithCustomSymbol(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory LegendWithCustomSymbol.withSampleData() {
|
factory LegendWithCustomSymbol.withSampleData() {
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class LegendOptions extends StatelessWidget {
|
class LegendOptions extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LegendOptions(this.seriesList, {this.animate, Key key})
|
const LegendOptions(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory LegendOptions.withSampleData() {
|
factory LegendOptions.withSampleData() {
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
///
|
///
|
||||||
/// Also shows the option to provide a custom measure formatter.
|
/// Also shows the option to provide a custom measure formatter.
|
||||||
class LegendWithMeasures extends StatelessWidget {
|
class LegendWithMeasures extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LegendWithMeasures(this.seriesList, {this.animate, Key key})
|
const LegendWithMeasures(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory LegendWithMeasures.withSampleData() {
|
factory LegendWithMeasures.withSampleData() {
|
||||||
@@ -153,7 +153,7 @@ class LegendWithMeasures extends StatelessWidget {
|
|||||||
showMeasures: true,
|
showMeasures: true,
|
||||||
// Optionally provide a measure formatter to format the measure value.
|
// Optionally provide a measure formatter to format the measure value.
|
||||||
// If none is specified the value is formatted as a decimal.
|
// If none is specified the value is formatted as a decimal.
|
||||||
measureFormatter: (num value) {
|
measureFormatter: (num? value) {
|
||||||
return value == null ? '-' : '${value}k';
|
return value == null ? '-' : '${value}k';
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class SimpleDatumLegend extends StatelessWidget {
|
class SimpleDatumLegend extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleDatumLegend(this.seriesList, {this.animate, Key key})
|
const SimpleDatumLegend(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory SimpleDatumLegend.withSampleData() {
|
factory SimpleDatumLegend.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
class SimpleSeriesLegend extends StatelessWidget {
|
class SimpleSeriesLegend extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleSeriesLegend(this.seriesList, {this.animate, Key key})
|
const SimpleSeriesLegend(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
factory SimpleSeriesLegend.withSampleData() {
|
factory SimpleSeriesLegend.withSampleData() {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LineAnimationZoomChart extends StatelessWidget {
|
class LineAnimationZoomChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LineAnimationZoomChart(this.seriesList, {this.animate, Key key})
|
const LineAnimationZoomChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AreaAndLineChart extends StatelessWidget {
|
class AreaAndLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const AreaAndLineChart(this.seriesList, {this.animate, Key key})
|
const AreaAndLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
/// Example of a line chart rendered with dash patterns.
|
/// Example of a line chart rendered with dash patterns.
|
||||||
class DashPatternLineChart extends StatelessWidget {
|
class DashPatternLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DashPatternLineChart(this.seriesList, {this.animate, Key key})
|
const DashPatternLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LineLineAnnotationChart extends StatelessWidget {
|
class LineLineAnnotationChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LineLineAnnotationChart(this.seriesList, {this.animate, Key key})
|
const LineLineAnnotationChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and line annotations.
|
/// Creates a [LineChart] with sample data and line annotations.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PointsLineChart extends StatelessWidget {
|
class PointsLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PointsLineChart(this.seriesList, {this.animate, Key key})
|
const PointsLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LineRangeAnnotationChart extends StatelessWidget {
|
class LineRangeAnnotationChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LineRangeAnnotationChart(this.seriesList, {this.animate, Key key})
|
const LineRangeAnnotationChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and range annotations.
|
/// Creates a [LineChart] with sample data and range annotations.
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LineRangeAnnotationMarginChart extends StatelessWidget {
|
class LineRangeAnnotationMarginChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const LineRangeAnnotationMarginChart(this.seriesList, {this.animate, Key key})
|
const LineRangeAnnotationMarginChart(this.seriesList,
|
||||||
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and range annotations.
|
/// Creates a [LineChart] with sample data and range annotations.
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SegmentsLineChart extends StatelessWidget {
|
class SegmentsLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SegmentsLineChart(this.seriesList, {this.animate, Key key})
|
const SegmentsLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
@@ -227,7 +227,7 @@ class SegmentsLineChart extends StatelessWidget {
|
|||||||
class LinearSales {
|
class LinearSales {
|
||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int sales;
|
||||||
final List<int> dashPattern;
|
final List<int>? dashPattern;
|
||||||
final double strokeWidthPx;
|
final double strokeWidthPx;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx);
|
LinearSales(this.year, this.sales, this.dashPattern, this.strokeWidthPx);
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimpleLineChart extends StatelessWidget {
|
class SimpleLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleLineChart(this.seriesList, {this.animate, Key key})
|
const SimpleLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimpleNullsLineChart extends StatelessWidget {
|
class SimpleNullsLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleNullsLineChart(this.seriesList, {this.animate, Key key})
|
const SimpleNullsLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
@@ -174,7 +174,7 @@ class SimpleNullsLineChart extends StatelessWidget {
|
|||||||
/// Sample linear data type.
|
/// Sample linear data type.
|
||||||
class LinearSales {
|
class LinearSales {
|
||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int? sales;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales);
|
LinearSales(this.year, this.sales);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class StackedAreaLineChart extends StatelessWidget {
|
class StackedAreaLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedAreaLineChart(this.seriesList, {this.animate, Key key})
|
const StackedAreaLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class StackedAreaCustomColorLineChart extends StatelessWidget {
|
class StackedAreaCustomColorLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedAreaCustomColorLineChart(this.seriesList,
|
const StackedAreaCustomColorLineChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class StackedAreaNullsLineChart extends StatelessWidget {
|
class StackedAreaNullsLineChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const StackedAreaNullsLineChart(this.seriesList, {this.animate, Key key})
|
const StackedAreaNullsLineChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [LineChart] with sample data and no transition.
|
/// Creates a [LineChart] with sample data and no transition.
|
||||||
@@ -186,7 +186,7 @@ class StackedAreaNullsLineChart extends StatelessWidget {
|
|||||||
/// Sample linear data type.
|
/// Sample linear data type.
|
||||||
class LinearSales {
|
class LinearSales {
|
||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int? sales;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales);
|
LinearSales(this.year, this.sales);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import 'home.dart';
|
|||||||
|
|
||||||
/// The main gallery app widget.
|
/// The main gallery app widget.
|
||||||
class GalleryApp extends StatefulWidget {
|
class GalleryApp extends StatefulWidget {
|
||||||
const GalleryApp({Key key}) : super(key: key);
|
const GalleryApp({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
GalleryAppState createState() => GalleryAppState();
|
GalleryAppState createState() => GalleryAppState();
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DonutAutoLabelChart extends StatelessWidget {
|
class DonutAutoLabelChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DonutAutoLabelChart(this.seriesList, {this.animate, Key key})
|
const DonutAutoLabelChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [PieChart] with sample data and no transition.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DonutPieChart extends StatelessWidget {
|
class DonutPieChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const DonutPieChart(this.seriesList, {this.animate, Key key})
|
const DonutPieChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [PieChart] with sample data and no transition.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class GaugeChart extends StatelessWidget {
|
class GaugeChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, String>> seriesList;
|
||||||
final bool animate;
|
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.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
factory GaugeChart.withSampleData() {
|
factory GaugeChart.withSampleData() {
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PieOutsideLabelChart extends StatelessWidget {
|
class PieOutsideLabelChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PieOutsideLabelChart(this.seriesList, {this.animate, Key key})
|
const PieOutsideLabelChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [PieChart] with sample data and no transition.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PartialPieChart extends StatelessWidget {
|
class PartialPieChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const PartialPieChart(this.seriesList, {this.animate, Key key})
|
const PartialPieChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [PieChart] with sample data and no transition.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimplePieChart extends StatelessWidget {
|
class SimplePieChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, int>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimplePieChart(this.seriesList, {this.animate, Key key})
|
const SimplePieChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [PieChart] with sample data and no transition.
|
/// Creates a [PieChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ScatterPlotAnimationZoomChart extends StatelessWidget {
|
class ScatterPlotAnimationZoomChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ScatterPlotAnimationZoomChart(this.seriesList, {this.animate, Key key})
|
const ScatterPlotAnimationZoomChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class BucketingAxisScatterPlotChart extends StatelessWidget {
|
class BucketingAxisScatterPlotChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const BucketingAxisScatterPlotChart(this.seriesList, {this.animate, Key key})
|
const BucketingAxisScatterPlotChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ComparisonPointsScatterPlotChart extends StatelessWidget {
|
class ComparisonPointsScatterPlotChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ComparisonPointsScatterPlotChart(this.seriesList,
|
const ComparisonPointsScatterPlotChart(this.seriesList,
|
||||||
{this.animate, Key key})
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ShapesScatterPlotChart extends StatelessWidget {
|
class ShapesScatterPlotChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const ShapesScatterPlotChart(this.seriesList, {this.animate, Key key})
|
const ShapesScatterPlotChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
@@ -196,9 +196,9 @@ class LinearSales {
|
|||||||
final int year;
|
final int year;
|
||||||
final int sales;
|
final int sales;
|
||||||
final double radius;
|
final double radius;
|
||||||
final String shape;
|
final String? shape;
|
||||||
final charts.Color fillColor;
|
final charts.Color? fillColor;
|
||||||
final double strokeWidth;
|
final double? strokeWidth;
|
||||||
|
|
||||||
LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor,
|
LinearSales(this.year, this.sales, this.radius, this.shape, this.fillColor,
|
||||||
this.strokeWidth);
|
this.strokeWidth);
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimpleScatterPlotChart extends StatelessWidget {
|
class SimpleScatterPlotChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, num>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const SimpleScatterPlotChart(this.seriesList, {this.animate, Key key})
|
const SimpleScatterPlotChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
/// Creates a [ScatterPlotChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TimeSeriesConfidenceInterval extends StatelessWidget {
|
class TimeSeriesConfidenceInterval extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const TimeSeriesConfidenceInterval(this.seriesList, {this.animate, Key key})
|
const TimeSeriesConfidenceInterval(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class EndPointsAxisTimeSeriesChart extends StatelessWidget {
|
class EndPointsAxisTimeSeriesChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const EndPointsAxisTimeSeriesChart(this.seriesList, {this.animate, Key key})
|
const EndPointsAxisTimeSeriesChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TimeSeriesLineAnnotationChart extends StatelessWidget {
|
class TimeSeriesLineAnnotationChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const TimeSeriesLineAnnotationChart(this.seriesList, {this.animate, Key key})
|
const TimeSeriesLineAnnotationChart(this.seriesList, {this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
@@ -28,10 +28,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TimeSeriesRangeAnnotationChart extends StatelessWidget {
|
class TimeSeriesRangeAnnotationChart extends StatelessWidget {
|
||||||
final List<charts.Series> seriesList;
|
final List<charts.Series<dynamic, DateTime>> seriesList;
|
||||||
final bool animate;
|
final bool? animate;
|
||||||
|
|
||||||
const TimeSeriesRangeAnnotationChart(this.seriesList, {this.animate, Key key})
|
const TimeSeriesRangeAnnotationChart(this.seriesList,
|
||||||
|
{this.animate, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
/// Creates a [TimeSeriesChart] with sample data and no transition.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user