buildScrollThumbAndLabel static method

Widget buildScrollThumbAndLabel({
  1. required Widget scrollThumb,
  2. required Color backgroundColor,
  3. required Animation<double> thumbAnimation,
  4. required Animation<double> labelAnimation,
  5. Widget? labelText,
  6. BoxConstraints? labelConstraints,
  7. required bool alwaysVisibleScrollThumb,
})

Implementation

static Widget buildScrollThumbAndLabel(
    {required Widget scrollThumb,
    required Color backgroundColor,
    required Animation<double> thumbAnimation,
    required Animation<double> labelAnimation,
    Widget? labelText,
    BoxConstraints? labelConstraints,
    required bool alwaysVisibleScrollThumb}) {
  final Widget scrollThumbAndLabel = labelText == null
      ? scrollThumb
      : Row(
          mainAxisSize: MainAxisSize.min,
          mainAxisAlignment: MainAxisAlignment.end,
          children: [
              _ScrollLabel(
                  animation: labelAnimation,
                  backgroundColor: backgroundColor,
                  constraints: labelConstraints,
                  child: labelText),
              scrollThumb,
            ]);

  if (alwaysVisibleScrollThumb) return scrollThumbAndLabel;
  return _SlideFadeTransition(
      animation: thumbAnimation, child: scrollThumbAndLabel);
}