1
This commit is contained in:
@@ -1,21 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ScrollBox extends StatelessWidget {
|
||||
final ScrollController? scrollController;
|
||||
final Widget child;
|
||||
|
||||
const ScrollBox({super.key, required this.child});
|
||||
const ScrollBox({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.scrollController,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScrollbarTheme(
|
||||
data: ScrollbarThemeData(
|
||||
thumbColor: WidgetStateProperty.all(Theme.of(context).colorScheme.surfaceContainerHigh),
|
||||
thumbColor: WidgetStateProperty.all(
|
||||
Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
),
|
||||
thickness: WidgetStateProperty.all(3),
|
||||
crossAxisMargin: 3,
|
||||
mainAxisMargin: 2,
|
||||
radius: const Radius.circular(5),
|
||||
),
|
||||
child: Scrollbar(
|
||||
controller: scrollController,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user