fromMap static method

ShakeSubmitAction fromMap(
  1. Map data
)

Converts map to object.

Implementation

static ShakeSubmitAction fromMap(Map data) {
  String title = data['title'] ?? '';
  String? titleRes = data['titleRes'];
  String subtitle = data['subtitle'] ?? '';
  String? subtitleRes = data['subtitleRes'];
  String icon = data['icon'] ?? '';
  String? iconRes = data['iconRes'];
  String type = data['type'] ?? '';

  ShakeSubmitAction action =
      ShakeSubmitAction(title: title, subtitle: subtitle, icon: icon);
  action.titleRes = titleRes;
  action.subtitleRes = subtitleRes;
  action.iconRes = iconRes;
  action.type = type;

  return action;
}