update method

Map<String, dynamic> update({
  1. required List<double> value,
  2. required BuildContext context,
  3. required DeviceType deviceType,
})

Implementation

Map<String, dynamic> update({
  required final List<double> value,
  required final BuildContext context,
  required final DeviceType deviceType,
}) {
  if (deviceType == DeviceType.phone) {
    return copyWith(margins: value).toJson();
  } else if (deviceType == DeviceType.tablet) {
    return copyWith(marginsTablet: value).toJson();
  } else {
    return copyWith(marginsDesktop: value).toJson();
  }
}