CalseeKey.text constructor
CalseeKey.text(
- String text, {
- required KeyRole role,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- String? semanticLabel,
- double sizeFactor = 0.4,
- bool haptics = true,
- Key? key,
A key showing text in the theme's key font.
Implementation
factory CalseeKey.text(
String text, {
required KeyRole role,
VoidCallback? onPressed,
VoidCallback? onLongPress,
String? semanticLabel,
double sizeFactor = 0.4,
bool haptics = true,
Key? key,
}) => CalseeKey(
role: role,
semanticLabel: semanticLabel ?? text,
onPressed: onPressed,
onLongPress: onLongPress,
haptics: haptics,
artSeed: text.hashCode & 0x7FFFFFFF,
key: key,
builder: (context, style, shortSide) =>
CalseeKeyLabel(text, style: style, size: shortSide * sizeFactor),
);