hoursOnly property

int get hoursOnly

Returns the hours component of the Duration.

Example:

Duration(days: 1, hours: 2).hoursOnly; // 2

Implementation

int get hoursOnly => inHours.remainder(24);