update<T> method

void update<T>(
  1. String dataKey, {
  2. T? data,
  3. bool refresh = true,
})

Implementation

void update<T>(String dataKey, {T? data, bool refresh = true}) {
  print('> MixinWithWireData -> update(${dataKey}): $data - ${data.runtimeType}');
  if (data != null) {
    Wire.data<T>(dataKey, value: data);
  } else if (refresh) {
    Wire.data<T>(dataKey).refresh();
  }
}