map method

  1. @override
Map<String, dynamic> map(
  1. Logic input
)
override

Implementation

@override
Map<String, dynamic> map(Logic input) {
  var mapFromLogic = <String, dynamic>{};
  mapFromLogic["name"] = input.name;
  if (mapFromLogic["name"] == "CART") {
    mapFromLogic["data"] = {};
    mapFromLogic["data"]["cartItems"] =
        _cartItemListMapper.map(input.data["cartItems"]);
  } else {
    mapFromLogic["data"] = input.data;
  }
  mapFromLogic["variants"] = input.variants;

  return mapFromLogic;
}