duration method

Offer duration(
  1. Duration duration
)

Determine the duration of the LicenseRecord applied to this Offer.

This method calculates the LicenseRecord.expiry date by adding the specified time interval to the current date, and returns the [Offer` object to enable convenient chaining of method calls during offer initialization.

Implementation

Offer duration(Duration duration) {
  _expiry = DateTime.now().add(duration);
  return this;
}