mirror of
https://github.com/flutter/samples.git
synced 2026-05-17 12:28:16 +00:00
web/charts: Migrate to null safety (#921)
This commit is contained in:
@@ -21,10 +21,11 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RTLBarChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, String>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const RTLBarChart(this.seriesList, {this.animate, Key key}) : super(key: key);
|
||||
const RTLBarChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [BarChart] with sample data and no transition.
|
||||
factory RTLBarChart.withSampleData() {
|
||||
|
||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RTLLineChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, num>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const RTLLineChart(this.seriesList, {this.animate, Key key})
|
||||
const RTLLineChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [LineChart] with sample data and no transition.
|
||||
|
||||
@@ -32,10 +32,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RTLLineSegments extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, num>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const RTLLineSegments(this.seriesList, {this.animate, Key key})
|
||||
const RTLLineSegments(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [LineChart] with sample data and no transition.
|
||||
@@ -242,7 +242,7 @@ class RTLLineSegments extends StatelessWidget {
|
||||
class LinearSales {
|
||||
final int year;
|
||||
final int sales;
|
||||
final List<int> dashPattern;
|
||||
final List<int>? dashPattern;
|
||||
final double 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';
|
||||
|
||||
class RTLSeriesLegend extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, String>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const RTLSeriesLegend(this.seriesList, {this.animate, Key key})
|
||||
const RTLSeriesLegend(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [BarChart] with sample data and no transition.
|
||||
|
||||
Reference in New Issue
Block a user