I have a task widget that I want to convert to a Event widget to place on a TableCalender. However when I try to create a toEvent function I am unable due to the package not importing the Event class. Why is Event not imported?
import 'package:flutter/material.dart';
import 'package:table_calendar/table_calendar.dart';
class Task {
late bool isComplete;
String name;
DateTime dueDate;
int priority;
Task({
required this.isComplete,
required this.name,
required this.dueDate,
required this.priority,
});
Event toEvent() {
return Event(
date: dueDate,
title: name,
icon: null,
dot: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.blue,
),
height: 5.0,
width: 5.0,
),
);
}
}
Thank you!!!
The table_calendar documentation is outdated and there is no longer the and event Class or and eventLoader.