discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

tooltipFor method

String tooltipFor(
  1. TargetPlatform platform, {
  2. String control = 'Ctrl',
  3. String shift = 'Shift',
})

tooltip as it reads on platform; off macOS the modifiers are named control and shift (spec 14d L4: Strg in German).

Implementation

String tooltipFor(TargetPlatform platform,
    {String control = 'Ctrl', String shift = 'Shift'}) {
  if (shortcuts.isEmpty) return label;
  final chord = shortcuts.first;
  final key = chord.trigger.keyLabel;
  final glyph = platform == TargetPlatform.macOS
      ? '⌘${chord.shift ? '⇧' : ''}$key'
      : '$control+${chord.shift ? '$shift+' : ''}$key';
  return '$label ($glyph)';
}