backgroundColor property

Color backgroundColor
final

Create a SfGaugeThemeData given a set of exact values. All the values must be specified.

This will rarely be used directly. It is used by lerp to create intermediate themes based on two themes created with the SfGaugeThemeData constructor.

Specifies the background color of gauge widgets.

Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(),
      body: Center(
        child: SfTheme(
          data: SfThemeData(
            gaugeThemeData: SfGaugeThemeData(
              backgroundColor: Colors.yellow
            )
          ),
          child: SfRadialGauge(),
        ),
      )
  );
}

Implementation

/// Specifies the background color of gauge widgets.
///
/// ```dart
/// Widget build(BuildContext context) {
///   return Scaffold(
///     appBar: AppBar(),
///       body: Center(
///         child: SfTheme(
///           data: SfThemeData(
///             gaugeThemeData: SfGaugeThemeData(
///               backgroundColor: Colors.yellow
///             )
///           ),
///           child: SfRadialGauge(),
///         ),
///       )
///   );
/// }
///```
final Color backgroundColor;