- Added `yesterday` and `tomorrow` extensions to `DateTime`

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2024-10-07 13:35:12 +02:00
parent 3f80193f36
commit 815f7a8425
4 changed files with 41 additions and 1 deletions
+6
View File
@@ -12,6 +12,12 @@ void main() {
debugPrint("$today"); // true
debugPrint("$notToday"); // false
final DateTime yesterday = DateTime(0).yesterday;
final DateTime tomorrow = DateTime(0).tomorrow;
debugPrint("Yesterday: $yesterday");
debugPrint("Tomorrow: $tomorrow");
// Strings
const String? nullString = null;
const String emptyString = " ";