Member-only story
Flutter — ListView Sort Animation
Animate a list arrangement by ListItem property (Score board).
2 min readSep 14, 2021
This is made with the implicitly_animated_reorderable_list package. The package also comes with a list which is manually reorderable as well.
import 'package:flutter/material.dart';
import 'package:implicitly_animated_reorderable_list/implicitly_animated_reorderable_list.dart';
import 'package:implicitly_animated_reorderable_list/transitions.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
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> {
List<ListItem> listItems = _listItems;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('ImplicitlyAnimatedList…