237 lines
5.9 KiB
Dart
237 lines
5.9 KiB
Dart
enum MenuSort {
|
|
nameAsc,
|
|
nameDesc,
|
|
timestampAsc,
|
|
timestampDesc,
|
|
}
|
|
|
|
enum ViewOrder {
|
|
swipedFirst,
|
|
matchedFirst,
|
|
swipedOnly,
|
|
matchedOnly,
|
|
}
|
|
|
|
enum Gender {
|
|
none,
|
|
male,
|
|
female,
|
|
divers;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case Gender.none:
|
|
return 'unknown';
|
|
case Gender.male:
|
|
return 'male';
|
|
case Gender.female:
|
|
return 'female';
|
|
case Gender.divers:
|
|
return 'diverse';
|
|
}
|
|
}
|
|
}
|
|
|
|
enum SkillOption {
|
|
product,
|
|
finance,
|
|
engineering,
|
|
design,
|
|
marketing,
|
|
management,
|
|
operations,
|
|
legal;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case SkillOption.product:
|
|
return 'Product Development';
|
|
case SkillOption.design:
|
|
return 'Design';
|
|
case SkillOption.engineering:
|
|
return 'Engineering';
|
|
case SkillOption.marketing:
|
|
return 'Sales and Marketing';
|
|
case SkillOption.finance:
|
|
return 'Finance';
|
|
case SkillOption.management:
|
|
return 'Management';
|
|
case SkillOption.operations:
|
|
return 'Operations';
|
|
case SkillOption.legal:
|
|
return 'Legal';
|
|
}
|
|
}
|
|
}
|
|
|
|
enum VisionOption {
|
|
marketLeader,
|
|
sustainableBusiness,
|
|
innovativeProduct,
|
|
exitStrategy;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case VisionOption.marketLeader:
|
|
return 'Become market leader';
|
|
case VisionOption.sustainableBusiness:
|
|
return 'Build a sustainable and ethical business';
|
|
case VisionOption.innovativeProduct:
|
|
return "Develop an innovative product that improves people's lives";
|
|
case VisionOption.exitStrategy:
|
|
return 'Pursue an exit strategy through sale or IPO';
|
|
}
|
|
}
|
|
}
|
|
|
|
enum AvailabilityOption {
|
|
lessThan10Hours,
|
|
tenTo20Hours,
|
|
twentyTo40Hours,
|
|
fullTime;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case AvailabilityOption.lessThan10Hours:
|
|
return 'Less than 10 hours';
|
|
case AvailabilityOption.tenTo20Hours:
|
|
return 'Part time (10 - 20 hours)';
|
|
case AvailabilityOption.twentyTo40Hours:
|
|
return 'Part time (20 - 40 hours)';
|
|
case AvailabilityOption.fullTime:
|
|
return 'Full time (40 hours or more)';
|
|
}
|
|
}
|
|
|
|
/// @returns [AvailabilityOption.lessThan10Hours] in case [str] is null or empty
|
|
static AvailabilityOption fromString(String? str) {
|
|
if (str == null || str.isEmpty) {
|
|
return AvailabilityOption.lessThan10Hours; // return a default value
|
|
}
|
|
return AvailabilityOption.values.firstWhere(
|
|
(x) => x.toString() == str,
|
|
orElse: () =>
|
|
throw ArgumentError('Invalid AvailabilityOption enum value: $str'),
|
|
);
|
|
}
|
|
}
|
|
|
|
enum WorkValueOption {
|
|
transparency,
|
|
innovation,
|
|
teamwork,
|
|
workLifeBalance;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case WorkValueOption.transparency:
|
|
return 'Transparency and openness';
|
|
case WorkValueOption.innovation:
|
|
return 'Innovation and creativity';
|
|
case WorkValueOption.teamwork:
|
|
return 'Teamwork and collaboration';
|
|
case WorkValueOption.workLifeBalance:
|
|
return 'Work-life balance';
|
|
}
|
|
}
|
|
}
|
|
|
|
enum CultureOption {
|
|
performanceOriented,
|
|
supportive,
|
|
flexible,
|
|
traditional;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case CultureOption.performanceOriented:
|
|
return 'Performance-oriented and competitive';
|
|
case CultureOption.supportive:
|
|
return 'Supportive and collegial';
|
|
case CultureOption.flexible:
|
|
return 'Flexible and adaptable';
|
|
case CultureOption.traditional:
|
|
return 'Traditional and structured';
|
|
}
|
|
}
|
|
|
|
/// @returns [CultureOption.traditional] in case [str] is null or empty
|
|
static CultureOption fromString(String? str) {
|
|
if (str == null || str.isEmpty) {
|
|
return CultureOption.traditional; // return a default value
|
|
}
|
|
return CultureOption.values.firstWhere(
|
|
(x) => x.toString() == str,
|
|
orElse: () =>
|
|
throw ArgumentError('Invalid CultureOption enum value: $str'),
|
|
);
|
|
}
|
|
}
|
|
|
|
enum CommunicationPreference {
|
|
daily,
|
|
weekly,
|
|
adhoc,
|
|
formal;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case CommunicationPreference.daily:
|
|
return 'Frequent updates and daily meetings';
|
|
case CommunicationPreference.weekly:
|
|
return 'Weekly summaries and updates';
|
|
case CommunicationPreference.adhoc:
|
|
return 'Ad-hoc communication as needed';
|
|
case CommunicationPreference.formal:
|
|
return 'Formal reports and documentation';
|
|
}
|
|
}
|
|
|
|
/// @returns [CommunicationPreference.daily] in case [str] is null or empty
|
|
static CommunicationPreference fromString(String? str) {
|
|
if (str == null || str.isEmpty) {
|
|
return CommunicationPreference.daily; // return a default value
|
|
}
|
|
return CommunicationPreference.values.firstWhere(
|
|
(x) => x.toString() == str,
|
|
orElse: () => throw ArgumentError(
|
|
'Invalid CommunicationPreference enum value: $str'),
|
|
);
|
|
}
|
|
}
|
|
|
|
enum RiskTolerance {
|
|
riskAverse,
|
|
cautious,
|
|
balanced,
|
|
adaptive,
|
|
riskTaker;
|
|
|
|
String get displayName {
|
|
switch (this) {
|
|
case RiskTolerance.riskAverse:
|
|
return 'Prefer avoiding risks whenever possible';
|
|
case RiskTolerance.cautious:
|
|
return 'Exercising caution to minimize potential losses';
|
|
case RiskTolerance.balanced:
|
|
return 'Neutral, carefully weighing potential opportunities and hazards';
|
|
case RiskTolerance.adaptive:
|
|
return 'Flexibly responding to changing risk scenarios';
|
|
case RiskTolerance.riskTaker:
|
|
return 'Proactively taking risks to maximize rewards';
|
|
}
|
|
}
|
|
|
|
/// @returns [RiskTolerance.balanced] in case [str] is null or empty
|
|
static RiskTolerance fromString(String? str) {
|
|
if (str == null || str.isEmpty) {
|
|
return RiskTolerance.balanced; // return a default value != null
|
|
}
|
|
return RiskTolerance.values.firstWhere(
|
|
(x) => x.toString() == str,
|
|
orElse: () =>
|
|
throw ArgumentError('Invalid RiskTolerance enum value: $str'),
|
|
);
|
|
}
|
|
}
|