sdk
sdk copied to clipboard
The Dart SDK, including the VM, dart2js, core libraries, and more.
Private subclasses of StatefulWidgets are not reported as unused as I would have expected. ```dart import 'package:flutter/material.dart'; void main() { print('The private widget class is unused.'); } // 🔥 BAD:...
Specifically in [this file](https://github.com/dart-lang/native/pull/1090/files#r1568037779), unused `dart:lib` imports like `dart:ffi` or `dart:async` won't trigger the `unused_import` lint. Unused `package:pkg/pkg.dart` and `path/to/file.dart` imports do trigger the lint correctly! ``` - Dart 3.4.0-242.0.dev...
Today over at `pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart` we have: https://github.com/dart-lang/sdk/blob/9ac53f780c2bac16a338ad7130e5a8c5446e1212/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart#L101-L108 A similar idea was also implemented at https://dart-review.googlesource.com/c/sdk/+/464580. I was working on my own plugins today, and I think having a method for...
I'm trying to setup and use a custom analyzer plugin in a Dart workspace, but there are several things that are not working. I have a workspace-level `analysis_options.yaml` that defines...
While doing some testing on the new plugin system, I discovered that we could not _test_ whether Dart's built-in rules are active or not. Since the built-in rules are not...
I've been doing some testing for a quick fix for my plugin that may help me understand what to do for https://github.com/dart-lang/sdk/issues/55946. I've hit a weird behaviour here that I...
Repro: ```dart class C { int? get foo => null; } void f(C c) { if (c case C(:final foo)) {} } ``` Gets refactored into: ```dart class C {...
`Dart SDK version: 3.10.1 (stable) (Tue Nov 18 11:02:31 2025 -0800) on "macos_x64"` The `dart analyze` command reports diagnostics produced by an analysis-server plugin when there is an ignore comment...
Repro: ```dart class A { void foo() { int v = switch (1) { _ => getter, }; } } ``` I'll take a look at this one. CC @bwilkerson...
Repro: ```dart void foo(String s) { var (:String name) = s.pattern; } ``` The above doesn't know what the return type should be. We should look into this to see...