sdk
sdk copied to clipboard
The Dart SDK, including the VM, dart2js, core libraries, and more.
There is an expectation that these two methods: ```dart @pragma('vm:prefer-inline') @pragma('dart2js:tryInline') List _copy1(List array) { final List clone = List.filled(array.length, null); for (int j = 0; j < array.length; j++)...
The ability to extract a value/variable within a method as parameter of the method. This is available for Java/Kotlin.
In the absence of a good way to copy immutable objects with some field changes, the Flutter team often implements a `copyWith` function that copies the original object with optional...
With an SDK checkout, running: > cd samples-dev/swarm > dart fix --apply . doesn't catch the case here: https://dart-review.googlesource.com/c/sdk/+/253340/2/samples-dev/swarm/App.dart In the IDE, I see this is recognized ("Prefer using ///...
Consider the following program: ```dart import 'dart:async'; void f(X x) { x.asStream(); // A member from the interface of `Future`. x.whatever; // A non-member of all classes nearby. } void...
When passing a package config with `--packages` and running `dart analyze`, there is no actionable feedback if any of the paths in that config are broken. Other dart commands like...
```dart void main(final List value) { final foo = value.isEmpty ? ([value[0]] as Iterable) //warning: Unnecessary cast. : [value].map((final value) => value); foo.map; } ``` when removing the cast: ```dart...
```dart class A {} class B extends A {} class C {} void main() { final a = A(); final b = B(); final c = C(); a as B;...
Long ago `dart:html` provided methods to access the custom elements API of Web Components based on the specification version 0.5. Since then, the custom element API has changed a lot...
Where possible, code that is generated by assists, fixes, refactorings and snippets should be idiomatic with respect to enabled lints. (For example, trailing commas should be inserted where appropriate, absolute...