Closed jnelle closed 2 years ago
Hi, I've added a metadata attribute that gives the possibility to add more data for an event
I thought it's good especially if you want save some informations about a specific event. For example, I'm using it to save some user ids and the event id
extension MyScheduleConversion on Appointment {
NeatCleanCalendarEvent convertToCalendarEvent(
{required String name,
required String trainerId,
required String trainerName}) =>
NeatCleanCalendarEvent(
name,
startTime: startTime!.toLocal(),
endTime: endTime!.toLocal(),
location: '${location!.street}, ${location!.city}',
description: '$description mit $trainerName',
color: ColorName.secondaryColor,
metadata: <String, dynamic>{
'id': id,
'trainer_id': trainerId,
'is_appointment': true,
'invitor_id': invitorId,
},
);
}
That's fine. I see your point. Makes sense. Thank's for contributing.
I thought it's good especially if you want save some informations about a specific event. For example, I'm using it to save some user ids and the event id
extension MyScheduleConversion on Appointment { NeatCleanCalendarEvent convertToCalendarEvent( {required String name, required String trainerId, required String trainerName}) => NeatCleanCalendarEvent( name, startTime: startTime!.toLocal(), endTime: endTime!.toLocal(), location: '${location!.street}, ${location!.city}', description: '$description mit $trainerName', color: ColorName.secondaryColor, metadata: <String, dynamic>{ 'id': id, 'trainer_id': trainerId, 'is_appointment': true, 'invitor_id': invitorId, }, ); }
Hi, metadata field don't preserves when the event starts and ends on different day, because in this case the _updateEventsMap method create a new class without metadata field
Any solution for the it?
@rwbr I‘ll check it later
Signed-off-by: jnelle jimmy@nelle.sh