summaryrefslogtreecommitdiff
path: root/lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart')
-rw-r--r--lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart b/lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart
new file mode 100644
index 0000000..e42c171
--- /dev/null
+++ b/lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart
@@ -0,0 +1,30 @@
+import 'package:flutter/material.dart';
+
+class ScrollLabel extends StatelessWidget {
+ final Animation<double> animation;
+ final Color backgroundColor;
+ final Widget child;
+
+ const ScrollLabel({
+ super.key,
+ required this.child,
+ required this.animation,
+ required this.backgroundColor,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return FadeTransition(
+ opacity: animation,
+ child: Container(
+ margin: const EdgeInsetsDirectional.only(end: 12.0),
+ child: Material(
+ elevation: 4.0,
+ color: backgroundColor,
+ borderRadius: const BorderRadius.all(Radius.circular(16)),
+ child: child,
+ ),
+ ),
+ );
+ }
+}