serialize method

  1. @override
String serialize()
override

Implementation

@override
String serialize() {
  final buffer = StringBuffer();
  buffer.write('BEGIN:VALARM\n');
  buffer.write('ACTION:${Heplers.camelToSnake(action.name).toUpperCase()}\n');
  buffer.write('TRIGGER:$trigger\n');
  if (description != null) buffer.write('DESCRIPTION:$description\n');
  if (duration != null) buffer.write('DURATION:$duration\n');
  if (repeat != null) buffer.write('REPEAT:$repeat\n');
  if (attach != null) buffer.write('ATTACH:$attach\n');
  buffer.write('END:VALARM');
  return buffer.toString();
}