child property Null safety

Widget child
final

Specifies a widget that can hold single child.

Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: SfTheme(
        data: SfThemeData(
          chartThemeData: SfChartThemeData(
            backgroundColor: Colors.grey,
            brightness: Brightness.dark
          )
        ),
        child: SfCartesianChart(
        )
      ),
    )
  );
}

Implementation

final Widget child;