Skip to content

fix: resolve build errors with Flutter 3.41 / Dart 3.11#319

Open
muskrat34 wants to merge 1 commit intoOpenBikeControl:mainfrom
muskrat34:fix/flutter-341-compatibility
Open

fix: resolve build errors with Flutter 3.41 / Dart 3.11#319
muskrat34 wants to merge 1 commit intoOpenBikeControl:mainfrom
muskrat34:fix/flutter-341-compatibility

Conversation

@muskrat34
Copy link

Problem

Building from source with Flutter 3.41.x / Dart 3.11 fails with several compile errors due to breaking API changes introduced in recent Flutter/Dart SDK versions.

Changes

keypress_simulator_method_channel.dart

  • LogicalKeyboardKey.physicalKey was removed → replaced with PhysicalKeyboardKey(key.keyId)
  • PhysicalKeyboardKey.keyCode was removed → replaced with usbHidUsage

zwift_device.dart

  • Uint8List.startsWith() no longer exists → replaced with manual length+sublist comparison

custom_app.dart

  • whereNotNull() returns Iterable<T?> which can no longer be assigned to List<T> → replaced with whereType<KeyPair>()

ftms_mdns_emulator.dart

  • clickEmulator.startServer() no longer accepts a positional boolean argument → removed the argument

manager.dart

  • IterableFlatMap(...).flatMap() no longer exists → replaced with standard Dart expand()

Tested on

  • Flutter 3.41.4 / Dart 3.11.1
  • Windows 11
  • Build: flutter build windows --release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant