You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
457 B
24 lines
457 B
enum UiDesign { |
|
MATERIAL, |
|
CUPERTINO, |
|
FLUENT, |
|
} |
|
|
|
extension UIName on UiDesign { |
|
String get userInterfaceName => (const { |
|
UiDesign.MATERIAL: 'Material', |
|
UiDesign.CUPERTINO: 'Cupertino', |
|
UiDesign.FLUENT: 'Fluent', |
|
})[this]!; |
|
} |
|
|
|
class UnmatchedUiDesignException implements Exception { |
|
final UiDesign uiDesign; |
|
|
|
UnmatchedUiDesignException(this.uiDesign); |
|
|
|
@override |
|
String toString() { |
|
return '$uiDesign was not matched'; |
|
} |
|
}
|
|
|