fromJSON static method

PersonalStatus fromJSON(
  1. String data
)

Implementation

static PersonalStatus fromJSON(String data) {
	switch (data) {
		case "single":
			return PersonalStatus.single;
		case "in_couple":
			return PersonalStatus.inCouple;
		case "married":
			return PersonalStatus.married;
		case "separated":
			return PersonalStatus.separated;
		case "divorced":
			return PersonalStatus.divorced;
		case "divorcing":
			return PersonalStatus.divorcing;
		case "widowed":
			return PersonalStatus.widowed;
		case "widower":
			return PersonalStatus.widower;
		case "complicated":
			return PersonalStatus.complicated;
		case "unknown":
			return PersonalStatus.unknown;
		case "contract":
			return PersonalStatus.contract;
		case "other":
			return PersonalStatus.other;
		case "annulled":
			return PersonalStatus.annulled;
		case "polygamous":
			return PersonalStatus.polygamous;
		default:
			throw ArgumentError('Invalid PersonalStatus entry value $data');
		}
}