// Author: fengshengxiong
// Date: 2024/6/17
// Description: 列表滚动条

import 'package:flutter/material.dart';
import 'package:tone_snap/res/themes/app_colors.dart';

class BaseScrollbar extends StatelessWidget {
  const BaseScrollbar({
    super.key,
    required this.child,
    this.scrollController,
    this.thumbColor,
  });

  final Widget child;
  final Color? thumbColor;
  final ScrollController? scrollController;

  @override
  Widget build(BuildContext context) {
    return MediaQuery.removePadding(
      context: context,
      removeTop: true,
      removeBottom: true,
      child: RawScrollbar(
        controller: scrollController,
        thumbColor: thumbColor ?? seedColor,
        radius: const Radius.circular(8.0),
        thickness: 2.0,
        thumbVisibility: false,
        child: child,
      ),
    );
  }
}
