A time scheduler for Android & IOS where you can create events by clicking on cells, edit (update) and delete the events you have created. You can assign colours to events and if the name of the event is too long, you can see the full name and description by long pressing on the event.
![](https://private-user-images.githubusercontent.com/120099096/293045218-27177563-81d0-49ca-9765-87b52c39a8bd.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTg3MTgsIm5iZiI6MTcyNTU1ODQxOCwicGF0aCI6Ii8xMjAwOTkwOTYvMjkzMDQ1MjE4LTI3MTc3NTYzLTgxZDAtNDljYS05NzY1LTg3YjUyYzM5YThiZC5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQxNzQ2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNDJjYTVmNGRkNjQyNDc5OTU1NjFiNzg3ZmVlMjExNjAzNDBhMjkxMGU0MGY3NDY1M2FlOWEyOGVjZWVmMDI2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.DUJKs2Dly_Q5o2U9VVqthzUMWhSNesu6RDVoMIAJFlc)
![](https://private-user-images.githubusercontent.com/120099096/293045264-c909575d-4292-45e3-95e0-ecf59cd92092.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAi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9.KbHwF8EWE6125gLGyhpSxtbRBICnyQBssQR9_i0EcaY)
![](https://private-user-images.githubusercontent.com/120099096/293045355-8179e42e-a57e-42f8-aed2-693998af9692.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTg3MTgsIm5iZiI6MTcyNTU1ODQxOCwicGF0aCI6Ii8xMjAwOTkwOTYvMjkzMDQ1MzU1LTgxNzllNDJlLWE1N2UtNDJmOC1hZWQyLTY5Mzk5OGFmOTY5Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQxNzQ2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMzc3ZjUzNjA4MWQxNzc0Yjk3NjMyOGFlNTI5NmE3MGZmZjQ0ZDQwMjM4NjY4Mzg1OTcyMjBlMGQ2M2IyM2VjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.oDAKHBHmhKWaZbv5S7o9mm1IJ0FTRBYJDJzzTo1gScY)
![](https://private-user-images.githubusercontent.com/120099096/293045372-b56ee7c6-bfb9-4b25-9097-08a7239edc7d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTg3MTgsIm5iZiI6MTcyNTU1ODQxOCwicGF0aCI6Ii8xMjAwOTkwOTYvMjkzMDQ1MzcyLWI1NmVlN2M2LWJmYjktNGIyNS05MDk3LTA4YTcyMzllZGM3ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQxNzQ2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04M2IxNTgwYWM0NDJiZTJhMmEwNTcyMThjMGU5MmRjZDdjODdiY2E4ZWM3MmE3ZjY4OTMwMGZiNmY5ZTk4OTk0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.9suPoizpssEnTFApHfwx1WxGEinBIaLJIbZQMbhsR7I)
flutter pub add time_scheduler_table
Define a TextEditingController for event add and event update alerts:
TextEditingController textController = TextEditingController();
Create a list of event models with title, column index, row index and color.
The row and column index, specify the index of the elements in the column and row titles (Mon, Tue or 08:00, 09:00). They starts from 0:
List<EventModel> eventList = [
EventModel(
title: "Math",
columnIndex: 0, // columnIndex is columnTitle's index (Monday : 0 or Day 1 : 0)
rowIndex: 2, // rowIndex is rowTitle's index (08:00 : 0 or Time 1 : 0)
color: Colors.orange,
),
EventModel(
title: "History",
columnIndex: 1,
rowIndex: 5,
color: Colors.pink,
),
EventModel(
title: "Guitar & Piano Course",
columnIndex: 4,
rowIndex: 8,
color: Colors.green,
),
EventModel(
title: "Meeting",
columnIndex: 3,
rowIndex: 1,
color: Colors.deepPurple,
),
EventModel(
title: "Guitar and Piano Course",
columnIndex: 2,
rowIndex: 9,
color: Colors.blue,
)
];
Create your Time Scheduler Widget:
TimeSchedulerTable(
cellHeight: 64,
cellWidth: 72,
columnTitles: const [ // You can assign any value to columnTitles. For Example : ['Column 1','Column 2','Column 3', ...]
"Mon",
"Tue",
"Wed",
"Thur",
"Fri",
"Sat",
"Sun"
],
currentColumnTitleIndex: DateTime.now().weekday - 1,
rowTitles: const [ // You can assign any value to rowTitles. For Example : ['Row 1','Row 2','Row 3', ...]
'08:00 - 09:00',
'09:00 - 10:00',
'10:00 - 11:00',
'11:00 - 12:00',
'12:00 - 13:00',
'13:00 - 14:00',
'14:00 - 15:00',
'15:00 - 16:00',
'16:00 - 17:00',
'17:00 - 18:00',
'18:00 - 19:00',
'19:00 - 20:00',
'20:00 - 21:00',
],
title: "Event Schedule",
titleStyle: const TextStyle(
fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black),
eventTitleStyle: const TextStyle(color: Colors.white, fontSize: 8),
isBack: false, // back button
eventList: eventList,
eventAlert: EventAlert(
alertTextController: textController,
borderRadius: const BorderRadius.all(
Radius.circular(12.0),
),
addAlertTitle: "Add Event",
editAlertTitle: "Edit",
addButtonTitle: "ADD",
deleteButtonTitle: "DELETE",
updateButtonTitle: "UPDATE",
hintText: "Event Name",
textFieldEmptyValidateMessage: "Cannot be empty!",
addOnPressed: (event) { // when an event added to your list
// Your code after event added.
},
updateOnPressed: (event) { // when an event updated from your list
// Your code after event updated.
},
deleteOnPressed: (event) { // when an event deleted from your list
// Your code after event deleted.
},
),
),
columnTitles
contain days or values that you define. It is not required.
The default value is :
["Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun"]
You can define it as you want. For Example:
columnTitles: const ["Column 1", "Column 2", "Column 3", ...],
currentColumnTitleIndex: 2,
If you define like this, selected column is 3 if currentColumnTitleIndex
is 2.
rowTitles
contain times or values that you define. It is not required.
The default value is :
[
'06:00 - 07:00',
'07:00 - 08:00',
'08:00 - 09:00',
'09:00 - 10:00',
'10:00 - 11:00',
'11:00 - 12:00',
'12:00 - 13:00',
'13:00 - 14:00',
'14:00 - 15:00',
'15:00 - 16:00',
'16:00 - 17:00',
'17:00 - 18:00',
'18:00 - 19:00',
'19:00 - 20:00',
'20:00 - 21:00',
'21:00 - 22:00',
'22:00 - 23:00',
'23:00 - 00:00',
],
You can define it as you want. For Example:
rowTitles: const ["Row 1", "Row 2", "Row 3", ...],
Thanks to Mesut Demir ☕