update method
Map<String, dynamic>
update({
- required List<
double> value, - required BuildContext context,
- 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();
}
}