Adds a secondary copy method
This commit is contained in:
parent
5f9f0e08ef
commit
dd40eace38
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ class Time {
|
||||||
this.seconds = seconds;
|
this.seconds = seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Time copy() {
|
||||||
|
return Time(hours: hours, minutes: minutes, seconds: seconds);
|
||||||
|
}
|
||||||
|
|
||||||
factory Time.copy(Time other) {
|
factory Time.copy(Time other) {
|
||||||
return Time(
|
return Time(
|
||||||
hours: other.hours, minutes: other.minutes, seconds: other.seconds);
|
hours: other.hours, minutes: other.minutes, seconds: other.seconds);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue