https://github.com/rickypid/flutter_scroll_shadow
Flutter widget to add shadow on scroll widgets
https://github.com/rickypid/flutter_scroll_shadow
animation dart flutter flutter-package flutter-widget
Last synced: 26 days ago
JSON representation
Flutter widget to add shadow on scroll widgets
- Host: GitHub
- URL: https://github.com/rickypid/flutter_scroll_shadow
- Owner: rickypid
- License: bsd-3-clause
- Created: 2021-04-30T07:54:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-14T09:16:25.000Z (5 months ago)
- Last Synced: 2025-05-07T04:03:52.476Z (26 days ago)
- Topics: animation, dart, flutter, flutter-package, flutter-widget
- Language: Dart
- Homepage: https://pub.dev/packages/flutter_scroll_shadow
- Size: 3.85 MB
- Stars: 11
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
#### flutter_scroll_shadow
# Scroll Shadow[](https://github.com/rickypid/flutter_scroll_shadow)
[](https://pub.dartlang.org/packages/flutter_scroll_shadow)
[](https://pub.dev/packages/flutter_scroll_shadow/score)
[](https://pub.dev/packages/flutter_scroll_shadow/score)[](https://github.com/rickypid/flutter_scroll_shadow/issues)
`ScrollShadow` is a widget for Flutter that adds shadows to a scrollable child.
Supports `ScrollController` and vertical or horizontal orientation.
|  |
| :------------: |
| **ScrollShadow** |## Features
* Adds shadows over a scrollable child while not at its max extents
* Supports vertical and horizontal `Axis`
* Customizable animation duration
* Determine how wide or tall shadows render
## Usage
Make sure to check out the [examples on GitHub](https://github.com/rickypid/flutter_scroll_shadow/tree/master/example).### Installation
Add the following line to `pubspec.yaml`:
```yaml
dependencies:
flutter_scroll_shadow:
```### Basic setup
*Complete example [available here](https://github.com/rickypid/flutter_scroll_shadow/blob/master/example/lib/main.dart).*```dart
ScrollShadow(
color: Colors.grey,
child: ListView(
children: List.generate(20, (index) => ListTile(title: Text('Element $index'),)),
),
);
```### Properties
* `color`: for the shadows; default: `Colors.grey`
* `size`: The width or height of shadows, depending on `Axis`; default: `15.0`
* `child`: Scrollable child contained by the `ScrollShadow`
* `duration`: Milliseconds, as an `int,` for animation of shadow visibility changes; default: `300`
* `fadeInCurve`: The animation [Curve] to use for shadow appearance; default: `Curves.easeIn`
* `fadeOutCurve`: The animation [Curve] to use for shadow disappearance; default: `Curves.easeOut`
* `ignoreInteraction`: Determines if shadow is wrapped inside a [IgnorePointer] widget, so that all touch events with the shadow will be ignored; default: `true`
## Example
 | 
:-:| :-:
**Vertically-scrolling child** | **Horizontally-scrolling child**## 📚 My open source projects
### Flutter
| Package | Verison | Score | Likes | Test | Coverage |
|--|--|--|--|--|--|
| [](https://github.com/rickypid/flutter_expandable_table) | [](https://pub.dartlang.org/packages/flutter_expandable_table) | [](https://pub.dev/packages/flutter_expandable_table/score) | [](https://pub.dev/packages/flutter_expandable_table/score) | | |
| [](https://github.com/rickypid/widget_tree_depth_counter) | [](https://pub.dartlang.org/packages/widget_tree_depth_counter) | [](https://pub.dev/packages/widget_tree_depth_counter/score) | [](https://pub.dev/packages/widget_tree_depth_counter/score) | | |
| [](https://github.com/rickypid/flutter_scroll_shadow) | [](https://pub.dartlang.org/packages/flutter_scroll_shadow) | [](https://pub.dev/packages/flutter_scroll_shadow/score) | [](https://pub.dev/packages/flutter_scroll_shadow/score) | | |
| [](https://github.com/rickypid/flutter_bargraph) | [](https://pub.dartlang.org/packages/flutter_bargraph) | [](https://pub.dev/packages/flutter_bargraph/score) | [](https://pub.dev/packages/flutter_bargraph/score) | | |### Dart
| Package | Verison | Score | Likes | Test | Coverage |
|--|--|--|--|--|--|
| [](https://github.com/rickypid/cowsay) | [](https://pub.dartlang.org/packages/cowsay) | [](https://pub.dev/packages/cowsay/score) | [](https://pub.dev/packages/cowsay/score) | [](https://github.com/rickypid/cowsay/actions/workflows/test.yml) | [](https://codecov.io/gh/rickypid/cowsay) |
| [](https://github.com/rickypid/telegram_link) | [](https://pub.dartlang.org/packages/telegram_link) | [](https://pub.dev/packages/telegram_link/score) | [](https://pub.dev/packages/telegram_link/score) | [](https://github.com/rickypid/telegram_link/actions/workflows/test.yml) | [](https://codecov.io/gh/rickypid/telegram_link) |