diff options
| author | mirror <mirror@localhost> | 2026-11-22 08:41:00 +0900 |
|---|---|---|
| committer | mirror <mirror@localhost> | 2026-11-22 08:41:00 +0900 |
| commit | 449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch) | |
| tree | c131c3528c4d517f56e19b854a7453fedb097d40 /lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart | |
| download | aves-src-master.tar.gz aves-src-master.zip | |
Diffstat (limited to 'lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart')
| -rw-r--r-- | lib/widgets/common/basic/draggable_scrollbar/scroll_label.dart | 30 |
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, + ), + ), + ); + } +} |
