fromMap static method

ShakeFormComponent? fromMap(
  1. Map data
)

Converts map to object.

Implementation

static ShakeFormComponent? fromMap(Map data) {
  var type = data['type'];
  switch (type) {
    case 'title':
      return ShakeTitle.fromMap(data);
    case 'text_input':
      return ShakeTextInput.fromMap(data);
    case 'email':
      return ShakeEmail.fromMap(data);
    case 'picker':
      return ShakePicker.fromMap(data);
    case 'inspect':
      return ShakeInspectButton.fromMap(data);
    case 'attachments':
      return ShakeAttachments.fromMap(data);
  }
  return null;
}