Skip to content

Instantly share code, notes, and snippets.

Created Oct 7, 2021
What would you like to do?
class TodoItemWidget extends StatefulWidget {
final Todo todo;
final Animation<double> animation; // <-- Here
final Function onClicked;
const TodoItemWidget(
{Key? key,
required this.todo,
required this.animation, // <-- Here
required this.onClicked})
: super(key: key);
State<TodoItemWidget> createState() => _TodoItemWidgetState();
class _TodoItemWidgetState extends State<TodoItemWidget> {
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 0.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
child: CheckboxListTile(
onChanged: (value) => widget.onClicked(value),
value: widget.todo.isCompleted,
title: Text(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment