Line data Source code
1 23 : enum Location { 2 : usEast, 3 : euWest, 4 : singapore, 5 : tokyo, 6 : } 7 : 8 : /// Convenient class Extension to on [Location] enum 9 : extension LocationX on Location { 10 : /// Convenient method Extension to generate [name] from [DummyAppUser] enum 11 2 : String? get name => { 12 : Location.usEast: 'us-east', 13 : Location.euWest: 'dublin', 14 : Location.singapore: 'singapore', 15 : Location.tokyo: 'tokyo', 16 1 : }[this]; 17 : }