color property

Color? color
final

The color to use when painting the line.

If this is null, then the DividerThemeData.color is used. If that is also null, then this defaults to ColorScheme.outlineVariant, or to ThemeData.dividerColor if ThemeData.useMaterial3 is false.

const Divider(
  color: Colors.deepOrange,
)

Implementation

// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// ```dart
/// const Divider(
///   color: Colors.deepOrange,
/// )
/// ```
///
/// </callout-box>
final Color? color;