Skip to content

Instantly share code, notes, and snippets.

@RobertApikyan
Created September 1, 2023 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertApikyan/b00e48d8f3761b8ce10328a3f9be9f4c to your computer and use it in GitHub Desktop.
Save RobertApikyan/b00e48d8f3761b8ce10328a3f9be9f4c to your computer and use it in GitHub Desktop.
import 'package:get/get.dart';
enum RealEstateConstructionType {
massive('MASSIVE'),
prefabricatedMassive('PREFABRICATED_MASSIVE'),
prefabricatedWooden('PREFABRICATED_WOODEN'),
lowEnergyHouse('LOW_ENERGY_HOUSE'),
passiveHouse('PASSIVE_HOUSE'),
zeroEnergyHouse('ZERO_ENERGY_HOUSE'),
panelConstruction('PANEL_CONSTRUCTION');
const RealEstateConstructionType(this.serverName);
final String serverName;
static RealEstateConstructionType? fromServerName(String? name) =>
RealEstateConstructionType.values.firstWhereOrNull(
(type) => type.serverName == name,
);
}
enum RealEstateType {
singleFamilyHouseIndependent('SINGLE_FAMILY_HOUSE_INDEPENDENT',
isHouse: true),
singleFamilyHouseGrannyAnnexe('SINGLE_FAMILY_HOUSE_GRANNY_ANNEXE',
isHouse: true),
twoFamilyHouse('TWO_FAMILY_HOUSE', isHouse: true),
semiDetachedHouse('SEMI_DETACHED_HOUSE', isHouse: true),
rowEndHouse('ROW_END_HOUSE', isHouse: true),
rowCenterHouse('ROW_CENTER_HOUSE', isHouse: true),
condominiumOwnerOccupied('CONDOMINIUM_OWNER_OCCUPIED', isHouse: false),
condominiumNonOwnerOccupied('CONDOMINIUM_NON_OWNER_OCCUPIED', isHouse: false);
const RealEstateType(this.serverName, {required this.isHouse});
final bool isHouse;
final String serverName;
static RealEstateType? fromServerName(String? name) =>
RealEstateType.values.firstWhereOrNull(
(type) => type.serverName == name,
);
}
enum RealEstateGarageType {
garage('GARAGE'),
doubleGarage('DOUBLE_GARAGE'),
undergroundGarage('UNDERGROUND_GARAGE'),
duplexParkingSlot('DUPLEX_PARKING_SLOT'),
parkingSlot('PARKING_SLOT'),
carPorts('CAR_PORTS');
const RealEstateGarageType(this.serverName);
final String serverName;
static RealEstateGarageType? fromServerName(String? name) =>
RealEstateGarageType.values.firstWhereOrNull(
(type) => type.serverName == name,
);
}
enum RealEstateAssessment {
veryGood('VERY_GOOD'),
good('GOOD'),
medium('MEDIUM'),
moderate('MODERATE'),
bad('BAD');
const RealEstateAssessment(this.serverName);
final String serverName;
static RealEstateAssessment? fromServerName(String? name) =>
RealEstateAssessment.values.firstWhereOrNull(
(type) => type.serverName == name,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment