devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Restrict feature experiments based on Dart version instead of Flutter version

Open elliette opened this issue 3 months ago • 2 comments

As part of tackling https://github.com/flutter/devtools/issues/9438, I discovered that flutter_tools registers a service extension that we can use to fetch the current Flutter version (see https://github.com/flutter/flutter/blob/4d7ff0982c0f17a361268b5b3b5e1d9688d7db34/packages/flutter_tools/lib/src/vmservice.dart#L222) but there is no service extension equivalent that we can call for a pure Dart app.

I think this is fine for now, but in the future we might want to restrict features based on the Dart version and not the Flutter version.

elliette avatar Sep 18 '25 23:09 elliette

I believe you can get the Dart VM version from the VM object: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#vm

bkonyi avatar Sep 18 '25 23:09 bkonyi

I believe you can get the Dart VM version from the VM object: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#vm

Ah I didn't find that, thank you! I should have asked you first lol

elliette avatar Sep 19 '25 00:09 elliette