Added api for custom timetable events

This commit is contained in:
2024-02-12 01:00:12 +01:00
parent 3eae5ba10a
commit 22db412e75
36 changed files with 849 additions and 229 deletions

View File

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
extension TimeOfDayExt on TimeOfDay {
bool isBefore(TimeOfDay other) {
return hour < other.hour && minute < other.minute;
}
bool isAfter(TimeOfDay other) {
return hour > other.hour && minute > other.minute;
}
TimeOfDay add({int hours = 0, int minutes = 0}) {
return replacing(hour: hour + hours, minute: minute + minutes);
}
}