animated_list_view_scroll 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 69

🌟 AnimatedListViewScroll #

Provides a listview with animation on the scroll

🎯 Installing #

dependencies:
  animated_list_view_scroll: any

📥 Import #

import 'package:animated_list_view_scroll/animated_list_view_scroll.dart';

🎮 How To Use #

AnimatedListViewScroll(
        itemCount: 1000, //REQUIRED
        itemHeight: 60, //REQUIRED (Total height of a single item must contains optional padding or margin)
        animationOnReverse: true,
        animationDuration: Duration(milliseconds: 200),
        itemBuilder: (context, index) {
          return AnimatedListViewItem(
            key: GlobalKey(), //REQUIRED
            index: index, //REQUIRED
            animationBuilder: (context, index, controller) {
              Animation<Offset> animation = Tween<Offset>(begin: Offset(1.0, 0.0), end: Offset.zero).animate(controller);
              return SlideTransition(
                position: animation,
                child: Container(
                  height: 60,
                  child: Card(
                    child: Text(index.toString()),
                  ),
                ),
              );
            },
          );
        },
      );

🚀 Showcase #

Example

🚧 Bugs/Requests #

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it. Pull request are also welcome.

❗ Note #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

📃 License #

Apache 2.0 License

[1.0.0] - 21/08/2019

  • First Release

[1.0.1] - 21/08/2019

  • Added example folder

[1.0.2] - 21/08/2019

  • Fixed description

example/lib/main.dart

import 'package:animated_list_view_scroll/animated_list_view_scroll.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'AnimatedListViewScroll Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("AnimatedListViewScroll Demo"),
      ),
      body: AnimatedListViewScroll(
        itemCount: 1000,
        itemHeight: 60,
        animationOnReverse: true,
        animationDuration: Duration(milliseconds: 200),
        itemBuilder: (context, index) {
          return AnimatedListViewItem(
            key: GlobalKey(),
            index: index,
            animationBuilder: (context, index, controller) {
              Animation<Offset> animation =
                  Tween<Offset>(begin: Offset(1.0, 0.0), end: Offset.zero)
                      .animate(controller);
              return SlideTransition(
                position: animation,
                child: Card(
                  child: Text(index.toString()),
                ),
              );
            },
          );
        },
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  animated_list_view_scroll: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:animated_list_view_scroll/animated_list_view_scroll.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
38
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test