ElScrollbar constructor

const ElScrollbar({
  1. Key? key,
  2. required Widget child,
  3. ElScrollbarShowMode showMode = ElScrollbarShowMode.hover,
  4. ScrollController? controller,
  5. double thickness = 8.0,
  6. OutlinedBorder? shape,
  7. Radius radius = const Radius.circular(4.0),
  8. Radius? trackRadius,
  9. double mainAxisMargin = 0.0,
  10. double crossAxisMargin = 1.0,
  11. EdgeInsets? padding,
  12. double minThumbLength = 36.0,
  13. Color trackColor = Colors.transparent,
  14. Color trackBorderColor = Colors.transparent,
  15. bool paintSecondTrackBorder = false,
  16. double trackBorderWidth = 1.0,
  17. Color thumbColor = const Color.fromRGBO(144, 147, 153, .45),
  18. Color thumbActiveColor = const Color.fromRGBO(144, 147, 153, .9),
  19. bool ignorePointer = false,
  20. bool ignoreTrackPointer = false,
  21. Duration fadeDuration = const Duration(milliseconds: 200),
  22. Duration timeToFade = const Duration(milliseconds: 1000),
  23. Duration trackScrollDuration = const Duration(milliseconds: 350),
  24. ScrollbarOrientation? scrollbarOrientation,
  25. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
})

Element UI 滚动条,由于可以通过 ScrollConfiguration 配置默认滚动条,所以并未提供 ThemeData 配置

Implementation

const ElScrollbar({
  super.key,
  required this.child,
  this.showMode = ElScrollbarShowMode.hover,
  this.controller,
  this.thickness = 8.0,
  this.shape,
  this.radius = const Radius.circular(4.0),
  this.trackRadius,
  this.mainAxisMargin = 0.0,
  this.crossAxisMargin = 1.0,
  this.padding,
  this.minThumbLength = 36.0,
  this.trackColor = Colors.transparent,
  this.trackBorderColor = Colors.transparent,
  this.paintSecondTrackBorder = false,
  this.trackBorderWidth = 1.0,
  this.thumbColor = const Color.fromRGBO(144, 147, 153, .45),
  this.thumbActiveColor = const Color.fromRGBO(144, 147, 153, .9),
  this.ignorePointer = false,
  this.ignoreTrackPointer = false,
  this.fadeDuration = const Duration(milliseconds: 200),
  this.timeToFade = const Duration(milliseconds: 1000),
  this.trackScrollDuration = const Duration(milliseconds: 350),
  this.scrollbarOrientation,
  this.notificationPredicate = defaultScrollNotificationPredicate,
});