ScrollbarThemeData constructor Null safety

const ScrollbarThemeData(
  1. {MaterialStateProperty<bool?>? thumbVisibility,
  2. MaterialStateProperty<double?>? thickness,
  3. MaterialStateProperty<bool?>? trackVisibility,
  4. Radius? radius,
  5. MaterialStateProperty<Color?>? thumbColor,
  6. MaterialStateProperty<Color?>? trackColor,
  7. MaterialStateProperty<Color?>? trackBorderColor,
  8. double? crossAxisMargin,
  9. double? mainAxisMargin,
  10. double? minThumbLength,
  11. bool? interactive,
  12. @Deprecated('Use thumbVisibility instead. ' 'This feature was deprecated after v2.9.0-1.0.pre.') bool? isAlwaysShown,
  13. @Deprecated('Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. ' 'This feature was deprecated after v2.9.0-1.0.pre.') bool? showTrackOnHover}
)

Creates a theme that can be used for ThemeData.scrollbarTheme.

Implementation

const ScrollbarThemeData({
  this.thumbVisibility,
  this.thickness,
  this.trackVisibility,
  this.radius,
  this.thumbColor,
  this.trackColor,
  this.trackBorderColor,
  this.crossAxisMargin,
  this.mainAxisMargin,
  this.minThumbLength,
  this.interactive,
  @Deprecated(
    'Use thumbVisibility instead. '
    'This feature was deprecated after v2.9.0-1.0.pre.',
  )
  this.isAlwaysShown,
  @Deprecated(
    'Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. '
    'This feature was deprecated after v2.9.0-1.0.pre.',
  )
  this.showTrackOnHover,
}) : assert(
       isAlwaysShown == null || thumbVisibility == null,
       'Scrollbar thumb appearance should only be controlled with thumbVisibility, '
       'isAlwaysShown is deprecated.'
     );