Skip to content

Commit 45089ad

Browse files
TimWhitingjogboms
authored andcommitted
migrate to null-safety
1 parent 8147266 commit 45089ad

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.5.0-nullsafety.0
2+
- Upgraded to null-safe dart
3+
14
## 1.4.0
25

36
- Introduce `isToday` extension to `Duration`

lib/src/extensions.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ extension DateTimeTimeExtension on DateTime {
8888
}
8989

9090
DateTime copyWith({
91-
int year,
92-
int month,
93-
int day,
94-
int hour,
95-
int minute,
96-
int second,
97-
int millisecond,
98-
int microsecond,
91+
int? year,
92+
int? month,
93+
int? day,
94+
int? hour,
95+
int? minute,
96+
int? second,
97+
int? millisecond,
98+
int? microsecond,
9999
}) {
100100
return DateTime(
101101
year ?? this.year,

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: time
22
description: Type-safe DateTime and Duration calculations, powered by extensions.
3-
version: 1.4.0
3+
version: 1.5.0-nullsafety.0
44
homepage: https://github.com/jogboms/time.dart
55
author: Jogboms <[email protected]>
66

77
environment:
8-
sdk: '>=2.6.0 <3.0.0'
8+
sdk: ">=2.12.0-0 <3.0.0"
99

1010
dev_dependencies:
11-
pedantic: ^1.8.0
12-
test: ^1.9.0
11+
pedantic: ^1.10.0-nullsafety.3
12+
test: ^1.16.0-nullsafety.11
1313
test_coverage:
1414
git:
1515
url: https://github.com/jogboms/test-coverage.git

0 commit comments

Comments
 (0)