flutter_scroll_shadow 1.2.3 copy "flutter_scroll_shadow: ^1.2.3" to clipboard
flutter_scroll_shadow: ^1.2.3 copied to clipboard

ScrollShadow adds shadows to a scrollable child. Supports ScrollController and vertical or horizontal orientation.

example/lib/main.dart

// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_scroll_shadow/flutter_scroll_shadow.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ScrollShadow Example',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
            '   Vertical                    |                    Horizontal'),
        centerTitle: true,
      ),
      body: Row(
        children: [
          // Vertically-scrolling child
          Expanded(
            child: ScrollShadow(
              color: Colors.grey,
              child: ListView(
                scrollDirection: Axis.vertical,
                children: List.generate(
                  15,
                  (index) => ListTile(title: Text('Element $index')),
                ),
              ),
            ),
          ),

          // Horizontally-scrolling child
          Expanded(
            child: ScrollShadow(
              color: Colors.grey,
              child: ListView(
                scrollDirection: Axis.horizontal,
                children: List.generate(
                  5,
                  (index) => SizedBox(
                    width: 100,
                    child: RotatedBox(
                      quarterTurns: 1,
                      child: Text('Element $index'),
                    ),
                  ),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
31
likes
160
pub points
90%
popularity

Publisher

verified publisherinsideapp.it

ScrollShadow adds shadows to a scrollable child. Supports ScrollController and vertical or horizontal orientation.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_scroll_shadow