14 lines
507 B
Dart
14 lines
507 B
Dart
/// Names that get a crown wherever a tab's customer name is shown.
|
|
const _royalNames = {'bram verhulst'};
|
|
|
|
bool isRoyalCustomer(String name) => _royalNames.contains(
|
|
name.trim().toLowerCase().replaceAll(RegExp(r'\s+'), ' '),
|
|
);
|
|
|
|
/// Display-only: never use the result as the stored customer name.
|
|
String customerDisplayName(String name) =>
|
|
isRoyalCustomer(name) ? '$name 👑' : name;
|
|
|
|
/// PINs that earn a raised eyebrow on the PIN pad.
|
|
bool isLazyPin(String pin) => pin == '1234' || pin == '0000';
|