content: import 'package:flutter/material.dart';
  import 'package:flutter_slidable/flutter_slidable.dart';
  
  class TodoList extends StatelessWidget {
    final String taskName;
    final bool taskcompleted;
    Function(bool?)? onChanged;
    Function(BuildContext)? deleteFunction;
  
    TodoList(
        {super.key,
        required this.taskName,
        required this.taskcompleted,
        required this.onChanged,
        required this.deleteFunction});
  
    @override
    Widget build(BuildContext context) {
      return Padding(
        padding: const EdgeInsets.only(left: 25, right: 25, top: 25),
        child: Slidable(
          endActionPane: ActionPane(
            motion: StretchMotion(),
            children: [
              SlidableAction(
                onPressed: deleteFunction,
                icon: Icons.delete,
                backgroundColor: Color.fromARGB(255, 240, 61, 48),
                borderRadius: BorderRadius.circular(12),
              )
            ],
          ),
          child: Container(
            padding: const EdgeInsets.all(24),
            child: Row(
              children: [
                // checkbox work
                Checkbox(
                  value: taskcompleted,
                  onChanged: onChanged,
                  activeColor: Colors.white,
                  checkColor: Colors.black,
                ),
  
                //text work
                Text(
                  taskName,
                  style: TextStyle(
                    decoration: taskcompleted
                        ? TextDecoration.lineThrough
                        : TextDecoration.none,
                  ),
                ),
              ],
            ),
            decoration: BoxDecoration(
                color: Colors.deepPurple,
                borderRadius: BorderRadius.circular(12)),
          ),
        ),
      );
    }
  }
  