operator unary- method

Duration operator unary-()

Returns a new Duration representing this Duration negated.

The returned Duration has the same length as this one, but will have the opposite sign of this one.

Source

// Using subtraction helps dart2js avoid negative zeros.
Duration operator -() => new Duration._microseconds(0 - _duration);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/Duration/operator_unary_minus.html