setData method

void setData(
  1. double newData
)

Implementation

void setData(double newData) => data = newData;