animated_card 2.0.0 copy "animated_card: ^2.0.0" to clipboard
animated_card: ^2.0.0 copied to clipboard

Package to animate the initialization of any widget, with the possibility of using a custom dismissible.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animated Card Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: ListagemScreen(),
    );
  }
}

class ListagemScreen extends StatelessWidget {
  final lista = List.generate(50, (index) => index);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("List Animation Example")),
      body: ListView.builder(
        itemCount: lista.length,
        itemBuilder: (context, index) {
          return AnimatedCard(
            direction: AnimatedCardDirection.left, //Initial animation direction
            initDelay: Duration(milliseconds: 0), //Delay to initial animation
            duration: Duration(seconds: 1), //Initial animation duration
            onRemove: () => lista.removeAt(index), //Implement this action to active dismiss
            curve: Curves.bounceOut, //Animation curve
            child: Container(
              padding: EdgeInsets.symmetric(horizontal: 10),
              child: Card(
                elevation: 5,
                child: ListTile(
                  title: Container(
                    height: 150,
                    child: Center(child: Text("$index")),
                  ),
                ),
              ),
            ),
          );
        },
      ),
    );
  }
}
66
likes
130
pub points
86%
popularity

Publisher

unverified uploader

Package to animate the initialization of any widget, with the possibility of using a custom dismissible.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animated_card