Timespan.arround constructor

Timespan.arround(
  1. DateTime time,
  2. Duration delta
)

Get a symmetric Timespan arround the given time with delta as the difference of begin and end from time thus the duration of the timespan is 2 * delta

Implementation

factory Timespan.arround(DateTime time, Duration delta) =>
    Timespan(begin: time.subtract(delta), end: time.add(delta));