Files
swiftcontrol/lib/utils/keymap/apps/biketerra.dart
Jonas Bark 08914aff7e feat(config): link to each trainer app's official site from the chooser
The trainer-app picker now shows an external-link button next to every app
that has an official site, opening it in the browser. Adds an officialUrl to
SupportedApp with per-app overrides (Strappo, MyWhoosh, Rouvy, Zwift,
TrainingPeaks Virtual, Biketerra, BikeControl, OpenBikeControl).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 12:52:23 +02:00

77 lines
2.4 KiB
Dart

import 'package:bike_control/utils/keymap/apps/supported_app.dart';
import 'package:dartx/dartx.dart';
import 'package:flutter/services.dart';
import '../buttons.dart';
import '../keymap.dart';
class Biketerra extends SupportedApp {
@override
String? get officialUrl => 'https://biketerra.com';
@override
String get helpSlug => 'biketerra';
@override
List<(AppConnectionMethod, ConnectionSupport)> get connections => [
(AppConnectionMethod.zwiftMdns, ConnectionSupport.supported),
];
Biketerra()
: super(
name: 'Biketerra',
packageName: "Biketerra",
officialIntegration: false,
keymap: Keymap(
keyPairs: [
...ControllerButton.values
.filter((e) => e.action == InGameAction.shiftDown)
.map(
(b) => KeyPair(
buttons: [b],
physicalKey: PhysicalKeyboardKey.keyS,
logicalKey: LogicalKeyboardKey.keyS,
),
),
...ControllerButton.values
.filter((e) => e.action == InGameAction.shiftUp)
.map(
(b) => KeyPair(
buttons: [b],
physicalKey: PhysicalKeyboardKey.keyW,
logicalKey: LogicalKeyboardKey.keyW,
),
),
...ControllerButton.values
.filter((e) => e.action == InGameAction.navigateRight)
.map(
(b) => KeyPair(
buttons: [b],
physicalKey: PhysicalKeyboardKey.arrowRight,
logicalKey: LogicalKeyboardKey.arrowRight,
),
),
...ControllerButton.values
.filter((e) => e.action == InGameAction.navigateLeft)
.map(
(b) => KeyPair(
buttons: [b],
physicalKey: PhysicalKeyboardKey.arrowLeft,
logicalKey: LogicalKeyboardKey.arrowLeft,
),
),
...ControllerButton.values
.filter((e) => e.action == InGameAction.toggleUi)
.map(
(b) => KeyPair(
buttons: [b],
physicalKey: PhysicalKeyboardKey.keyU,
logicalKey: LogicalKeyboardKey.keyU,
),
),
],
),
);
}