From b291f59e107a2194bccd08558e17f2684e6788eb Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Thu, 11 Dec 2025 22:55:54 +0100 Subject: [PATCH 1/9] change icons --- lib/widgets/menu.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/widgets/menu.dart b/lib/widgets/menu.dart index cfb6638..4f8d8cd 100644 --- a/lib/widgets/menu.dart +++ b/lib/widgets/menu.dart @@ -116,10 +116,7 @@ List buildMenuButtons(BuildContext context, VoidCallback? openLogs) { child: Text('Facebook'), ), MenuButton( - leading: Padding( - padding: const EdgeInsets.symmetric(horizontal: 3.0), - child: Text('G'), - ), + leading: Icon(RadixIcons.githubLogo), onPressed: (c) { launchUrlString('https://github.com/jonasbark/swiftcontrol/issues'); }, @@ -162,10 +159,7 @@ List buildMenuButtons(BuildContext context, VoidCallback? openLogs) { child: const Text('Facebook'), ), OutlineButton( - leading: Padding( - padding: const EdgeInsets.symmetric(horizontal: 3.0), - child: Text('G'), - ), + leading: Icon(RadixIcons.githubLogo), onPressed: () { Navigator.pop(context); launchUrlString('https://github.com/jonasbark/swiftcontrol/issues'); From 04dee3f14cb8b522dbd62134af1f2d158245eb39 Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Fri, 12 Dec 2025 09:06:33 +0100 Subject: [PATCH 2/9] fix wrong permission for BLE advertising on Android --- lib/utils/core.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/utils/core.dart b/lib/utils/core.dart index 06b913e..72d6293 100644 --- a/lib/utils/core.dart +++ b/lib/utils/core.dart @@ -101,8 +101,7 @@ class Permissions { return [ BluetoothTurnedOn(), if (Platform.isAndroid) ...[ - BluetoothScanRequirement(), - BluetoothConnectRequirement(), + BluetoothAdvertiseRequirement(), ], ]; } From 0eba068910602a4e19c70ab81d84702c7af47dc6 Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Fri, 12 Dec 2025 09:08:07 +0100 Subject: [PATCH 3/9] patch Android only --- .github/workflows/patch.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 64be72a..1f6517d 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -39,6 +39,7 @@ jobs: flutter pub global run intl_utils:generate; - name: Install certificates + if: false env: DEVELOPER_ID_APPLICATION_P12_BASE64_MAC: ${{ secrets.DEVELOPER_ID_APPLICATION_P12_BASE64_MAC }} DEVELOPER_ID_INSTALLER_P12_BASE64_MAC: ${{ secrets.DEVELOPER_ID_INSTALLER_P12_BASE64_MAC }} @@ -101,6 +102,7 @@ jobs: args: '--allow-asset-diffs --allow-native-diffs' - name: 🚀 Shorebird Patch iOS + if: false uses: shorebirdtech/shorebird-patch@v1 with: platform: ios @@ -154,6 +156,7 @@ jobs: windows: name: Patch Windows runs-on: windows-latest + if: false steps: #1 Checkout Repository From e44760d0e3052292c5864f7581a566aaa20af6d8 Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Fri, 12 Dec 2025 10:48:24 +0100 Subject: [PATCH 4/9] Revert "patch Android only" This reverts commit 0eba068910602a4e19c70ab81d84702c7af47dc6. --- .github/workflows/patch.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 1f6517d..64be72a 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -39,7 +39,6 @@ jobs: flutter pub global run intl_utils:generate; - name: Install certificates - if: false env: DEVELOPER_ID_APPLICATION_P12_BASE64_MAC: ${{ secrets.DEVELOPER_ID_APPLICATION_P12_BASE64_MAC }} DEVELOPER_ID_INSTALLER_P12_BASE64_MAC: ${{ secrets.DEVELOPER_ID_INSTALLER_P12_BASE64_MAC }} @@ -102,7 +101,6 @@ jobs: args: '--allow-asset-diffs --allow-native-diffs' - name: 🚀 Shorebird Patch iOS - if: false uses: shorebirdtech/shorebird-patch@v1 with: platform: ios @@ -156,7 +154,6 @@ jobs: windows: name: Patch Windows runs-on: windows-latest - if: false steps: #1 Checkout Repository From 5cee0fbf55c51958ef8fb3feea847d0f8671536c Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sat, 13 Dec 2025 10:11:28 +0100 Subject: [PATCH 5/9] use latest flutter --- .github/workflows/build.yml | 2 +- .github/workflows/patch.yml | 2 +- linux/flutter/generated_plugin_registrant.cc | 8 -------- linux/flutter/generated_plugins.cmake | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12f7315..7b023eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ on: env: SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} - FLUTTER_VERSION: 3.35.5 + FLUTTER_VERSION: 3.38.5 jobs: build: diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 64be72a..d93dd7b 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -5,7 +5,7 @@ on: env: SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} - FLUTTER_VERSION: 3.35.5 + FLUTTER_VERSION: 3.38.5 jobs: build: diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 205b9e5..1c45750 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -9,12 +9,10 @@ #include #include #include -#include #include #include #include #include -#include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) bluetooth_low_energy_linux_registrar = @@ -26,9 +24,6 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) gamepads_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "GamepadsLinuxPlugin"); gamepads_linux_plugin_register_with_registrar(gamepads_linux_registrar); - g_autoptr(FlPluginRegistrar) gtk_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); - gtk_plugin_register_with_registrar(gtk_registrar); g_autoptr(FlPluginRegistrar) media_key_detector_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKeyDetectorPlugin"); media_key_detector_plugin_register_with_registrar(media_key_detector_linux_registrar); @@ -41,7 +36,4 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) window_manager_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); window_manager_plugin_register_with_registrar(window_manager_registrar); - g_autoptr(FlPluginRegistrar) yaru_window_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "YaruWindowLinuxPlugin"); - yaru_window_linux_plugin_register_with_registrar(yaru_window_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 483dedc..4f57d1b 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,12 +6,10 @@ list(APPEND FLUTTER_PLUGIN_LIST bluetooth_low_energy_linux file_selector_linux gamepads_linux - gtk media_key_detector_linux screen_retriever_linux url_launcher_linux window_manager - yaru_window_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST From 724d52ba1087382b4cdfe416bd7b008f2102a92a Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sat, 13 Dec 2025 10:22:55 +0100 Subject: [PATCH 6/9] add keyboard input to supported devices --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d8ae298..bc04762 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ Best follow our landing page and the "Get Started" button: [bikecontrol.app](htt - Elite Sterzo Smart (for steering support) - Elite Square Smart Frame (beta) - Gamepads +- Keyboard input + - some trainers do not support keyboard input for all functions - now they do! + - useful when remapping keys from other devices using e.g. AutoHotkey - Cheap Bluetooth buttons such as [these](https://www.amazon.com/s?k=bluetooth+remote) (beta) - BLE HID devices and classic Bluetooth HID devices are supported - works out of the box on Android From 127c997ea151aced7d304886d4a3bb4b04ee2b10 Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sat, 13 Dec 2025 15:17:28 +0100 Subject: [PATCH 7/9] less warnings for Click V2 users --- .../devices/zwift/zwift_clickv2.dart | 122 ++++++++++-------- lib/i10n/intl_en.arb | 3 +- linux/flutter/generated_plugin_registrant.cc | 8 ++ linux/flutter/generated_plugins.cmake | 2 + pubspec.lock | 8 +- 5 files changed, 84 insertions(+), 59 deletions(-) diff --git a/lib/bluetooth/devices/zwift/zwift_clickv2.dart b/lib/bluetooth/devices/zwift/zwift_clickv2.dart index 8795064..d3e321c 100644 --- a/lib/bluetooth/devices/zwift/zwift_clickv2.dart +++ b/lib/bluetooth/devices/zwift/zwift_clickv2.dart @@ -4,7 +4,6 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; import 'package:swift_control/gen/l10n.dart'; import 'package:swift_control/pages/markdown.dart'; import 'package:swift_control/utils/core.dart'; @@ -51,12 +50,6 @@ class ZwiftClickV2 extends ZwiftRide { if (bytes.startsWith(ZwiftConstants.RESPONSE_STOPPED_CLICK_V2_VARIANT_1) || bytes.startsWith(ZwiftConstants.RESPONSE_STOPPED_CLICK_V2_VARIANT_2)) { _noLongerSendsEvents = true; - actionStreamInternal.add( - AlertNotification( - LogLevel.LOGLEVEL_WARNING, - 'Your Zwift Click V2 no longer sends events. Connect it in the Zwift app once each session.', - ), - ); } return super.processData(bytes); } @@ -72,53 +65,74 @@ class ZwiftClickV2 extends ZwiftRide { children: [ super.showInformation(context), - if (isConnected && _noLongerSendsEvents && core.settings.getShowZwiftClickV2ReconnectWarning()) - Warning( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Text( - AppLocalizations.of(context).clickV2Instructions, - ).xSmall, - ), - IconButton.link( - icon: Icon(Icons.close), - onPressed: () { - core.settings.setShowZwiftClickV2ReconnectWarning(false); - setState(() {}); - }, - ), - ], - ), - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - GhostButton( - onPressed: () { - sendCommand(Opcode.RESET, null); - }, - child: Text('Reset now'), - ), - OutlineButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => MarkdownPage(assetPath: 'TROUBLESHOOTING.md'), - ), - ); - }, - leading: const Icon(Icons.open_in_new), - child: Text(context.i18n.troubleshootingGuide), - ), - ], - ), - ], - ), + if (isConnected && _noLongerSendsEvents) + if (core.settings.getShowZwiftClickV2ReconnectWarning()) + Warning( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + AppLocalizations.of(context).clickV2Instructions, + ).xSmall, + ), + IconButton.link( + icon: Icon(Icons.close), + onPressed: () { + core.settings.setShowZwiftClickV2ReconnectWarning(false); + setState(() {}); + }, + ), + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 8, + children: [ + GhostButton( + onPressed: () { + sendCommand(Opcode.RESET, null); + }, + child: Text('Reset now'), + ), + OutlineButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => MarkdownPage(assetPath: 'TROUBLESHOOTING.md'), + ), + ); + }, + leading: const Icon(Icons.open_in_new), + child: Text(context.i18n.troubleshootingGuide), + ), + ], + ), + ], + ) + else + Warning( + important: false, + children: [ + Text( + AppLocalizations.of(context).clickV2EventInfo, + ).xSmall, + LinkButton( + child: Text(context.i18n.troubleshootingGuide), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => MarkdownPage(assetPath: 'TROUBLESHOOTING.md'), + ), + ); + }, + ), + ], + ), ], ); }, diff --git a/lib/i10n/intl_en.arb b/lib/i10n/intl_en.arb index 3e6e079..a062ffa 100644 --- a/lib/i10n/intl_en.arb +++ b/lib/i10n/intl_en.arb @@ -457,5 +457,6 @@ "noTrainerSelected": "No Trainer selected", "instructions": "Instructions", "mailSupportExplanation": "Providing individual support via email is a lot of work for me.\n\nPlease consider using Reddit, Facebook or GitHub for questions and issues so that the whole community can benefit from it.", - "myWhooshLinkInfo": "Please check the troubleshooting section if you encounter any issues. A much more reliable connection method is coming soon!" + "myWhooshLinkInfo": "Please check the troubleshooting section if you encounter any issues. A much more reliable connection method is coming soon!", + "clickV2EventInfo": "Your Click V2 may no longer send button events. Please check by tapping a few buttons and see if they are visible in BikeControl." } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 1c45750..205b9e5 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -9,10 +9,12 @@ #include #include #include +#include #include #include #include #include +#include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) bluetooth_low_energy_linux_registrar = @@ -24,6 +26,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) gamepads_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "GamepadsLinuxPlugin"); gamepads_linux_plugin_register_with_registrar(gamepads_linux_registrar); + g_autoptr(FlPluginRegistrar) gtk_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); + gtk_plugin_register_with_registrar(gtk_registrar); g_autoptr(FlPluginRegistrar) media_key_detector_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKeyDetectorPlugin"); media_key_detector_plugin_register_with_registrar(media_key_detector_linux_registrar); @@ -36,4 +41,7 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) window_manager_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); window_manager_plugin_register_with_registrar(window_manager_registrar); + g_autoptr(FlPluginRegistrar) yaru_window_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "YaruWindowLinuxPlugin"); + yaru_window_linux_plugin_register_with_registrar(yaru_window_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 4f57d1b..483dedc 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,10 +6,12 @@ list(APPEND FLUTTER_PLUGIN_LIST bluetooth_low_energy_linux file_selector_linux gamepads_linux + gtk media_key_detector_linux screen_retriever_linux url_launcher_linux window_manager + yaru_window_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/pubspec.lock b/pubspec.lock index ebd44e7..e53a324 100755 --- a/pubspec.lock +++ b/pubspec.lock @@ -863,10 +863,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1365,10 +1365,10 @@ packages: dependency: transitive description: name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.6" + version: "0.7.7" time: dependency: transitive description: From c3c49decd1d4e7f020d287d49b2d987c7cece6ec Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sun, 14 Dec 2025 16:22:07 +0100 Subject: [PATCH 8/9] remove remains of swift_control --- .github/workflows/build.yml | 13 ++---- lib/bluetooth/connection.dart | 22 +++++----- lib/bluetooth/devices/base_device.dart | 10 ++--- lib/bluetooth/devices/bluetooth_device.dart | 40 +++++++++---------- .../devices/cycplus/cycplus_bc2.dart | 4 +- lib/bluetooth/devices/elite/elite_square.dart | 2 +- lib/bluetooth/devices/elite/elite_sterzo.dart | 4 +- .../devices/gamepad/gamepad_device.dart | 10 ++--- lib/bluetooth/devices/hid/hid_device.dart | 6 +-- lib/bluetooth/devices/mywhoosh/link.dart | 18 ++++----- .../openbikecontrol/obc_ble_emulator.dart | 18 ++++----- .../openbikecontrol/obc_mdns_emulator.dart | 20 +++++----- .../openbikecontrol_device.dart | 6 +-- .../openbikecontrol/protocol_parser.dart | 2 +- .../devices/shimano/shimano_di2.dart | 6 +-- lib/bluetooth/devices/trainer_connection.dart | 6 +-- .../devices/wahoo/wahoo_kickr_bike_pro.dart | 2 +- .../devices/wahoo/wahoo_kickr_bike_shift.dart | 2 +- .../devices/wahoo/wahoo_kickr_headwind.dart | 10 ++--- lib/bluetooth/devices/zwift/constants.dart | 2 +- .../devices/zwift/ftms_mdns_emulator.dart | 22 +++++----- lib/bluetooth/devices/zwift/zwift_click.dart | 6 +-- .../devices/zwift/zwift_clickv2.dart | 16 ++++---- lib/bluetooth/devices/zwift/zwift_device.dart | 14 +++---- .../devices/zwift/zwift_emulator.dart | 30 +++++++------- lib/bluetooth/devices/zwift/zwift_play.dart | 12 +++--- lib/bluetooth/devices/zwift/zwift_ride.dart | 16 ++++---- lib/bluetooth/messages/notification.dart | 8 ++-- lib/bluetooth/remote_pairing.dart | 18 ++++----- lib/main.dart | 14 +++---- lib/pages/button_edit.dart | 26 ++++++------ lib/pages/button_simulator.dart | 20 +++++----- lib/pages/configuration.dart | 20 +++++----- lib/pages/customize.dart | 22 +++++----- lib/pages/device.dart | 18 ++++----- lib/pages/markdown.dart | 2 +- lib/pages/navigation.dart | 22 +++++----- lib/pages/touch_area.dart | 14 +++---- lib/pages/trainer.dart | 36 ++++++++--------- lib/utils/actions/android.dart | 10 ++--- lib/utils/actions/base_actions.dart | 16 ++++---- lib/utils/actions/desktop.dart | 6 +-- lib/utils/actions/remote.dart | 8 ++-- lib/utils/core.dart | 36 ++++++++--------- lib/utils/i18n_extension.dart | 2 +- lib/utils/keymap/apps/biketerra.dart | 4 +- lib/utils/keymap/apps/custom_app.dart | 4 +- lib/utils/keymap/apps/my_whoosh.dart | 6 +-- lib/utils/keymap/apps/openbikecontrol.dart | 4 +- lib/utils/keymap/apps/rouvy.dart | 8 ++-- lib/utils/keymap/apps/supported_app.dart | 12 +++--- lib/utils/keymap/apps/training_peaks.dart | 10 ++--- lib/utils/keymap/apps/zwift.dart | 8 ++-- lib/utils/keymap/buttons.dart | 12 +++--- lib/utils/keymap/keymap.dart | 4 +- lib/utils/keymap/manager.dart | 6 +-- lib/utils/requirements/android.dart | 10 ++--- lib/utils/requirements/multi.dart | 18 ++++----- lib/utils/settings/settings.dart | 6 +-- .../accessibility_disclosure_dialog.dart | 2 +- lib/widgets/apps/mywhoosh_link_tile.dart | 12 +++--- .../apps/openbikecontrol_ble_tile.dart | 10 ++--- .../apps/openbikecontrol_mdns_tile.dart | 10 ++--- lib/widgets/apps/zwift_mdns_tile.dart | 10 ++--- lib/widgets/apps/zwift_tile.dart | 10 ++--- lib/widgets/changelog_dialog.dart | 4 +- lib/widgets/custom_keymap_selector.dart | 10 ++--- lib/widgets/ignored_devices_dialog.dart | 4 +- lib/widgets/keymap_explanation.dart | 20 +++++----- lib/widgets/logviewer.dart | 6 +-- lib/widgets/menu.dart | 12 +++--- lib/widgets/pair_widget.dart | 10 ++--- lib/widgets/scan.dart | 12 +++--- lib/widgets/testbed.dart | 16 ++++---- lib/widgets/title.dart | 12 +++--- lib/widgets/ui/button_widget.dart | 8 ++-- lib/widgets/ui/colored_title.dart | 2 +- lib/widgets/ui/connection_method.dart | 16 ++++---- lib/widgets/ui/gradient_text.dart | 2 +- lib/widgets/ui/toast.dart | 4 +- pubspec.yaml | 2 +- test/bluetooth_device_detection.dart | 22 +++++----- test/button_simulator_hotkeys_test.dart | 4 +- test/custom_frame.dart | 2 +- test/custom_profile_test.dart | 6 +-- test/cycplus_bc2_test.dart | 6 +-- test/long_press_test.dart | 4 +- test/modifier_keys_test.dart | 4 +- test/screenshot_test.dart | 12 +++--- test/shimano_di2_test.dart | 8 ++-- test/zwift.dart | 4 +- windows/CMakeLists.txt | 4 +- windows/runner/Runner.rc | 8 ++-- windows/runner/main.cpp | 2 +- 94 files changed, 502 insertions(+), 507 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b023eb..6683c7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -324,7 +324,7 @@ jobs: Write-Warning "$dll not found in $source" } } - Compress-Archive -Path "build/windows/x64/runner/Release/*" -DestinationPath "build/windows/x64/runner/Release/BikeControl.windows.zip" + Compress-Archive -Path "build/windows/x64/runner/Release/*" -DestinationPath "build/windows/x64/runner/Release/bike_control.windows.zip" - uses: microsoft/setup-msstore-cli@v1 if: false @@ -340,25 +340,20 @@ jobs: if: false run: msstore publish -v "build/windows/x64/runner/Release/" - - name: Rename swift_control.msix to BikeControl.windows.msix - shell: pwsh - run: | - Rename-Item -Path "build/windows/x64/runner/Release/swift_control.msix" -NewName "BikeControl.windows.msix" - - name: Upload Artifacts uses: actions/upload-artifact@v4 with: overwrite: true name: Releases path: | - build/windows/x64/runner/Release/BikeControl.windows.zip - build/windows/x64/runner/Release/BikeControl.windows.msix + build/windows/x64/runner/Release/bike_control.windows.zip + build/windows/x64/runner/Release/bike_control.windows.msix - name: Update Release uses: ncipollo/release-action@v1 with: allowUpdates: true - artifacts: "build/windows/x64/runner/Release/BikeControl.windows.msix" + artifacts: "build/windows/x64/runner/Release/bike_control.windows.msix" prerelease: true tag: v${{ env.VERSION }} token: ${{ secrets.TOKEN }} diff --git a/lib/bluetooth/connection.dart b/lib/bluetooth/connection.dart index 4ef5af6..66cd5da 100644 --- a/lib/bluetooth/connection.dart +++ b/lib/bluetooth/connection.dart @@ -6,17 +6,17 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:gamepads/gamepads.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/bluetooth_device.dart'; -import 'package:swift_control/bluetooth/devices/gamepad/gamepad_device.dart'; -import 'package:swift_control/bluetooth/devices/hid/hid_device.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/utils/requirements/android.dart'; +import 'package:bike_control/bluetooth/devices/bluetooth_device.dart'; +import 'package:bike_control/bluetooth/devices/gamepad/gamepad_device.dart'; +import 'package:bike_control/bluetooth/devices/hid/hid_device.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/requirements/android.dart'; import 'package:universal_ble/universal_ble.dart'; import 'devices/base_device.dart'; diff --git a/lib/bluetooth/devices/base_device.dart b/lib/bluetooth/devices/base_device.dart index fa12528..72b06aa 100644 --- a/lib/bluetooth/devices/base_device.dart +++ b/lib/bluetooth/devices/base_device.dart @@ -2,11 +2,11 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/actions/desktop.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/manager.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/actions/desktop.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/manager.dart'; import '../../utils/keymap/buttons.dart'; import '../messages/notification.dart'; diff --git a/lib/bluetooth/devices/bluetooth_device.dart b/lib/bluetooth/devices/bluetooth_device.dart index 4abe5c0..13fefc2 100644 --- a/lib/bluetooth/devices/bluetooth_device.dart +++ b/lib/bluetooth/devices/bluetooth_device.dart @@ -3,26 +3,26 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/ble.dart'; -import 'package:swift_control/bluetooth/devices/base_device.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; -import 'package:swift_control/bluetooth/devices/shimano/shimano_di2.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_click.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_clickv2.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_device.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_play.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/device.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/beta_pill.dart'; -import 'package:swift_control/widgets/ui/loading_widget.dart'; -import 'package:swift_control/widgets/ui/small_progress_indicator.dart'; +import 'package:bike_control/bluetooth/ble.dart'; +import 'package:bike_control/bluetooth/devices/base_device.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; +import 'package:bike_control/bluetooth/devices/shimano/shimano_di2.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_click.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_clickv2.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_device.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_play.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/device.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/beta_pill.dart'; +import 'package:bike_control/widgets/ui/loading_widget.dart'; +import 'package:bike_control/widgets/ui/small_progress_indicator.dart'; import 'package:universal_ble/universal_ble.dart'; import 'cycplus/cycplus_bc2.dart'; diff --git a/lib/bluetooth/devices/cycplus/cycplus_bc2.dart b/lib/bluetooth/devices/cycplus/cycplus_bc2.dart index ceb67a3..84619de 100644 --- a/lib/bluetooth/devices/cycplus/cycplus_bc2.dart +++ b/lib/bluetooth/devices/cycplus/cycplus_bc2.dart @@ -1,8 +1,8 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth_device.dart'; diff --git a/lib/bluetooth/devices/elite/elite_square.dart b/lib/bluetooth/devices/elite/elite_square.dart index e4d1f34..b4f537e 100644 --- a/lib/bluetooth/devices/elite/elite_square.dart +++ b/lib/bluetooth/devices/elite/elite_square.dart @@ -1,6 +1,6 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; import '../../messages/notification.dart'; diff --git a/lib/bluetooth/devices/elite/elite_sterzo.dart b/lib/bluetooth/devices/elite/elite_sterzo.dart index 8d738aa..57d19cd 100644 --- a/lib/bluetooth/devices/elite/elite_sterzo.dart +++ b/lib/bluetooth/devices/elite/elite_sterzo.dart @@ -5,8 +5,8 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:swift_control/bluetooth/devices/bluetooth_device.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/bluetooth/devices/bluetooth_device.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; import '../../messages/notification.dart'; diff --git a/lib/bluetooth/devices/gamepad/gamepad_device.dart b/lib/bluetooth/devices/gamepad/gamepad_device.dart index be804b8..09eeb84 100644 --- a/lib/bluetooth/devices/gamepad/gamepad_device.dart +++ b/lib/bluetooth/devices/gamepad/gamepad_device.dart @@ -3,11 +3,11 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; import 'package:gamepads/gamepads.dart'; -import 'package:swift_control/bluetooth/devices/base_device.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/pages/device.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/widgets/ui/beta_pill.dart'; +import 'package:bike_control/bluetooth/devices/base_device.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/pages/device.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/widgets/ui/beta_pill.dart'; class GamepadDevice extends BaseDevice { final String id; diff --git a/lib/bluetooth/devices/hid/hid_device.dart b/lib/bluetooth/devices/hid/hid_device.dart index e064e1c..140ffad 100644 --- a/lib/bluetooth/devices/hid/hid_device.dart +++ b/lib/bluetooth/devices/hid/hid_device.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/devices/base_device.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/core.dart'; +import 'package:bike_control/bluetooth/devices/base_device.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/core.dart'; class HidDevice extends BaseDevice { HidDevice(super.name) : super(availableButtons: []); diff --git a/lib/bluetooth/devices/mywhoosh/link.dart b/lib/bluetooth/devices/mywhoosh/link.dart index 33c87f3..740dd2f 100644 --- a/lib/bluetooth/devices/mywhoosh/link.dart +++ b/lib/bluetooth/devices/mywhoosh/link.dart @@ -2,15 +2,15 @@ import 'dart:convert'; import 'dart:io'; import 'package:flutter/foundation.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; class WhooshLink extends TrainerConnection { Socket? _socket; diff --git a/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart b/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart index adace26..df98acd 100644 --- a/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart +++ b/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart @@ -3,15 +3,15 @@ import 'dart:io'; import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/widgets/title.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/widgets/title.dart'; import '../../messages/notification.dart' show AlertNotification; diff --git a/lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart b/lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart index fb5d833..fffe52d 100644 --- a/lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart +++ b/lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart @@ -3,16 +3,16 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:nsd/nsd.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; class OpenBikeControlMdnsEmulator extends TrainerConnection { ServerSocket? _server; diff --git a/lib/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart b/lib/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart index e3e7d11..5c1fcda 100644 --- a/lib/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart +++ b/lib/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart @@ -1,8 +1,8 @@ import 'dart:typed_data'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/widgets/title.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/widgets/title.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth_device.dart'; diff --git a/lib/bluetooth/devices/openbikecontrol/protocol_parser.dart b/lib/bluetooth/devices/openbikecontrol/protocol_parser.dart index 1b28943..09f0876 100644 --- a/lib/bluetooth/devices/openbikecontrol/protocol_parser.dart +++ b/lib/bluetooth/devices/openbikecontrol/protocol_parser.dart @@ -9,7 +9,7 @@ import 'dart:convert'; import 'dart:typed_data'; import 'package:dartx/dartx.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; class ProtocolParseException implements Exception { final String message; diff --git a/lib/bluetooth/devices/shimano/shimano_di2.dart b/lib/bluetooth/devices/shimano/shimano_di2.dart index 6c8686c..523e4a9 100644 --- a/lib/bluetooth/devices/shimano/shimano_di2.dart +++ b/lib/bluetooth/devices/shimano/shimano_di2.dart @@ -2,9 +2,9 @@ import 'dart:typed_data'; import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth_device.dart'; diff --git a/lib/bluetooth/devices/trainer_connection.dart b/lib/bluetooth/devices/trainer_connection.dart index e4a2a44..3ed881c 100644 --- a/lib/bluetooth/devices/trainer_connection.dart +++ b/lib/bluetooth/devices/trainer_connection.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; abstract class TrainerConnection { final String title; diff --git a/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart b/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart index 21f5f5a..7bdab35 100644 --- a/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart +++ b/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_pro.dart @@ -1,4 +1,4 @@ -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; import '../zwift/constants.dart'; diff --git a/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart b/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart index 2c9121b..cdc5156 100644 --- a/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart +++ b/lib/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart @@ -2,7 +2,7 @@ import 'dart:collection'; import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth_device.dart'; diff --git a/lib/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart b/lib/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart index 40143d2..2eca4fb 100644 --- a/lib/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart +++ b/lib/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart @@ -1,10 +1,10 @@ import 'dart:typed_data'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth_device.dart'; diff --git a/lib/bluetooth/devices/zwift/constants.dart b/lib/bluetooth/devices/zwift/constants.dart index 73a6072..c88f813 100644 --- a/lib/bluetooth/devices/zwift/constants.dart +++ b/lib/bluetooth/devices/zwift/constants.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; class ZwiftConstants { static const ZWIFT_CUSTOM_SERVICE_UUID = "00000001-19CA-4651-86E5-FA29DCDD09D1"; diff --git a/lib/bluetooth/devices/zwift/ftms_mdns_emulator.dart b/lib/bluetooth/devices/zwift/ftms_mdns_emulator.dart index 91e2e61..238208b 100644 --- a/lib/bluetooth/devices/zwift/ftms_mdns_emulator.dart +++ b/lib/bluetooth/devices/zwift/ftms_mdns_emulator.dart @@ -3,17 +3,17 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:nsd/nsd.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zwift.pb.dart' show RideKeyPadStatus; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zwift.pb.dart' show RideKeyPadStatus; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; class FtmsMdnsEmulator extends TrainerConnection { ServerSocket? _tcpServer; diff --git a/lib/bluetooth/devices/zwift/zwift_click.dart b/lib/bluetooth/devices/zwift/zwift_click.dart index 64f4e9a..a85cffe 100644 --- a/lib/bluetooth/devices/zwift/zwift_click.dart +++ b/lib/bluetooth/devices/zwift/zwift_click.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_device.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_device.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'constants.dart'; diff --git a/lib/bluetooth/devices/zwift/zwift_clickv2.dart b/lib/bluetooth/devices/zwift/zwift_clickv2.dart index d3e321c..d76a8c3 100644 --- a/lib/bluetooth/devices/zwift/zwift_clickv2.dart +++ b/lib/bluetooth/devices/zwift/zwift_clickv2.dart @@ -1,14 +1,14 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/pages/markdown.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/pages/markdown.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; class ZwiftClickV2 extends ZwiftRide { ZwiftClickV2(super.scanResult) diff --git a/lib/bluetooth/devices/zwift/zwift_device.dart b/lib/bluetooth/devices/zwift/zwift_device.dart index 23450e9..459934e 100644 --- a/lib/bluetooth/devices/zwift/zwift_device.dart +++ b/lib/bluetooth/devices/zwift/zwift_device.dart @@ -2,13 +2,13 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; -import 'package:swift_control/bluetooth/devices/bluetooth_device.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/single_line_exception.dart'; +import 'package:bike_control/bluetooth/devices/bluetooth_device.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/single_line_exception.dart'; import 'package:universal_ble/universal_ble.dart'; abstract class ZwiftDevice extends BluetoothDevice { diff --git a/lib/bluetooth/devices/zwift/zwift_emulator.dart b/lib/bluetooth/devices/zwift/zwift_emulator.dart index c2a0aff..6126350 100644 --- a/lib/bluetooth/devices/zwift/zwift_emulator.dart +++ b/lib/bluetooth/devices/zwift/zwift_emulator.dart @@ -3,21 +3,21 @@ import 'dart:io'; import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; import 'package:flutter/foundation.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:swift_control/bluetooth/ble.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zwift.pbserver.dart' hide RideButtonMask; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; -import 'package:swift_control/widgets/title.dart'; +import 'package:bike_control/bluetooth/ble.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zwift.pbserver.dart' hide RideButtonMask; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; +import 'package:bike_control/widgets/title.dart'; class ZwiftEmulator extends TrainerConnection { bool get isLoading => _isLoading; diff --git a/lib/bluetooth/devices/zwift/zwift_play.dart b/lib/bluetooth/devices/zwift/zwift_play.dart index 1e13bed..276782b 100644 --- a/lib/bluetooth/devices/zwift/zwift_play.dart +++ b/lib/bluetooth/devices/zwift/zwift_play.dart @@ -1,11 +1,11 @@ import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_device.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_device.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; class ZwiftPlay extends ZwiftDevice { ZwiftPlay(super.scanResult) diff --git a/lib/bluetooth/devices/zwift/zwift_ride.dart b/lib/bluetooth/devices/zwift/zwift_ride.dart index 0d912ec..0c396aa 100644 --- a/lib/bluetooth/devices/zwift/zwift_ride.dart +++ b/lib/bluetooth/devices/zwift/zwift_ride.dart @@ -1,14 +1,14 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:protobuf/protobuf.dart' as $pb; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp_vendor.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_device.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp_vendor.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zwift.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_device.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:universal_ble/universal_ble.dart'; class ZwiftRide extends ZwiftDevice { diff --git a/lib/bluetooth/messages/notification.dart b/lib/bluetooth/messages/notification.dart index 2752c2a..82f780c 100644 --- a/lib/bluetooth/messages/notification.dart +++ b/lib/bluetooth/messages/notification.dart @@ -1,9 +1,9 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; class BaseNotification {} diff --git a/lib/bluetooth/remote_pairing.dart b/lib/bluetooth/remote_pairing.dart index f87a9bc..3ca61e2 100644 --- a/lib/bluetooth/remote_pairing.dart +++ b/lib/bluetooth/remote_pairing.dart @@ -3,15 +3,15 @@ import 'dart:io'; import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; import 'package:flutter/foundation.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/actions/remote.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/actions/remote.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../utils/keymap/keymap.dart'; diff --git a/lib/main.dart b/lib/main.dart index 5bd0e64..dc3f56e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,13 +6,13 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_localizations/flutter_localizations.dart' show GlobalMaterialLocalizations, GlobalWidgetsLocalizations; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/actions/desktop.dart'; -import 'package:swift_control/utils/actions/remote.dart'; -import 'package:swift_control/widgets/menu.dart'; -import 'package:swift_control/widgets/testbed.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/actions/desktop.dart'; +import 'package:bike_control/utils/actions/remote.dart'; +import 'package:bike_control/widgets/menu.dart'; +import 'package:bike_control/widgets/testbed.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; import 'pages/navigation.dart'; import 'utils/actions/base_actions.dart'; diff --git a/lib/pages/button_edit.dart b/lib/pages/button_edit.dart index 5e69a24..69f16bf 100644 --- a/lib/pages/button_edit.dart +++ b/lib/pages/button_edit.dart @@ -1,19 +1,19 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/services.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/pages/touch_area.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/widgets/custom_keymap_selector.dart'; -import 'package:swift_control/widgets/ui/button_widget.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/pages/touch_area.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/widgets/custom_keymap_selector.dart'; +import 'package:bike_control/widgets/ui/button_widget.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; class ButtonEditPage extends StatefulWidget { final KeyPair keyPair; diff --git a/lib/pages/button_simulator.dart b/lib/pages/button_simulator.dart index 55b1cc9..2bdb85a 100644 --- a/lib/pages/button_simulator.dart +++ b/lib/pages/button_simulator.dart @@ -2,16 +2,16 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart' show BackButton; import 'package:flutter/services.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/pages/touch_area.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/actions/desktop.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/widgets/ui/gradient_text.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/pages/touch_area.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/actions/desktop.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/widgets/ui/gradient_text.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; class ButtonSimulator extends StatefulWidget { const ButtonSimulator({super.key}); diff --git a/lib/pages/configuration.dart b/lib/pages/configuration.dart index f26feb1..5779cc6 100644 --- a/lib/pages/configuration.dart +++ b/lib/pages/configuration.dart @@ -2,16 +2,16 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/button_edit.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/apps/my_whoosh.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/button_edit.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/apps/my_whoosh.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; class ConfigurationPage extends StatefulWidget { final VoidCallback onUpdate; diff --git a/lib/pages/customize.dart b/lib/pages/customize.dart index 0f9d054..b8b3448 100644 --- a/lib/pages/customize.dart +++ b/lib/pages/customize.dart @@ -1,15 +1,15 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_device.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/keymap/manager.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; -import 'package:swift_control/widgets/ui/beta_pill.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_device.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/keymap/manager.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/widgets/ui/beta_pill.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; class CustomizePage extends StatefulWidget { const CustomizePage({super.key}); diff --git a/lib/pages/device.dart b/lib/pages/device.dart index f503096..43d2377 100644 --- a/lib/pages/device.dart +++ b/lib/pages/device.dart @@ -3,15 +3,15 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/button_simulator.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/scan.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/button_simulator.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/scan.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; import 'package:url_launcher/url_launcher_string.dart'; import '../bluetooth/devices/base_device.dart'; diff --git a/lib/pages/markdown.dart b/lib/pages/markdown.dart index b1f615a..579f963 100644 --- a/lib/pages/markdown.dart +++ b/lib/pages/markdown.dart @@ -4,7 +4,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_md/flutter_md.dart'; import 'package:http/http.dart' as http; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; import 'package:url_launcher/url_launcher_string.dart'; class MarkdownPage extends StatefulWidget { diff --git a/lib/pages/navigation.dart b/lib/pages/navigation.dart index b9ba722..83231a2 100644 --- a/lib/pages/navigation.dart +++ b/lib/pages/navigation.dart @@ -5,17 +5,17 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/customize.dart'; -import 'package:swift_control/pages/device.dart'; -import 'package:swift_control/pages/trainer.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/logviewer.dart'; -import 'package:swift_control/widgets/menu.dart'; -import 'package:swift_control/widgets/title.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/customize.dart'; +import 'package:bike_control/pages/device.dart'; +import 'package:bike_control/pages/trainer.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/logviewer.dart'; +import 'package:bike_control/widgets/menu.dart'; +import 'package:bike_control/widgets/title.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; import '../widgets/changelog_dialog.dart'; diff --git a/lib/pages/touch_area.dart b/lib/pages/touch_area.dart index 64392f0..03fe416 100644 --- a/lib/pages/touch_area.dart +++ b/lib/pages/touch_area.dart @@ -9,13 +9,13 @@ import 'package:flutter/services.dart'; import 'package:image_picker/image_picker.dart'; import 'package:path_provider/path_provider.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; -import 'package:swift_control/widgets/testbed.dart'; -import 'package:swift_control/widgets/ui/button_widget.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/widgets/testbed.dart'; +import 'package:bike_control/widgets/ui/button_widget.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; import 'package:window_manager/window_manager.dart'; import '../utils/actions/base_actions.dart'; diff --git a/lib/pages/trainer.dart b/lib/pages/trainer.dart index d42a14e..161c937 100644 --- a/lib/pages/trainer.dart +++ b/lib/pages/trainer.dart @@ -6,24 +6,24 @@ import 'package:device_auto_rotate_checker/device_auto_rotate_checker.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/configuration.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; -import 'package:swift_control/widgets/apps/mywhoosh_link_tile.dart'; -import 'package:swift_control/widgets/apps/openbikecontrol_ble_tile.dart'; -import 'package:swift_control/widgets/apps/openbikecontrol_mdns_tile.dart'; -import 'package:swift_control/widgets/apps/zwift_mdns_tile.dart'; -import 'package:swift_control/widgets/apps/zwift_tile.dart'; -import 'package:swift_control/widgets/pair_widget.dart'; -import 'package:swift_control/widgets/ui/colored_title.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; -import 'package:swift_control/widgets/ui/warning.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/configuration.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; +import 'package:bike_control/widgets/apps/mywhoosh_link_tile.dart'; +import 'package:bike_control/widgets/apps/openbikecontrol_ble_tile.dart'; +import 'package:bike_control/widgets/apps/openbikecontrol_mdns_tile.dart'; +import 'package:bike_control/widgets/apps/zwift_mdns_tile.dart'; +import 'package:bike_control/widgets/apps/zwift_tile.dart'; +import 'package:bike_control/widgets/pair_widget.dart'; +import 'package:bike_control/widgets/ui/colored_title.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; +import 'package:bike_control/widgets/ui/warning.dart'; import 'package:universal_ble/universal_ble.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher_string.dart' show launchUrlString; diff --git a/lib/utils/actions/android.dart b/lib/utils/actions/android.dart index 47a78c6..834ea79 100644 --- a/lib/utils/actions/android.dart +++ b/lib/utils/actions/android.dart @@ -1,11 +1,11 @@ import 'package:accessibility/accessibility.dart'; import 'package:dartx/dartx.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/bluetooth/devices/hid/hid_device.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/bluetooth/devices/hid/hid_device.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; import '../keymap/apps/supported_app.dart'; import '../single_line_exception.dart'; diff --git a/lib/utils/actions/base_actions.dart b/lib/utils/actions/base_actions.dart index f9d9c16..4473fb1 100644 --- a/lib/utils/actions/base_actions.dart +++ b/lib/utils/actions/base_actions.dart @@ -6,14 +6,14 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:screen_retriever/screen_retriever.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/actions/desktop.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/actions/desktop.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; import '../keymap/apps/supported_app.dart'; diff --git a/lib/utils/actions/desktop.dart b/lib/utils/actions/desktop.dart index bf4abf7..fb1ce4d 100644 --- a/lib/utils/actions/desktop.dart +++ b/lib/utils/actions/desktop.dart @@ -1,9 +1,9 @@ import 'dart:ui'; import 'package:keypress_simulator/keypress_simulator.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; class DesktopActions extends BaseActions { DesktopActions({super.supportedModes = const [SupportedMode.keyboard, SupportedMode.touch, SupportedMode.media]}); diff --git a/lib/utils/actions/remote.dart b/lib/utils/actions/remote.dart index 59bb404..344391c 100644 --- a/lib/utils/actions/remote.dart +++ b/lib/utils/actions/remote.dart @@ -1,10 +1,10 @@ import 'dart:ui'; import 'package:accessibility/accessibility.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; class RemoteActions extends BaseActions { RemoteActions({super.supportedModes = const [SupportedMode.touch]}); diff --git a/lib/utils/core.dart b/lib/utils/core.dart index 72d6293..b0f2ba1 100644 --- a/lib/utils/core.dart +++ b/lib/utils/core.dart @@ -5,24 +5,24 @@ import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:media_key_detector/media_key_detector.dart'; -import 'package:swift_control/bluetooth/devices/hid/hid_device.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; -import 'package:swift_control/bluetooth/devices/trainer_connection.dart'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_emulator.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/bluetooth/remote_pairing.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/actions/remote.dart'; -import 'package:swift_control/utils/keymap/apps/my_whoosh.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/requirements/android.dart'; -import 'package:swift_control/utils/settings/settings.dart'; +import 'package:bike_control/bluetooth/devices/hid/hid_device.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; +import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_emulator.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/bluetooth/remote_pairing.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/actions/remote.dart'; +import 'package:bike_control/utils/keymap/apps/my_whoosh.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/requirements/android.dart'; +import 'package:bike_control/utils/settings/settings.dart'; import 'package:universal_ble/universal_ble.dart'; import '../bluetooth/connection.dart'; diff --git a/lib/utils/i18n_extension.dart b/lib/utils/i18n_extension.dart index 65ba4e7..d08e5b4 100644 --- a/lib/utils/i18n_extension.dart +++ b/lib/utils/i18n_extension.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/gen/l10n.dart'; +import 'package:bike_control/gen/l10n.dart'; extension Intl on BuildContext { AppLocalizations get i18n => AppLocalizations.of(this); diff --git a/lib/utils/keymap/apps/biketerra.dart b/lib/utils/keymap/apps/biketerra.dart index bebe0f6..32e34e0 100644 --- a/lib/utils/keymap/apps/biketerra.dart +++ b/lib/utils/keymap/apps/biketerra.dart @@ -1,7 +1,7 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../buttons.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/custom_app.dart b/lib/utils/keymap/apps/custom_app.dart index a8ad5a7..51c584c 100644 --- a/lib/utils/keymap/apps/custom_app.dart +++ b/lib/utils/keymap/apps/custom_app.dart @@ -3,8 +3,8 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../buttons.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/my_whoosh.dart b/lib/utils/keymap/apps/my_whoosh.dart index 4d648e5..c01e99b 100644 --- a/lib/utils/keymap/apps/my_whoosh.dart +++ b/lib/utils/keymap/apps/my_whoosh.dart @@ -1,8 +1,8 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../buttons.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/openbikecontrol.dart b/lib/utils/keymap/apps/openbikecontrol.dart index 604045e..ae12e8f 100644 --- a/lib/utils/keymap/apps/openbikecontrol.dart +++ b/lib/utils/keymap/apps/openbikecontrol.dart @@ -1,5 +1,5 @@ -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/rouvy.dart b/lib/utils/keymap/apps/rouvy.dart index a462a1a..23b23b1 100644 --- a/lib/utils/keymap/apps/rouvy.dart +++ b/lib/utils/keymap/apps/rouvy.dart @@ -3,10 +3,10 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/supported_app.dart b/lib/utils/keymap/apps/supported_app.dart index b72ddf8..16a36be 100644 --- a/lib/utils/keymap/apps/supported_app.dart +++ b/lib/utils/keymap/apps/supported_app.dart @@ -1,9 +1,9 @@ -import 'package:swift_control/utils/keymap/apps/biketerra.dart'; -import 'package:swift_control/utils/keymap/apps/openbikecontrol.dart'; -import 'package:swift_control/utils/keymap/apps/rouvy.dart'; -import 'package:swift_control/utils/keymap/apps/training_peaks.dart'; -import 'package:swift_control/utils/keymap/apps/zwift.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/utils/keymap/apps/biketerra.dart'; +import 'package:bike_control/utils/keymap/apps/openbikecontrol.dart'; +import 'package:bike_control/utils/keymap/apps/rouvy.dart'; +import 'package:bike_control/utils/keymap/apps/training_peaks.dart'; +import 'package:bike_control/utils/keymap/apps/zwift.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../keymap.dart'; import 'custom_app.dart'; diff --git a/lib/utils/keymap/apps/training_peaks.dart b/lib/utils/keymap/apps/training_peaks.dart index a7f9fe9..de9b234 100644 --- a/lib/utils/keymap/apps/training_peaks.dart +++ b/lib/utils/keymap/apps/training_peaks.dart @@ -3,11 +3,11 @@ import 'dart:io'; import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/bluetooth/devices/elite/elite_square.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/elite/elite_square.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/apps/zwift.dart b/lib/utils/keymap/apps/zwift.dart index dea182f..4d3b798 100644 --- a/lib/utils/keymap/apps/zwift.dart +++ b/lib/utils/keymap/apps/zwift.dart @@ -1,8 +1,8 @@ import 'package:flutter/services.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import '../keymap.dart'; diff --git a/lib/utils/keymap/buttons.dart b/lib/utils/keymap/buttons.dart index 07f87ac..98844ca 100644 --- a/lib/utils/keymap/buttons.dart +++ b/lib/utils/keymap/buttons.dart @@ -1,11 +1,11 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; -import 'package:swift_control/bluetooth/devices/elite/elite_square.dart'; -import 'package:swift_control/bluetooth/devices/elite/elite_sterzo.dart'; -import 'package:swift_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; +import 'package:bike_control/bluetooth/devices/elite/elite_square.dart'; +import 'package:bike_control/bluetooth/devices/elite/elite_sterzo.dart'; +import 'package:bike_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; enum InGameAction { shiftUp('Shift Up'), diff --git a/lib/utils/keymap/keymap.dart b/lib/utils/keymap/keymap.dart index 3ede902..b9a38bd 100644 --- a/lib/utils/keymap/keymap.dart +++ b/lib/utils/keymap/keymap.dart @@ -4,8 +4,8 @@ import 'dart:convert'; import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; import '../actions/base_actions.dart'; import 'apps/custom_app.dart'; diff --git a/lib/utils/keymap/manager.dart b/lib/utils/keymap/manager.dart index 9e7ae1f..8c105db 100644 --- a/lib/utils/keymap/manager.dart +++ b/lib/utils/keymap/manager.dart @@ -1,9 +1,9 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/services.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import 'apps/custom_app.dart'; diff --git a/lib/utils/requirements/android.dart b/lib/utils/requirements/android.dart index 0d9c561..f3a8b72 100644 --- a/lib/utils/requirements/android.dart +++ b/lib/utils/requirements/android.dart @@ -4,11 +4,11 @@ import 'dart:ui'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/actions/android.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/requirements/platform.dart'; -import 'package:swift_control/widgets/accessibility_disclosure_dialog.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/actions/android.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/requirements/platform.dart'; +import 'package:bike_control/widgets/accessibility_disclosure_dialog.dart'; import 'package:universal_ble/universal_ble.dart'; class AccessibilityRequirement extends PlatformRequirement { diff --git a/lib/utils/requirements/multi.dart b/lib/utils/requirements/multi.dart index c0c9975..e86439a 100644 --- a/lib/utils/requirements/multi.dart +++ b/lib/utils/requirements/multi.dart @@ -5,15 +5,15 @@ import 'package:flutter/foundation.dart'; import 'package:keypress_simulator/keypress_simulator.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/my_whoosh.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/keymap/apps/zwift.dart'; -import 'package:swift_control/utils/requirements/platform.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/my_whoosh.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/keymap/apps/zwift.dart'; +import 'package:bike_control/utils/requirements/platform.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import 'package:universal_ble/universal_ble.dart'; class KeyboardRequirement extends PlatformRequirement { diff --git a/lib/utils/settings/settings.dart b/lib/utils/settings/settings.dart index 5071f75..f648f50 100644 --- a/lib/utils/settings/settings.dart +++ b/lib/utils/settings/settings.dart @@ -6,9 +6,9 @@ import 'package:path/path.dart' as path; import 'package:path_provider_windows/path_provider_windows.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences_windows/shared_preferences_windows.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/apps/supported_app.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/apps/supported_app.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import 'package:window_manager/window_manager.dart'; import '../../main.dart'; diff --git a/lib/widgets/accessibility_disclosure_dialog.dart b/lib/widgets/accessibility_disclosure_dialog.dart index 630b54c..08eb896 100644 --- a/lib/widgets/accessibility_disclosure_dialog.dart +++ b/lib/widgets/accessibility_disclosure_dialog.dart @@ -1,5 +1,5 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; class AccessibilityDisclosureDialog extends StatelessWidget { final VoidCallback onAccept; diff --git a/lib/widgets/apps/mywhoosh_link_tile.dart b/lib/widgets/apps/mywhoosh_link_tile.dart index ddd2e55..fea40db 100644 --- a/lib/widgets/apps/mywhoosh_link_tile.dart +++ b/lib/widgets/apps/mywhoosh_link_tile.dart @@ -1,10 +1,10 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; class MyWhooshLinkTile extends StatefulWidget { const MyWhooshLinkTile({super.key}); diff --git a/lib/widgets/apps/openbikecontrol_ble_tile.dart b/lib/widgets/apps/openbikecontrol_ble_tile.dart index f83991d..43a8e6e 100644 --- a/lib/widgets/apps/openbikecontrol_ble_tile.dart +++ b/lib/widgets/apps/openbikecontrol_ble_tile.dart @@ -1,9 +1,9 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; class OpenBikeControlBluetoothTile extends StatefulWidget { const OpenBikeControlBluetoothTile({super.key}); diff --git a/lib/widgets/apps/openbikecontrol_mdns_tile.dart b/lib/widgets/apps/openbikecontrol_mdns_tile.dart index 2ede371..50a5aea 100644 --- a/lib/widgets/apps/openbikecontrol_mdns_tile.dart +++ b/lib/widgets/apps/openbikecontrol_mdns_tile.dart @@ -1,9 +1,9 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; class OpenBikeControlMdnsTile extends StatefulWidget { const OpenBikeControlMdnsTile({super.key}); diff --git a/lib/widgets/apps/zwift_mdns_tile.dart b/lib/widgets/apps/zwift_mdns_tile.dart index da86427..7efc708 100644 --- a/lib/widgets/apps/zwift_mdns_tile.dart +++ b/lib/widgets/apps/zwift_mdns_tile.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; class ZwiftMdnsTile extends StatefulWidget { final VoidCallback onUpdate; diff --git a/lib/widgets/apps/zwift_tile.dart b/lib/widgets/apps/zwift_tile.dart index db0eba1..aaffd85 100644 --- a/lib/widgets/apps/zwift_tile.dart +++ b/lib/widgets/apps/zwift_tile.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; class ZwiftTile extends StatefulWidget { final VoidCallback onUpdate; diff --git a/lib/widgets/changelog_dialog.dart b/lib/widgets/changelog_dialog.dart index d48b27f..c896440 100644 --- a/lib/widgets/changelog_dialog.dart +++ b/lib/widgets/changelog_dialog.dart @@ -1,8 +1,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_md/flutter_md.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; class ChangelogDialog extends StatelessWidget { final Markdown entry; diff --git a/lib/widgets/custom_keymap_selector.dart b/lib/widgets/custom_keymap_selector.dart index d3ed1ff..8bb3022 100644 --- a/lib/widgets/custom_keymap_selector.dart +++ b/lib/widgets/custom_keymap_selector.dart @@ -3,11 +3,11 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; import '../utils/keymap/apps/custom_app.dart'; diff --git a/lib/widgets/ignored_devices_dialog.dart b/lib/widgets/ignored_devices_dialog.dart index d48b1b5..a6545c2 100644 --- a/lib/widgets/ignored_devices_dialog.dart +++ b/lib/widgets/ignored_devices_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; class IgnoredDevicesDialog extends StatefulWidget { const IgnoredDevicesDialog({super.key}); diff --git a/lib/widgets/keymap_explanation.dart b/lib/widgets/keymap_explanation.dart index f080d08..60c9317 100644 --- a/lib/widgets/keymap_explanation.dart +++ b/lib/widgets/keymap_explanation.dart @@ -2,16 +2,16 @@ import 'dart:async'; import 'package:dartx/dartx.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/pages/button_edit.dart'; -import 'package:swift_control/pages/device.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; -import 'package:swift_control/utils/keymap/manager.dart'; -import 'package:swift_control/widgets/ui/button_widget.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/pages/button_edit.dart'; +import 'package:bike_control/pages/device.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; +import 'package:bike_control/utils/keymap/manager.dart'; +import 'package:bike_control/widgets/ui/button_widget.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import '../pages/touch_area.dart'; diff --git a/lib/widgets/logviewer.dart b/lib/widgets/logviewer.dart index 29b5489..ea43e4f 100644 --- a/lib/widgets/logviewer.dart +++ b/lib/widgets/logviewer.dart @@ -5,9 +5,9 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' show SelectionArea; import 'package:flutter/services.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import '../bluetooth/messages/notification.dart'; diff --git a/lib/widgets/menu.dart b/lib/widgets/menu.dart index 4f8d8cd..fd7b666 100644 --- a/lib/widgets/menu.dart +++ b/lib/widgets/menu.dart @@ -6,12 +6,12 @@ import 'package:flutter/material.dart' show showLicensePage; import 'package:in_app_review/in_app_review.dart'; import 'package:intl/intl.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_clickv2.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/pages/markdown.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/title.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_clickv2.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/pages/markdown.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/title.dart'; import 'package:universal_ble/universal_ble.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher_string.dart'; diff --git a/lib/widgets/pair_widget.dart b/lib/widgets/pair_widget.dart index dcfa843..2a1c626 100644 --- a/lib/widgets/pair_widget.dart +++ b/lib/widgets/pair_widget.dart @@ -1,11 +1,11 @@ import 'dart:io'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart' show LogLevel; -import 'package:swift_control/bluetooth/messages/notification.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pbenum.dart' show LogLevel; +import 'package:bike_control/bluetooth/messages/notification.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; import '../utils/requirements/multi.dart'; diff --git a/lib/widgets/scan.dart b/lib/widgets/scan.dart index c228f36..9725add 100644 --- a/lib/widgets/scan.dart +++ b/lib/widgets/scan.dart @@ -2,12 +2,12 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/pages/markdown.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/requirements/platform.dart'; -import 'package:swift_control/widgets/ui/connection_method.dart'; -import 'package:swift_control/widgets/ui/wifi_animation.dart'; +import 'package:bike_control/pages/markdown.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/requirements/platform.dart'; +import 'package:bike_control/widgets/ui/connection_method.dart'; +import 'package:bike_control/widgets/ui/wifi_animation.dart'; import 'package:url_launcher/url_launcher_string.dart'; class ScanWidget extends StatefulWidget { diff --git a/lib/widgets/testbed.dart b/lib/widgets/testbed.dart index 40f3b5e..2c06c2c 100644 --- a/lib/widgets/testbed.dart +++ b/lib/widgets/testbed.dart @@ -5,14 +5,14 @@ import 'dart:ui'; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/utils/actions/base_actions.dart' as actions; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/widgets/ui/button_widget.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/utils/actions/base_actions.dart' as actions; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/widgets/ui/button_widget.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import '../bluetooth/messages/notification.dart'; diff --git a/lib/widgets/title.dart b/lib/widgets/title.dart index f5436e9..6cca70c 100755 --- a/lib/widgets/title.dart +++ b/lib/widgets/title.dart @@ -8,12 +8,12 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:restart_app/restart_app.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; import 'package:shorebird_code_push/shorebird_code_push.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/widgets/ui/gradient_text.dart'; -import 'package:swift_control/widgets/ui/small_progress_indicator.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/widgets/ui/gradient_text.dart'; +import 'package:bike_control/widgets/ui/small_progress_indicator.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; import 'package:url_launcher/url_launcher_string.dart'; import 'package:version/version.dart'; diff --git a/lib/widgets/ui/button_widget.dart b/lib/widgets/ui/button_widget.dart index 3fdafab..d42663d 100644 --- a/lib/widgets/ui/button_widget.dart +++ b/lib/widgets/ui/button_widget.dart @@ -1,8 +1,8 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; -import 'package:swift_control/widgets/keymap_explanation.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; +import 'package:bike_control/widgets/keymap_explanation.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; class ButtonWidget extends StatelessWidget { final ControllerButton button; diff --git a/lib/widgets/ui/colored_title.dart b/lib/widgets/ui/colored_title.dart index f179440..ca84d59 100644 --- a/lib/widgets/ui/colored_title.dart +++ b/lib/widgets/ui/colored_title.dart @@ -1,5 +1,5 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/widgets/ui/gradient_text.dart'; +import 'package:bike_control/widgets/ui/gradient_text.dart'; class ColoredTitle extends StatelessWidget { final String text; diff --git a/lib/widgets/ui/connection_method.dart b/lib/widgets/ui/connection_method.dart index 4355d42..93115e3 100644 --- a/lib/widgets/ui/connection_method.dart +++ b/lib/widgets/ui/connection_method.dart @@ -1,14 +1,14 @@ import 'package:dartx/dartx.dart'; import 'package:flutter/foundation.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/gen/l10n.dart'; -import 'package:swift_control/pages/button_edit.dart'; -import 'package:swift_control/pages/markdown.dart'; -import 'package:swift_control/utils/i18n_extension.dart'; -import 'package:swift_control/utils/requirements/platform.dart'; -import 'package:swift_control/widgets/ui/beta_pill.dart'; -import 'package:swift_control/widgets/ui/small_progress_indicator.dart'; -import 'package:swift_control/widgets/ui/toast.dart'; +import 'package:bike_control/gen/l10n.dart'; +import 'package:bike_control/pages/button_edit.dart'; +import 'package:bike_control/pages/markdown.dart'; +import 'package:bike_control/utils/i18n_extension.dart'; +import 'package:bike_control/utils/requirements/platform.dart'; +import 'package:bike_control/widgets/ui/beta_pill.dart'; +import 'package:bike_control/widgets/ui/small_progress_indicator.dart'; +import 'package:bike_control/widgets/ui/toast.dart'; enum ConnectionMethodType { bluetooth, diff --git a/lib/widgets/ui/gradient_text.dart b/lib/widgets/ui/gradient_text.dart index 6d950ca..69af83f 100644 --- a/lib/widgets/ui/gradient_text.dart +++ b/lib/widgets/ui/gradient_text.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; class GradientText extends StatelessWidget { const GradientText( diff --git a/lib/widgets/ui/toast.dart b/lib/widgets/ui/toast.dart index c9d4e75..faf5171 100644 --- a/lib/widgets/ui/toast.dart +++ b/lib/widgets/ui/toast.dart @@ -1,6 +1,6 @@ import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; -import 'package:swift_control/widgets/ui/button_widget.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/widgets/ui/button_widget.dart'; void buildToast( BuildContext context, { diff --git a/pubspec.yaml b/pubspec.yaml index 71ffb72..db96513 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: swift_control +name: bike_control description: "BikeControl - Control your virtual riding" publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 4.1.0+50 diff --git a/test/bluetooth_device_detection.dart b/test/bluetooth_device_detection.dart index ba7662d..6f980b1 100644 --- a/test/bluetooth_device_detection.dart +++ b/test/bluetooth_device_detection.dart @@ -1,17 +1,17 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; -import 'package:swift_control/bluetooth/devices/bluetooth_device.dart'; -import 'package:swift_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; -import 'package:swift_control/bluetooth/devices/elite/elite_square.dart'; -import 'package:swift_control/bluetooth/devices/elite/elite_sterzo.dart'; -import 'package:swift_control/bluetooth/devices/shimano/shimano_di2.dart'; -import 'package:swift_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_click.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_clickv2.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_play.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/bluetooth/devices/bluetooth_device.dart'; +import 'package:bike_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; +import 'package:bike_control/bluetooth/devices/elite/elite_square.dart'; +import 'package:bike_control/bluetooth/devices/elite/elite_sterzo.dart'; +import 'package:bike_control/bluetooth/devices/shimano/shimano_di2.dart'; +import 'package:bike_control/bluetooth/devices/wahoo/wahoo_kickr_bike_shift.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_click.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_clickv2.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_play.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; import 'package:universal_ble/universal_ble.dart'; void main() { diff --git a/test/button_simulator_hotkeys_test.dart b/test/button_simulator_hotkeys_test.dart index a58c2f3..fa134fa 100644 --- a/test/button_simulator_hotkeys_test.dart +++ b/test/button_simulator_hotkeys_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/buttons.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/buttons.dart'; void main() { group('Button Simulator Hotkey Tests', () { diff --git a/test/custom_frame.dart b/test/custom_frame.dart index 7cfc48c..f9d7cb2 100644 --- a/test/custom_frame.dart +++ b/test/custom_frame.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:golden_screenshot/golden_screenshot.dart'; -import 'package:swift_control/widgets/ui/colors.dart'; +import 'package:bike_control/widgets/ui/colors.dart'; import 'screenshot_test.dart'; diff --git a/test/custom_profile_test.dart b/test/custom_profile_test.dart index 06f248e..6eb6a3e 100644 --- a/test/custom_profile_test.dart +++ b/test/custom_profile_test.dart @@ -1,8 +1,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/apps/custom_app.dart'; -import 'package:swift_control/utils/settings/settings.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/apps/custom_app.dart'; +import 'package:bike_control/utils/settings/settings.dart'; void main() { group('Custom Profile Tests', () { diff --git a/test/cycplus_bc2_test.dart b/test/cycplus_bc2_test.dart index 1263ec1..6184987 100644 --- a/test/cycplus_bc2_test.dart +++ b/test/cycplus_bc2_test.dart @@ -1,9 +1,9 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; -import 'package:swift_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; +import 'package:bike_control/bluetooth/devices/cycplus/cycplus_bc2.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; import 'package:universal_ble/universal_ble.dart'; void main() { diff --git a/test/long_press_test.dart b/test/long_press_test.dart index 8a58024..384307c 100644 --- a/test/long_press_test.dart +++ b/test/long_press_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; void main() { group('Long Press KeyPair Tests', () { diff --git a/test/modifier_keys_test.dart b/test/modifier_keys_test.dart index b5eff88..0aee00c 100644 --- a/test/modifier_keys_test.dart +++ b/test/modifier_keys_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:swift_control/bluetooth/devices/zwift/constants.dart'; -import 'package:swift_control/utils/keymap/keymap.dart'; +import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; +import 'package:bike_control/utils/keymap/keymap.dart'; void main() { group('Modifier Keys KeyPair Tests', () { diff --git a/test/screenshot_test.dart b/test/screenshot_test.dart index f2d21e7..2a6f2e0 100644 --- a/test/screenshot_test.dart +++ b/test/screenshot_test.dart @@ -5,12 +5,12 @@ import 'package:integration_test/integration_test.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:shadcn_flutter/shadcn_flutter.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:swift_control/bluetooth/devices/zwift/zwift_ride.dart'; -import 'package:swift_control/main.dart'; -import 'package:swift_control/pages/navigation.dart'; -import 'package:swift_control/utils/core.dart' show core; -import 'package:swift_control/utils/keymap/apps/my_whoosh.dart'; -import 'package:swift_control/utils/requirements/multi.dart'; +import 'package:bike_control/bluetooth/devices/zwift/zwift_ride.dart'; +import 'package:bike_control/main.dart'; +import 'package:bike_control/pages/navigation.dart'; +import 'package:bike_control/utils/core.dart' show core; +import 'package:bike_control/utils/keymap/apps/my_whoosh.dart'; +import 'package:bike_control/utils/requirements/multi.dart'; import 'package:universal_ble/universal_ble.dart'; import 'custom_frame.dart'; diff --git a/test/shimano_di2_test.dart b/test/shimano_di2_test.dart index b3254bf..678ff76 100644 --- a/test/shimano_di2_test.dart +++ b/test/shimano_di2_test.dart @@ -2,10 +2,10 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:swift_control/bluetooth/devices/shimano/shimano_di2.dart'; -import 'package:swift_control/utils/actions/base_actions.dart'; -import 'package:swift_control/utils/core.dart'; -import 'package:swift_control/utils/keymap/apps/openbikecontrol.dart'; +import 'package:bike_control/bluetooth/devices/shimano/shimano_di2.dart'; +import 'package:bike_control/utils/actions/base_actions.dart'; +import 'package:bike_control/utils/core.dart'; +import 'package:bike_control/utils/keymap/apps/openbikecontrol.dart'; import 'package:universal_ble/universal_ble.dart'; Future main() async { diff --git a/test/zwift.dart b/test/zwift.dart index 22862b9..3ee9aae 100644 --- a/test/zwift.dart +++ b/test/zwift.dart @@ -1,8 +1,8 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; -import 'package:swift_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; -import 'package:swift_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; +import 'package:bike_control/bluetooth/devices/zwift/ftms_mdns_emulator.dart'; +import 'package:bike_control/bluetooth/devices/zwift/protocol/zp.pb.dart'; void main() { group('Zwift Emulation', () { diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 204f936..2d98a7e 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(swift_control LANGUAGES CXX) +project(bike_control LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "swift_control") +set(BINARY_NAME "bike_control") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 38ec336..de8d97d 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "de.jonasbark" "\0" - VALUE "FileDescription", "swift_control" "\0" + VALUE "FileDescription", "bike_control" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "swift_control" "\0" + VALUE "InternalName", "bike_control" "\0" VALUE "LegalCopyright", "Copyright (C) 2025 de.jonasbark. All rights reserved." "\0" - VALUE "OriginalFilename", "swift_control.exe" "\0" - VALUE "ProductName", "swift_control" "\0" + VALUE "OriginalFilename", "bike_control.exe" "\0" + VALUE "ProductName", "BikeControl" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index 4141ea9..6a5d4ed 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"swift_control", origin, size)) { + if (!window.Create(L"bike_control", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); From 5cc49bd246163b0a792c16d9798e3eb46e974e6d Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sun, 14 Dec 2025 16:31:14 +0100 Subject: [PATCH 9/9] no device information service on Windows --- .../openbikecontrol/obc_ble_emulator.dart | 69 ++++++++++--------- .../devices/zwift/zwift_emulator.dart | 69 ++++++++++--------- 2 files changed, 70 insertions(+), 68 deletions(-) diff --git a/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart b/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart index df98acd..fc7b13e 100644 --- a/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart +++ b/lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart @@ -1,8 +1,5 @@ import 'dart:io'; -import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; -import 'package:dartx/dartx.dart'; -import 'package:flutter/foundation.dart'; import 'package:bike_control/bluetooth/devices/openbikecontrol/openbikecontrol_device.dart'; import 'package:bike_control/bluetooth/devices/openbikecontrol/protocol_parser.dart'; import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; @@ -12,6 +9,9 @@ import 'package:bike_control/utils/core.dart'; import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:bike_control/utils/keymap/keymap.dart'; import 'package:bike_control/widgets/title.dart'; +import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; +import 'package:dartx/dartx.dart'; +import 'package:flutter/foundation.dart'; import '../../messages/notification.dart' show AlertNotification; @@ -124,37 +124,38 @@ class OpenBikeControlBluetoothEmulator extends TrainerConnection { }); } - // Device Information - await _peripheralManager.addService( - GATTService( - uuid: UUID.fromString('180A'), - isPrimary: true, - characteristics: [ - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A29'), - value: Uint8List.fromList('BikeControl'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A25'), - value: Uint8List.fromList('1337'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A27'), - value: Uint8List.fromList('1.0'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A26'), - value: Uint8List.fromList((packageInfoValue?.version ?? '1.0.0').codeUnits), - descriptors: [], - ), - ], - includedServices: [], - ), - ); - + if (!Platform.isWindows) { + // Device Information + await _peripheralManager.addService( + GATTService( + uuid: UUID.fromString('180A'), + isPrimary: true, + characteristics: [ + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A29'), + value: Uint8List.fromList('BikeControl'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A25'), + value: Uint8List.fromList('1337'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A27'), + value: Uint8List.fromList('1.0'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A26'), + value: Uint8List.fromList((packageInfoValue?.version ?? '1.0.0').codeUnits), + descriptors: [], + ), + ], + includedServices: [], + ), + ); + } // Battery Service await _peripheralManager.addService( GATTService( diff --git a/lib/bluetooth/devices/zwift/zwift_emulator.dart b/lib/bluetooth/devices/zwift/zwift_emulator.dart index 6126350..f9cebb2 100644 --- a/lib/bluetooth/devices/zwift/zwift_emulator.dart +++ b/lib/bluetooth/devices/zwift/zwift_emulator.dart @@ -1,8 +1,5 @@ import 'dart:io'; -import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; -import 'package:flutter/foundation.dart'; -import 'package:permission_handler/permission_handler.dart'; import 'package:bike_control/bluetooth/ble.dart'; import 'package:bike_control/bluetooth/devices/trainer_connection.dart'; import 'package:bike_control/bluetooth/devices/zwift/constants.dart'; @@ -18,6 +15,9 @@ import 'package:bike_control/utils/keymap/buttons.dart'; import 'package:bike_control/utils/keymap/keymap.dart'; import 'package:bike_control/utils/requirements/multi.dart'; import 'package:bike_control/widgets/title.dart'; +import 'package:bluetooth_low_energy/bluetooth_low_energy.dart'; +import 'package:flutter/foundation.dart'; +import 'package:permission_handler/permission_handler.dart'; class ZwiftEmulator extends TrainerConnection { bool get isLoading => _isLoading; @@ -178,37 +178,38 @@ class ZwiftEmulator extends TrainerConnection { }); } - // Device Information - await _peripheralManager.addService( - GATTService( - uuid: UUID.fromString('180A'), - isPrimary: true, - characteristics: [ - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A29'), - value: Uint8List.fromList('BikeControl'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A25'), - value: Uint8List.fromList('09-B48123283828F1337'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A27'), - value: Uint8List.fromList('A.0'.codeUnits), - descriptors: [], - ), - GATTCharacteristic.immutable( - uuid: UUID.fromString('2A26'), - value: Uint8List.fromList((packageInfoValue?.version ?? '1.0.0').codeUnits), - descriptors: [], - ), - ], - includedServices: [], - ), - ); - + if (!Platform.isWindows) { + // Device Information + await _peripheralManager.addService( + GATTService( + uuid: UUID.fromString('180A'), + isPrimary: true, + characteristics: [ + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A29'), + value: Uint8List.fromList('BikeControl'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A25'), + value: Uint8List.fromList('09-B48123283828F1337'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A27'), + value: Uint8List.fromList('A.0'.codeUnits), + descriptors: [], + ), + GATTCharacteristic.immutable( + uuid: UUID.fromString('2A26'), + value: Uint8List.fromList((packageInfoValue?.version ?? '1.0.0').codeUnits), + descriptors: [], + ), + ], + includedServices: [], + ), + ); + } // Battery Service await _peripheralManager.addService( GATTService(