File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value
samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,10 @@ class Date implements Comparable<Date> {
24
24
/// Convert to a [DateTime].
25
25
DateTime toDateTime({ bool utc = false } ) {
26
26
if (utc) {
27
- DateTime.utc(year, month, day);
27
+ return DateTime.utc(year, month, day);
28
+ } else {
29
+ return DateTime(year, month, day);
28
30
}
29
- return DateTime(year, month, day);
30
31
}
31
32
32
33
@override
@@ -66,4 +67,4 @@ class Date implements Comparable<Date> {
66
67
67
68
extension DateTimeToDate on DateTime {
68
69
Date toDate() => Date(year, month, day);
69
- }
70
+ }
Original file line number Diff line number Diff line change @@ -24,9 +24,10 @@ class Date implements Comparable<Date> {
24
24
/// Convert to a [DateTime] .
25
25
DateTime toDateTime ({bool utc = false }) {
26
26
if (utc) {
27
- DateTime .utc (year, month, day);
27
+ return DateTime .utc (year, month, day);
28
+ } else {
29
+ return DateTime (year, month, day);
28
30
}
29
- return DateTime (year, month, day);
30
31
}
31
32
32
33
@override
@@ -66,4 +67,4 @@ class Date implements Comparable<Date> {
66
67
67
68
extension DateTimeToDate on DateTime {
68
69
Date toDate () => Date (year, month, day);
69
- }
70
+ }
You can’t perform that action at this time.
0 commit comments