SemicircleThumb static method

Widget SemicircleThumb(
  1. Color backgroundColor,
  2. Color drawColor,
  3. double height,
  4. int index,
  5. bool alwaysVisibleScrollThumb,
  6. Animation<double> thumbAnimation,
)

Implementation

static Widget SemicircleThumb(
  Color backgroundColor,
  Color drawColor,
  double height,
  int index,
  bool alwaysVisibleScrollThumb,
  Animation<double> thumbAnimation,
) {
  final thumb = CustomPaint(
    foregroundPainter: _ArrowCustomPainter(drawColor),
    child: Material(
      elevation: 4.0,
      color: backgroundColor,
      borderRadius: BorderRadius.only(
        topLeft: Radius.circular(height),
        bottomLeft: Radius.circular(height),
        topRight: const Radius.circular(4.0),
        bottomRight: const Radius.circular(4.0),
      ),
      child: Container(
          constraints: BoxConstraints.tight(Size(height * 0.6, height))),
    ),
  );
  return alwaysVisibleScrollThumb
      ? thumb
      : SlideFadeTransition(animation: thumbAnimation, child: thumb);
}