NotifyingVector3.all constructor

NotifyingVector3.all(
  1. double v
)

Extension of the standard Vector3 class, implementing the ChangeNotifier functionality. This allows any interested party to be notified when the value of this vector changes.

This class can be used as a regular Vector3 class. However, if you do subscribe to notifications, don't forget to eventually unsubscribe in order to avoid resource leaks.

Direct modification of this vector's storage is not allowed.

Creates a vector with all components set to the same value.

Implementation

factory NotifyingVector3.all(double v) => NotifyingVector3.zero()..splat(v);