mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 06:48:26 +00:00
web/charts: Migrate to null safety (#921)
This commit is contained in:
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DonutAutoLabelChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, int>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const DonutAutoLabelChart(this.seriesList, {this.animate, Key key})
|
||||
const DonutAutoLabelChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
|
||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DonutPieChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, int>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const DonutPieChart(this.seriesList, {this.animate, Key key})
|
||||
const DonutPieChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
|
||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GaugeChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, String>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const GaugeChart(this.seriesList, {this.animate, Key key}) : super(key: key);
|
||||
const GaugeChart(this.seriesList, {this.animate, Key? key}) : super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
factory GaugeChart.withSampleData() {
|
||||
|
||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PieOutsideLabelChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, int>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const PieOutsideLabelChart(this.seriesList, {this.animate, Key key})
|
||||
const PieOutsideLabelChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
|
||||
@@ -22,10 +22,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PartialPieChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, int>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const PartialPieChart(this.seriesList, {this.animate, Key key})
|
||||
const PartialPieChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
|
||||
@@ -21,10 +21,10 @@ import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SimplePieChart extends StatelessWidget {
|
||||
final List<charts.Series> seriesList;
|
||||
final bool animate;
|
||||
final List<charts.Series<dynamic, int>> seriesList;
|
||||
final bool? animate;
|
||||
|
||||
const SimplePieChart(this.seriesList, {this.animate, Key key})
|
||||
const SimplePieChart(this.seriesList, {this.animate, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
/// Creates a [PieChart] with sample data and no transition.
|
||||
|
||||
Reference in New Issue
Block a user