Update dependency dart to v3 #60

Open
renovate wants to merge 1 commits from renovate_dart-3.x into master
Owner

This PR contains the following updates:

Package Update Change
dart (source) major >=2.12.0 <3.0.0 -> <4.0.0

⚠️ Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Release Notes

dart-lang/sdk (dart)

v3.6.0

Compare Source

Language

Dart 3.6 adds digit separators to the language. To use them, set your
package's [SDK constraint][language version] lower bound to 3.6 or greater
(sdk: '^3.6.0').

Digit separators

Digits in number literals (decimal integer literals, double literals,
scientific notation literals, and hexadecimal literals) can now include
underscores between digits, as "digit separators." The separators do not change
the value of a literal, but can serve to make the number more readable.

100__000_000__000_000__000_000  // one hundred million million millions!
0x4000_0000_0000_0000
0.000_000_000_01
0x00_14_22_01_23_45  // MAC address

Separators are not allowed at the start of a number (this would be parsed as an
identifier), at the end of a number, or adjacent to another character in a
number, like ., x, or the e in scientific notation.

  • Breaking Change #​56065: The context used by the compiler and analyzer
    to perform type inference on the operand of a throw expression has been
    changed from the "unknown type" to Object. This makes the type system more
    self-consistent, because it reflects the fact that it's not legal to throw
    null. This change is not expected to make any difference in practice.
Libraries
dart:io
  • Breaking Change #​52444: Removed the Platform() constructor, which
    has been deprecated since Dart 3.1.

  • Breaking Change #​53618: HttpClient now responds to a redirect
    that is missing a "Location" header by throwing RedirectException, instead
    of StateError.

dart:js_interop
  • Added constructors for JSArrayBuffer, JSDataView, and concrete typed array
    types e.g. JSInt8Array.
  • Added length and []/[]= operators to JSArray.
  • Added toJSCaptureThis so this is passed in from JavaScript to the
    callback as the first parameter.
  • Added a static from method on JSArray to create a JSArray from a given
    JavaScript iterable or array-like object.
Tools
CFE
  • Breaking Change #​56466: The implementation of the UP and
    DOWN algorithms in the CFE are changed to match the specification
    and the corresponding implementations in the Analyzer. The upper and
    lower closures of type schemas are now computed just before they are
    passed into the subtype testing procedure instead of at the very
    beginning of the UP and DOWN algorithms.
Dart format
  • Preserve type parameters on old-style function-typed formals that also use
    this. or super..
  • Correctly format imports with both as and if clauses.
Wasm compiler (dart2wasm)
  • The condition dart.library.js is now false on conditional imports in
    dart2wasm. Note that it was already a static error to import dart:js
    directly (see #​55266).
Pub
  • Support for workspaces. This allows you to develop and resolve multiple
    packages from the same repo together. See https://dart.dev/go/pub-workspaces
    for more info.

  • New command dart pub bump. Increments the version number of the current
    package.

    For example: dart pub bump minor will change the version from 1.2.3 to
    1.3.0.

  • New validation: dart pub publish will warn if your git status is not
    clean.

  • New flag dart pub upgrade --unlock-transitive.

  • dart pub upgrade --unlock-transitive pkg, will unlock and upgrade all the
    dependencies of pkg instead of just pkg.

Analyzer
  • Add the [use_truncating_division][use_truncating_division] lint rule.
  • Add the experimental [omit_obvious_local_variable_types][omit_obvious_local_variable_types] lint rule.
  • Add the experimental [specify_nonobvious_local_variable_types][specify_nonobvious_local_variable_types] lint rule.
  • Add the experimental [avoid_futureor_void][avoid_futureor_void] lint rule.
  • Add quick fixes for more than 14 diagnostics.
  • Add new assists: "add digit separators", "remove digit separators", and
    "invert conditional expression".

v3.5.4

Compare Source

v3.5.3

Compare Source

  • Fixes an issue with the DevTools Memory tool causing OOMs. and an
    issue resulting in a missing tab bar when DevTools is embedded in
    IntelliJ and Android Studio (issue#​56607).
  • Fixes an issue with the DevTools release notes showing each time
    DevTools is opened instead of only the first time (issue#​56607).
  • Fixes an issue resulting in a missing tab bar when DevTools is
    embedded in IntelliJ and Android Studio (issue#​56607).

v3.5.2

Compare Source

  • Fixes a bug where ZLibDecoder would incorrectly attempt to decompress data
    past the end of the zlib footer (issue #​56481).
  • Fixes issue where running dart from PATH could result in some commands not
    working as expected (issues #​56080, #​56306, #​56499).
  • Fixes analysis server plugins not receiving setContextRoots requests or
    being provided incorrect context roots in multi-package workspaces (issue
    #​56475).

v3.5.1

Compare Source

  • Fixes resolving include: in analysis_options.yaml file in a nested
    folder in the workspace (issue#​56464).
  • Fixes source maps generated by dart compile wasm when optimizations are
    enabled (issue #​56423).
  • Fixes a bug in the dart2wasm compiler in unsound -O3 / -O4 modes where a
    implicit setter for a field of generic type will store null instead of the
    field value (issue #​56374).
  • Fixes a bug in the dart2wasm compiler that can trigger in certain situations
    when using partial instantiations of generic tear-offs (constructors or static
    methods) in constant expressions (issue #​56440).
  • The algorithm for computing the standard upper bound of two types,
    also known is UP, is provided the missing implementation for
    StructuralParameterType objects. In some corner cases cases the
    lacking implementation resulted in a crash of the compiler (issue #​56457).

v3.5.0

Compare Source

Language
  • Breaking Change #​55418: The context used by the compiler to perform
    type inference on the operand of an await expression has been changed to
    match the behavior of the analyzer. This change is not expected to make any
    difference in practice.

  • Breaking Change #​55436: The context used by the compiler to perform
    type inference on the right hand side of an "if-null" expression (e1 ?? e2)
    has been changed to match the behavior of the analyzer. change is expected to
    have low impact on real-world code. But in principle it could cause
    compile-time errors or changes in runtime behavior by changing inferred
    types. The old behavior can be restored by supplying explicit types.

Libraries
dart:core
  • Breaking Change #​44876: DateTime on the web platform now stores
    microseconds. The web implementation is now practically compatible with the
    native implementation, where it is possible to round-trip a timestamp in
    microseconds through a DateTime value without rounding the lower
    digits. This change might be breaking for apps that rely in some way on the
    .microsecond component always being zero, for example, expecting only three
    fractional second digits in the toString() representation. Small
    discrepancies in arithmetic due to rounding of web integers may still occur
    for extreme values, (1) microsecondsSinceEpoch outside the safe range,
    corresponding to dates with a year outside of 1685..2255, and (2) arithmetic
    (add, subtract, difference) where the Duration argument or result
    exceeds 570 years.
dart:io
  • Breaking Change #​55786: SecurityContext is now final. This means
    that SecurityContext can no longer be subclassed. SecurityContext
    subclasses were never able to interoperate with other parts of dart:io.

  • A ConnectionTask can now be created using an existing Future<Socket>.
    Fixes #​55562.

dart:typed_data
  • Breaking Change #​53785: The unmodifiable view classes for typed data
    have been removed. These classes were deprecated in Dart 3.4.

    To create an unmodifiable view of a typed-data object, use the
    asUnmodifiableView() methods added in Dart 3.3.

  • Added superinterface TypedDataList to typed data lists, implementing both
    List and TypedData. Allows abstracting over all such lists without losing
    access to either the List or the TypedData members.
    A ByteData is still only a TypedData, not a list.

dart:js_interop
  • Breaking Change #​55508: importModule now accepts a JSAny instead
    of a String to support other JS values as well, like TrustedScriptURLs.

  • Breaking Change #​55267: isTruthy and not now return JSBoolean
    instead of bool to be consistent with the other operators.

  • Breaking Change ExternalDartReference no longer implements Object.
    ExternalDartReference now accepts a type parameter T with a bound of
    Object? to capture the type of the Dart object that is externalized.
    ExternalDartReferenceToObject.toDartObject now returns a T.
    ExternalDartReferenceToObject and ObjectToExternalDartReference are now
    extensions on T and ExternalDartReference<T>, respectively, where T extends Object?. See #​55342 and #​55536 for more details.

  • Fixed some consistency issues with Function.toJS across all compilers.
    Specifically, calling Function.toJS on the same function gives you a new JS
    function (see issue #​55515), the maximum number of arguments that are
    passed to the JS function is determined by the static type of the Dart
    function, and extra arguments are dropped when passed to the JS function in
    all compilers (see #​48186).

Tools
Analyzer
  • Add the [unintended_html_in_doc_comment][unintended_html_in_doc_comment] lint rule.
  • Add the [invalid_runtime_check_with_js_interop_types][invalid_runtime_check_with_js_interop_types] lint rule.
  • Add the [document_ignores][document_ignores] lint rule.
  • Add quick fixes for more than 70 diagnostics.
  • The "Add missing switch cases" quick fix now adds multiple cases, such that
    the switch becomes exhaustive.
  • The "Remove const" quick fix now adds const keywords to child nodes, where
    appropriate.
Pub
  • New flag dart pub downgrade --tighten to restrict lower bounds of
    dependencies' constraints to the minimum that can be resolved.
Dart Runtime
  • The Dart VM only executes sound null safe code, running of unsound null
    safe code using the option --no-sound-null-safety has been removed.

  • Dart_NewListOf and Dart_IsLegacyType functions are
    removed from Dart C API.

  • Dart_DefaultCanonicalizeUrl is removed from the Dart C API.

v3.4.4

Compare Source

This is a patch release that:

  • Fixes an issue where pub would crash when failing to fetch advisories from
    the server. (issue pub#4269).

  • Fixes an issue where const bool.fromEnvironment('dart.library.ffi') is true
    and conditional import condition dart.library.ffi is true in dart2wasm.
    (issue #​55948).

  • Fixes an issue where FFI calls with variadic arguments on MacOS Arm64
    would mangle the arguments. (issue #​55943).

v3.4.3

Compare Source

This is a patch release that:

  • Fixes an issue where DART_VM_OPTIONS were not correctly parsed for
    standalone Dart executables created with dart compile exe (issue
    #​55818).

  • Fixes a bug in dart2wasm that can result in a runtime error that says
    array.new_fixed() has a constant larger than 10000 (issue #​55873).

  • Adds support for --enable-experiment flag to dart compile wasm
    (issue #​55894).

  • Fixes an issue in dart2wasm compiler that can result in incorrect
    nullability of type parameter (see #​55895).

  • Disallows dart:ffi imports in user code in dart2wasm (e.g. issue

    [#&#8203;53910](https://github.com/dart-lang/sdk/issues/53910)]) as dart2wasm's currently only supports a small subset of
    `dart:ffi` (issue [#&#8203;55890]).
    
    

v3.4.2

Compare Source

This is a patch release that:

  • Marks dart compile wasm as no longer experimental.

  • Fixes two bugs in exception handling in async functions in dart2wasm
    (issues #​55347, #​55457).

  • Fixes restoration of this variable in sync* and async functions in
    dart2wasm.

  • Implements missing control flow constructs (exceptions, switch/case with
    yields) in sync* in dart2wasm (issues #​51342, #​51343).

  • Fixes a bug dart2wasm compiler that surfaces as a compiler crash when indexing
    lists where the compiler proofs the list to be constant and the index is
    out-of-bounds (issue #​55817).

v3.4.1

Compare Source

This is a patch release that:

  • Fixes a bug in the CFE which could manifest as compilation errors of Flutter
    web apps when compiled with dart2wasm (issue #​55714).

  • Fixes a bug in the pub client, such that dart run will not interfere with
    Flutter l10n (at least for most cases) (issue #​55758).

v3.4.0

Compare Source

Language

Dart 3.4 makes improvements to the type analysis of conditional expressions
(e1 ? e2 : e3), if-null expressions (e1 ?? e2), if-null assignments
(e1 ??= e2), and switch expressions (switch (e) { p1 => e1, ... }). To take
advantage of these improvements, set your package's
SDK constraint lower bound to 3.4 or greater
(sdk: '^3.4.0').

  • Breaking Change #​54640: The pattern context type schema for
    cast patterns has been changed from Object? to _ (the unknown
    type), to align with the specification. This change is not expected
    to make any difference in practice.

  • Breaking Change #​54828: The type schema used by the compiler front end
    to perform type inference on the operand of a null-aware spread operator
    (...?) in map and set literals has been made nullable, to match what
    currently happens in list literals. This makes the compiler front end behavior
    consistent with that of the analyzer. This change is expected to be very low
    impact.

Libraries
dart:async
  • Added option for ParallelWaitError to get some meta-information that
    it can expose in its toString, and the Iterable<Future>.wait and
    (Future,...,Future).wait extension methods now provide that information.
    Should make a ParallelWaitError easier to log.
dart:cli
  • Breaking change [#​52121][]: waitFor is removed in 3.4.
dart:ffi
  • Added Struct.create and Union.create to create struct and union views
    of the sequence of bytes stored in a subtype of TypedData.
dart:io
  • Breaking change #​53863: Stdout has a new field lineTerminator,
    which allows developers to control the line ending used by stdout and
    stderr. Classes that implement Stdout must define the lineTerminator
    field. The default semantics of stdout and stderr are not changed.

  • Deprecates FileSystemDeleteEvent.isDirectory, which always returns
    false.

dart:js_interop
  • Fixes an issue with several comparison operators in JSAnyOperatorExtension
    that were declared to return JSBoolean but really returned bool. This led
    to runtime errors when trying to use the return values. The implementation now
    returns a JSBoolean to align with the interface. See issue #​55024 for
    more details.

  • Added ExternalDartReference and related conversion functions
    toExternalReference and toDartObject. This is a faster alternative to
    JSBoxedDartObject, but with fewer safety guarantees and fewer
    interoperability capabilities. See #​55187 for more details.

  • On dart2wasm, JSBoxedDartObject now is an actual JS object that wraps the
    opaque Dart value instead of only externalizing the value. Like the JS
    backends, you'll now get a more useful error when trying to use it in another
    Dart runtime.

  • Added isA helper to make type checks easier with interop types. See
    #​54138 for more details.

dart:typed_data
  • BREAKING CHANGE #​53218 #​53785: The unmodifiable view classes for
    typed data are deprecated.

    To create an unmodifiable view of a typed-data object, use the
    asUnmodifiableView() methods added in Dart 3.3:

    Uint8List data = ...;
    final readOnlyView = data.asUnmodifiableView();
    // readOnlyView has type Uint8List, and throws if attempted modified.
    

    The reason for this change is to allow more flexibility in the implementation
    of typed data, so the native and web platforms can use different strategies
    to ensure that typed data has good performance.

    The deprecated types will be removed in Dart 3.5.

Tools
Analyzer
  • Improved code completion. Fixed over 50% of completion correctness bugs,
    tagged analyzer-completion-correctness in the issue
    tracker
    .

  • Support for new annotations introduced in version 1.14.0 of the meta
    package.

    • Support for the [@doNotSubmit][@​doNotSubmit] annotation, noting that any usage of an
      annotated member should not be submitted to source control.

    • Support for the [@mustBeConst][@​mustBeConst] annotation, which indicates that an
      annotated parameter only accepts constant arguments.

Linter
  • Added the [unnecessary_library_name][unnecessary_library_name] lint.
  • Added the [missing_code_block_language_in_doc_comment][missing_code_block_language_in_doc_comment] lint.
Compilers
  • The compilation environment will no longer pretend to contain entries with
    value "" for all dart.library.foo strings, where dart:foo is not an
    available library. Instead there will only be entries for the available
    libraries, like dart.library.core, where the value was, and still is,
    "true". This should have no effect on const bool.fromEnvironment(...) or
    const String.fromEnvironment(...) without a defaultValue argument, an
    argument which was always ignored previously. It changes the behavior of
    const bool.hasEnvironment(...) on such an input, away from always being
    true and therefore useless.
DevTools
  • Updated DevTools to version 2.33.0 from 2.31.1.
    To learn more, check out the release notes for versions
    2.32.0 and 2.33.0.
Pub
  • Dependency resolution and dart pub outdated will now surface if a dependency
    is affected by a security advisory, unless the advisory is listed under a
    ignored_advisories section in the pubspec.yaml file. To learn more about
    pub's support for security advisories, visit
    dart.dev/go/pub-security-advisories.

  • path-dependencies inside git-dependencies are now resolved relative to the
    git repo.

  • All dart pub commands can now be run from any subdirectory of a project. Pub
    will find the first parent directory with a pubspec.yaml and operate
    relative it.

  • New command dart pub unpack that downloads a package from pub.dev and
    extracts it to a subfolder of the current directory.

    This can be useful for inspecting the code, or playing with examples.

Dart Runtime
  • Dart VM flags and options can now be provided to any executable generated
    using dart compile exe via the DART_VM_OPTIONS environment variable.
    DART_VM_OPTIONS should be set to a list of comma-separated flags and options
    with no whitespace. Options that allow for multiple values to be provided as
    comma-separated values are not supported (e.g.,
    --timeline-streams=Dart,GC,Compiler).

    Example of a valid DART_VM_OPTIONS environment variable:

    DART_VM_OPTIONS=--random_seed=42,--verbose_gc
    
  • Dart VM no longer supports external strings: Dart_IsExternalString,
    Dart_NewExternalLatin1String and Dart_NewExternalUTF16String functions are
    removed from Dart C API.

v3.3.4

Compare Source

This is a patch release that:

  • Fixes an issue with JS interop in dart2wasm where JS interop methods that used
    the enclosing library's @JS annotation were actually using the invocation's
    enclosing library's @JS annotation. (issue #​55430).

v3.3.3

Compare Source

This is a patch release that:

  • Fixes an issue where dart vm crashed when running on pre-SSE41 older CPUs on Windows (issue #​55211).

v3.3.2

Compare Source

This is a patch release that:

  • Fixes an issue in the CFE that placed some structural parameter references out
    of their context in the code restored from dill files, causing crashes in the
    incremental compiler whenever it restored a typedef from dill such that the
    typedef contained a generic function type on its right-hand side (issue
    #​55158).
  • Fixes an issue in the CFE that prevented redirecting factories from being
    resolved in initializers of extension types (issue #​55194).
  • Fixes an issues with VM's implementation of DateTime.timeZoneName
    on Windows, which was checking whether current date is in the summer or
    standard time rather than checking if the given moment is in the summer or
    standard time (issue #​55240).

v3.3.1

Compare Source

This is a patch release that:

  • Fixes an issue in dart2js where object literal constructors in interop
    extension types would fail to compile without an @JS annotation on the
    library (issue #​55057).
  • Disallows certain types involving extension types from being used as the
    operand of an await expression, unless the extension type itself implements
    Future (issue #​55095).

v3.3.0

Compare Source

Language

Dart 3.3 adds extension types to the language. To use them, set your
package's [SDK constraint][language version] lower bound to 3.3 or greater
(sdk: '^3.3.0').

Extension types

An extension type wraps an existing type with a different, static-only
interface. It works in a way which is in many ways similar to a class that
contains a single final instance variable holding the wrapped object, but
without the space and time overhead of an actual wrapper object.

Extension types are introduced by extension type declarations. Each
such declaration declares a new named type (not just a new name for the
same type). It declares a representation variable whose type is the
representation type. The effect of using an extension type is that the
representation (that is, the value of the representation variable) has
the members declared by the extension type rather than the members declared
by its "own" type (the representation type). Example:

extension type Meters(int value) {
  String get label => '${value}m';
  Meters operator +(Meters other) => Meters(value + other.value);
}

void main() {
  var m = Meters(42); // Has type `Meters`.
  var m2 = m + m; // OK, type `Meters`.
  // int i = m; // Compile-time error, wrong type.
  // m.isEven; // Compile-time error, no such member.
  assert(identical(m, m.value)); // Succeeds.
}

The declaration Meters is an extension type that has representation type
int. It introduces an implicit constructor Meters(int value); and a
getter int get value. m and m.value is the very same object, but m
has type Meters and m.value has type int. The point is that m
has the members of Meters and m.value has the members of int.

Extension types are entirely static, they do not exist at run time. If o
is the value of an expression whose static type is an extension type E
with representation type R, then o is just a normal object whose
run-time type is a subtype of R, exactly like the value of an expression
of type R. Also the run-time value of E is R (for example, E == R
is true). In short: At run time, an extension type is erased to the
corresponding representation type.

A method call on an expression of an extension type is resolved at
compile-time, based on the static type of the receiver, similar to how
extension method calls work. There is no virtual or dynamic dispatch. This,
combined with no memory overhead, means that extension types are zero-cost
wrappers around their representation value.

While there is thus no performance cost to using extension types, there is
a safety cost. Since extension types are erased at compile time, run-time
type tests on values that are statically typed as an extension type will
check the type of the representation object instead, and if the type check
looks like it tests for an extension type, like is Meters, it actually
checks for the representation type, that is, it works exactly like is int
at run time. Moreover, as mentioned above, if an extension type is used as
a type argument to a generic class or function, the type variable will be
bound to the representation type at run time. For example:

void main() {
  var meters = Meters(3);

  // At run time, `Meters` is just `int`.
  print(meters is int); // Prints "true".
  print(<Meters>[] is List<int>); // Prints "true".

  // An explicit cast is allowed and succeeds as well:
  List<Meters> meterList = <int>[1, 2, 3] as List<Meters>;
  print(meterList[1].label); // Prints "2m".
}

Extension types are useful when you are willing to sacrifice some run-time
encapsulation in order to avoid the overhead of wrapping values in
instances of wrapper classes, but still want to provide a different
interface than the wrapped object. An example of that is interop, where you
may have data that are not Dart objects to begin with (for example, raw
JavaScript objects when using JavaScript interop), and you may have large
collections of objects where it's not efficient to allocate an extra object
for each element.

Other changes
  • Breaking Change #​54056: The rules for private field promotion have
    been changed so that an abstract getter is considered promotable if there are
    no conflicting declarations. There are no conflicting declarations if
    there are no non-final fields, external fields, concrete getters, or
    noSuchMethod forwarding getters with the same name in the same library.
    This makes the implementation more consistent and allows
    type promotion in a few rare scenarios where it wasn't previously allowed.
    It is unlikely, but this change could cause a breakage by changing
    an inferred type in a way that breaks later code. For example:

    class A {
      int? get _field;
    }
    class B extends A {
      final int? _field;
      B(this._field);
    }
    test(A a) {
      if (a._field != null) {
        var x = a._field; // Previously had type `int?`; now has type `int`
        ...
        x = null; // Previously allowed; now causes a compile-time error.
      }
    }
    

    Affected code can be fixed by adding an explicit type annotation.
    For example, in the above snippet, var x can be changed to int? x.

    It's also possible that some continuous integration configurations might fail
    if they have been configured to treat warnings as errors, because the expanded
    type promotion could lead to one of the following warnings:

    • unnecessary_non_null_assertion
    • unnecessary_cast
    • invalid_null_aware_operator

    These warnings can be addressed in the usual way, by removing the unnecessary
    operation in the first two cases, or changing ?. to . in the third case.

    To learn more about other rules surrounding type promotion,
    check out the guide on Fixing type promotion failures.

Libraries
dart:core
  • String.fromCharCodes now allow start and end to be after the end of
    the Iterable argument, just like skip and take does on an Iterable.
dart:ffi
  • In addition to functions, @Native can now be used on fields.
  • Allow taking the address of native functions and fields via
    Native.addressOf.
  • The elementAt pointer arithmetic extension methods on
    core Pointer types are now deprecated.
    Migrate to the new - and + operators instead.
  • The experimental and deprecated @FfiNative annotation has been removed.
    Usages should be updated to use the @Native annotation.
dart:js_interop
  • Breaking Change in the representation of JS types #​52687: JS types
    like JSAny were previously represented using a custom erasure of
    @staticInterop types that were compiler-specific. They are now represented
    as extension types where their representation types are compiler-specific.
    This means that user-defined @staticInterop types that implemented JSAny
    or JSObject can no longer do so and need to use
    JSObject.fromInteropObject. Going forward, it's recommended to use extension
    types to define interop APIs. Those extension types can still implement JS
    types.
  • JSArray and JSPromise generics: JSArray and JSPromise are now generic
    types whose type parameter is a subtype of JSAny?. Conversions to and from
    these types are changed to account for the type parameters of the Dart or JS
    type, respectively.
  • Breaking Change in names of extensions: Some dart:js_interop extension
    members are moved to different extensions on the same type or a supertype to
    better organize the API surface. See JSAnyUtilityExtension and
    JSAnyOperatorExtension for the new extensions. This shouldn't make a
    difference unless the extension names were explicitly used.
  • Add importModule to allow users to dynamically import modules using the JS
    import() expression.
dart:js_interop_unsafe
  • Add has helper to make hasProperty calls more concise.
dart:typed_data
  • BREAKING CHANGE (https://github.com/dart-lang/sdk/issues/53218) The
    unmodifiable view classes for typed data are deprecated. Instead of using the
    constructors for these classes to create an unmodifiable view, e.g.

    Uint8List data = ...
    final readOnlyView = UnmodifiableUint8ListView(data);
    

    use the new asUnmodifiableView() methods:

    Uint8List data = ...
    final readOnlyView = data.asUnmodifiableView();
    

    The reason for this change is to allow more flexibility in the implementation
    of typed data so the native and web platforms can use different strategies
    for ensuring typed data has good performance.

    The deprecated types will be removed in a future Dart version.

dart:nativewrappers
  • Breaking Change #​51896: The NativeWrapperClasses are marked base so
    that none of their subtypes can be implemented. Implementing subtypes can lead
    to crashes when passing such native wrapper to a native call, as it will try
    to unwrap a native field that doesn't exist.
Tools
Dart command line
  • The dart create command now uses v3 of package:lints,
    including multiple new recommended lints by default.
    To learn more about the updated collection of lints,
    check out the package:lints 3.0.0 changelog entry.
DevTools
  • Updated DevTools to version 2.31.1 from 2.28.1.
    To learn more, check out the release notes for versions
    2.29.0, 2.30.0,
    and 2.31.0.
Wasm compiler (dart2wasm)
  • Breaking Change #​54004: dart:js_util, package:js, and dart:js
    are now disallowed from being imported when compiling with dart2wasm. Prefer
    using dart:js_interop and dart:js_interop_unsafe.
Development JavaScript compiler (DDC)
  • Type arguments of package:js interop types are now printed as any instead
    of being omitted. This is simply a change to the textual representation of
    package js types that have type arguments. These type arguments are still
    completely ignored by the type system at runtime.

  • Removed "implements <...>" text from the Chrome custom formatter display for
    Dart classes. This information provides little value and keeping it imposes an
    unnecessary maintenance cost.

Production JavaScript compiler (dart2js)
  • Breaking Change #​54201:
    The Invocation that is passed to noSuchMethod will no longer have a
    minified memberName, even when dart2js is invoked with --minify.
    See #​54201 for more details.
Analyzer
  • You can now suppress diagnostics in pubspec.yaml files by
    adding an # ignore: <diagnostic_id> comment.
  • Invalid dart doc comment directives are now reported.
  • The [flutter_style_todos][flutter_style_todos] lint now has a quick fix.
Linter
  • Removed the iterable_contains_unrelated_type and
    list_remove_unrelated_type lints.
    Consider migrating to the expanded
    [collection_methods_unrelated_type][collection_methods_unrelated_type] lint.
  • Removed various lints that are no longer necessary with sound null safety:
    • always_require_non_null_named_parameters
    • avoid_returning_null,
    • avoid_returning_null_for_future

v3.2.6

Compare Source

v3.2.5

Compare Source

v3.2.4

Compare Source

v3.2.3

Compare Source

This is a patch release that:

  • Disallows final fields to be used in a constant context during analysis
    (issue #​54232).
  • Upgrades Dart DevTools to version 2.28.4 (issue #​54213).
  • Fixes new AOT snapshots in the SDK failing with SIGILL in ARM
    environments that don't support the integer division
    instructions or x86-64 environments that don't support
    SSE4.1 (issue #​54215).

v3.2.2

Compare Source

This is a patch release that:

  • Adjusts the nullablity computations in the implementation of the
    upper bound algorithm in the compiler frontend (issue #​53999).

  • Fixes missing closure code completion entries for function parameters
    for LSP-based editors like VS Code (issue #​54112).

v3.2.1

Compare Source

This is a patch release that:

  • Fixes the left/mobile sidebar being empty on non-class pages
    in documentation generated with dart doc (issue #​54073).

  • Fixes a JSON array parsing bug that causes a segmentation fault when
    flutter test is invoked with the --coverage flag
    (SDK issue #​54059, Flutter issue #​124145).

  • Upgrades Dart DevTools to version 2.28.3 (issue #​54085).

v3.2.0

Compare Source

Language

Dart 3.2 adds the following features. To use them, set your package's SDK
constraint
lower bound to 3.2 or greater (sdk: '^3.2.0').

  • Private field promotion: In most circumstances, the types of private final
    fields can now be promoted by null checks and is tests. For example:

    class Example {
      final int? _privateField;
      Example(this._privateField);
    
      f() {
        if (_privateField != null) {
          // _privateField has now been promoted; you can use it without
          // null checking it.
          int i = _privateField; // OK
        }
      }
    }
    
    // Private field promotions also work from outside of the class:
    f(Example x) {
      if (x._privateField != null) {
        int i = x._privateField; // OK
      }
    }
    

    To ensure soundness, a field is not eligible for field promotion in the
    following circumstances:

    • If it's not final (because a non-final field could be changed in between the
      test and the usage, invalidating the promotion).
    • If it's overridden elsewhere in the library by a concrete getter or a
      non-final field (because an access to an overridden field might resolve at
      runtime to the overriding getter or field).
    • If it's not private (because a non-private field might be overridden
      elsewhere in the program).
    • If it has the same name as a concrete getter or a non-final field in some
      other unrelated class in the library (because a class elsewhere in the
      program might extend one of the classes and implement the other, creating an
      override relationship between them).
    • If there is a concrete class C in the library whose interface contains a
      getter with the same name, but C does not have an implementation of that
      getter (such unimplemented getters aren't safe for field promotion, because
      they are implicitly forwarded to noSuchMethod, which might not return the
      same value each time it's called).
  • Breaking Change #​53167: Use a more precise split point for refutable
    patterns. Previously, in an if-case statement, if flow analysis could prove
    that the scrutinee expression was guaranteed to throw an exception, it would
    sometimes fail to propagate type promotions implied by the pattern to the
    (dead) code that follows. This change makes the type promotion behavior of
    if-case statements consistent regardless of whether the scrutinee expression
    throws an exception.

    No live code is affected by this change, but there is a small chance that the
    change in types will cause a compile-time error to appear in some dead code in
    the user's project, where no compile-time error appeared previously.

Libraries
dart:async
  • Added broadcast parameter to Stream.empty constructor.
dart:cli
  • Breaking change #​52121:
    • waitFor is disabled by default and slated for removal in 3.4. Attempting
      to call this function will now throw an exception. Users that still depend
      on waitFor can enable it by passing --enable_deprecated_wait_for flag
      to the VM.
dart:convert
  • Breaking change #​52801:
    • Changed return types of utf8.encode() and Utf8Codec.encode() from
      List<int> to Uint8List.
dart:developer
  • Deprecated the Service.getIsolateID method.
  • Added getIsolateId method to Service.
  • Added getObjectId method to Service.
dart:ffi
  • Added the NativeCallable.isolateLocal constructor. This creates
    NativeCallables with the same functionality as Pointer.fromFunction,
    except that NativeCallable accepts closures.
  • Added the NativeCallable.keepIsolateAlive method, which determines whether
    the NativeCallable keeps the isolate that created it alive.
  • All NativeCallable constructors can now accept closures. Previously
    NativeCallables had the same restrictions as Pointer.fromFunction, and
    could only create callbacks for static functions.
  • Breaking change #​53311: NativeCallable.nativeFunction now throws an
    error if is called after the NativeCallable has already been closed. Calls
    to close after the first are now ignored.
dart:io
  • Breaking change #​53005: The headers returned by
    HttpClientResponse.headers and HttpRequest.headers no longer include
    trailing whitespace in their values.

  • Breaking change #​53227: Folded headers values returned by
    HttpClientResponse.headers and HttpRequest.headers now have a space
    inserted at the fold point.

dart:isolate
  • Added Isolate.packageConfigSync and Isolate.resolvePackageUriSync APIs.
dart:js_interop
  • Breaking Change on JSNumber.toDart and Object.toJS:
    JSNumber.toDart is removed in favor of toDartDouble and toDartInt to
    make the type explicit. Object.toJS is also removed in favor of
    Object.toJSBox. Previously, this function would allow Dart objects to flow
    into JS unwrapped on the JS backends. Now, there's an explicit wrapper that is
    added and unwrapped via JSBoxedDartObject.toDart. Similarly,
    JSExportedDartObject is renamed to JSBoxedDartObject and the extensions
    ObjectToJSExportedDartObject and JSExportedDartObjectToObject are renamed
    to ObjectToJSBoxedDartObject and JSBoxedDartObjectToObject in order to
    avoid confusion with @JSExport.
  • Type parameters in external APIs:
    Type parameters must now be bound to a static interop type or one of the
    dart:js_interop types like JSNumber when used in an external API. This
    only affects dart:js_interop classes and not package:js or other forms of
    JS interop.
  • Subtyping dart:js_interop types:
    @staticInterop types can subtype only JSObject and JSAny from the set of
    JS types in dart:js_interop. Subtyping other types from dart:js_interop
    would result in confusing type errors before, so this makes it a static error.
  • Global context of dart:js_interop and @staticInterop APIs:
    Static interop APIs will now use the same global context as non-static interop
    instead of globalThis to avoid a greater migration. Static interop APIs,
    either through dart:js_interop or the @staticInterop annotation, have used
    JavaScript's globalThis as the global context. This is relevant to things
    like external top-level members or external constructors, as this is the root
    context we expect those members to reside in. Historically, this was not the
    case in dart2js and DDC. We used either self or DDC's global in non-static
    interop APIs with package:js. So, static interop APIs will now use one of
    those global contexts. Functionally, this should matter in only a very small
    number of cases, like when using older browser versions. dart:js_interop's
    globalJSObject is also renamed to globalContext and returns the global
    context used in the lowerings.
  • Breaking Change on Types of dart:js_interop External APIs:
    External JS interop APIs when using dart:js_interop are restricted to a set
    of allowed types. Namely, this includes the primitive types like String, JS
    types from dart:js_interop, and other static interop types (either through
    @staticInterop or extension types).
  • Breaking Change on dart:js_interop isNull and isUndefined:
    null and undefined can only be discerned in the JS backends. dart2wasm
    conflates the two values and treats them both as Dart null. Therefore, these
    two helper methods should not be used on dart2wasm and will throw to avoid
    potentially erroneous code.
  • Breaking Change on dart:js_interop typeofEquals and instanceof:
    Both APIs now return a bool instead of a JSBoolean. typeofEquals also
    now takes in a String instead of a JSString.
  • Breaking Change on dart:js_interop JSAny and JSObject:
    These types can only be implemented, and no longer extended, by user
    @staticInterop types.
  • Breaking Change on dart:js_interop JSArray.withLength:
    This API now takes in an int instead of JSNumber.
Tools
Development JavaScript compiler (DDC)
  • Applications compiled by DDC will no longer add members to the native
    JavaScript Object prototype.
  • Breaking change for JS interop with Symbols and BigInts:
    JavaScript Symbols and BigInts are now associated with their own
    interceptor and should not be used with package:js classes. These types were
    being intercepted with the assumption that they are a subtype of JavaScript's
    Object, but this is incorrect. This lead to erroneous behavior when using
    these types as Dart Objects. See #​53106 for more details. Use
    dart:js_interop's JSSymbol and JSBigInt with extension types to interop
    with these types.
Production JavaScript compiler (dart2js)
  • Breaking change for JS interop with Symbols and BigInts:
    JavaScript Symbols and BigInts are now associated with their own
    interceptor and should not be used with package:js classes. These types were
    being intercepted with the assumption that they are a subtype of JavaScript's
    Object, but this is incorrect. This lead to erroneous behavior when using
    these types as Dart Objects. See #​53106 for more details. Use
    dart:js_interop's JSSymbol and JSBigInt with extension types to interop
    with these types.
Dart command line
  • The dart create command has a new cli template
    to quickly create Dart command-line applications
    with basic argument parsing capabilities.
    To learn more about using the template,
    run dart help create.
Dart format
  • Always split enum declarations containing a line comment.
  • Fix regression in splitting type annotations with library prefixes.
  • Support --enable-experiment command-line option to enable language
    experiments.
DevTools
Linter
  • Added the experimental [annotate_redeclares][annotate_redeclares] lint.
  • Marked the [use_build_context_synchronously][use_build_context_synchronously] lint as stable.
Pub
  • New option dart pub upgrade --tighten which will update dependencies' lower
    bounds in pubspec.yaml to match the current version.
  • The commands dart pub get/add/upgrade will now show if a dependency
    changed between direct, dev and transitive dependency.
  • The command dart pub upgrade no longer shows unchanged dependencies.

v3.1.5

Compare Source

This is a patch release that:

  • Fixes an issue affecting Dart compiled to JavaScript running in Node.js 21. A
    change in Node.js 21 affected the Dart Web compiler runtime. This patch
    release accommodates for those changes (issue #​53810).

v3.1.4

Compare Source

This is a patch release that:

  • Fixes an issue in the Dart VM, users are not being able to see
    value of variables while debugging code (issue [#​53747]).

v3.1.3

Compare Source

This is a patch release that:

  • Fixes a bug in dart2js which would cause the compiler to crash when using
    @staticInterop @anonymous factory constructors with type parameters (see
    issue #​53579 for more details).

  • The standalone Dart VM now exports symbols only for the Dart_* embedding API
    functions, avoiding conflicts with other DSOs loaded into the same process,
    such as shared libraries loaded through dart:ffi, that may have different
    versions of the same symbols (issue [#​53503]).

  • Fixes an issue with super slow access to variables while debugging.
    The fix avoids searching static functions in the imported libraries
    as references to members are fully resolved by the front-end. (issue
    #​53541)

v3.1.2

Compare Source

This is a patch release that:

  • Fixes a bug in dart2js which crashed the compiler when a typed record pattern
    was used outside the scope of a function body, such as in a field initializer.
    For example final x = { for (var (int a,) in someList) a: a };
    (issue #​53449)

  • Fixes an expedient issue of users seeing an unhandled
    exception pause in the debugger, please see
    https://github.com/dart-lang/sdk/issues/53450 for more
    details.
    The fix uses try/catch in lookupAddresses instead of
    Future error so that we don't see an unhandled exception
    pause in the debugger (issue #​53450)

v3.1.1

Compare Source

This is a patch release that:

  • Fixes a bug in the parser which prevented a record pattern from containing a
    nested record pattern, where the nested record pattern uses record
    destructuring shorthand syntax, for example final ((:a, :b), c) = record;
    (issue #​53352).

v3.1.0

Compare Source

Libraries
dart:async
  • Breaking change #​52334:
    • Added the interface modifier to purely abstract classes:
      MultiStreamController, StreamConsumer, StreamIterator and
      StreamTransformer. As a result, these types can only be implemented,
      not extended or mixed in.
dart:core
  • Uri.base on native platforms now respects IOOverrides overriding
    current directory (#​39796).
dart:ffi
  • Added the NativeCallable class, which can be used to create callbacks that
    allow native code to call into Dart code from any thread. See
    NativeCallable.listener. In future releases, NativeCallable will be
    updated with more functionality, and will become the recommended way of
    creating native callbacks for all use cases, replacing Pointer.fromFunction.
dart:io
  • Breaking change #​51486:
    • Added sameSite to the Cookie class.
    • Added class SameSite.
  • Breaking change #​52027: FileSystemEvent is
    sealed. This means
    that FileSystemEvent cannot be extended or implemented.
  • Added a deprecation warning when Platform is instantiated.
  • Added Platform.lineTerminator which exposes the character or characters
    that the operating system uses to separate lines of text, e.g.,
    "\r\n" on Windows.
dart:js_interop
  • Object literal constructors:
    ObjectLiteral is removed from dart:js_interop. It's no longer needed in
    order to declare an object literal constructor with inline classes. As long as
    an external constructor has at least one named parameter, it'll be treated as
    an object literal constructor. If you want to create an object literal with no
    named members, use {}.jsify().
Other libraries
package:js
  • Breaking change to @staticInterop and external extension members:
    external @staticInterop members and external extension members can no
    longer be used as tear-offs. Declare a closure or a non-external method that
    calls these members, and use that instead.
  • Breaking change to @staticInterop and external extension members:
    external @staticInterop members and external extension members will
    generate slightly different JS code for methods that have optional parameters.
    Whereas before, the JS code passed in the default value for missing optionals,
    it will now pass in only the provided members. This aligns with how JS
    parameters work, where omitted parameters are actually omitted. For example,
    calling external void foo([int a, int b]) as foo(0) will now result in
    foo(0), and not foo(0, null).
Tools
DevTools
Linter

v3.0.7

Compare Source

This is a patch release that:

  • Fixes a bug in dart2js which would cause certain uses of records to lead to
    bad codegen causing a TypeError or NoSuchMethodError to be thrown
    at runtime (issue #​53001).

v3.0.6

Compare Source

This is a patch release that:

  • Fixes a flow in flow analysis that causes it to sometimes ignore destructuring
    assignments (issue #​52767).
  • Fixes an infinite loop in some web development compiles that include is or
    as expressions involving record types with named fields (issue #​52869).
  • Fixes a memory leak in Dart analyzer's file-watching (issue #​52791).
  • Fixes a memory leak of file system watcher related data structures (issue #​52793).

v3.0.5

Compare Source

This is a patch release that:

  • Fixes a bad cast in the frontend which can manifest as a crash in the dart2js
    ListFactorySpecializer during Flutter web builds (issue #​52403).

v3.0.4

Compare Source

This is a patch release that:

  • dart format now handles formatting nullable record types
    with no fields (dart_style issue #​1224).
  • Fixes error when using records when targeting the web in development mode
    (issue #​52480).

v3.0.3

Compare Source

This is a patch release that:

  • Fixes an AOT compiler crash when generating an implicit getter
    returning an unboxed record (issue #​52449).
  • Fixes a situation in which variables appearing in multiple branches of an
    or-pattern might be erroneously reported as being mismatched (issue #​52373).
  • Adds missing interface modifiers on the purely abstract classes
    MultiStreamController, StreamConsumer, StreamIterator and
    StreamTransformer (issue #​52334).
  • Fixes an error during debugging when InternetAddress.tryParse is
    used (issue #​52423).
  • Fixes a VM issue causing crashes on hot reload (issue #​126884).
  • Improves linter support (issue #​4195).
  • Fixes an issue in variable patterns preventing users from expressing
    a pattern match using a variable or wildcard pattern with a nullable
    record type (issue #​52439).
  • Updates warnings and provide instructions for updating the Dart pub
    cache on Windows (issue #​52386).

v3.0.2

Compare Source

This is a patch release that:

  • Fixes a dart2js crash when using a switch case expression on a record where
    the fields don't match the cases (issue #​52438).
  • Add class modifier chips on class and mixin pages
    generated with dart doc (issue #​3392).
  • Fixes a situation causing the parser to fail resulting in an infinite loop
    leading to higher memory usage (issue #​52352).
  • Add clear errors when mixing inheritance in pre and post Dart 3 libraries
    (issue: #​52078).

v3.0.1

Compare Source

This is a patch release that:

  • Fixes a compiler crash involving redirecting factories and FFI
    (issue #​124369).
  • Fixes a dart2js crash when using a combination of local functions, generics,
    and records (issue #​51899).
  • Fixes incorrect error using a void in a switch case expression
    (issue #​52191).
  • Fixes a false error when using in switch case expressions when the switch
    refers to a private getter (issue #​52041).
  • Prevent the use of when and as as variable names in patterns
    (issue #​52260).
  • Fixes an inconsistency in type promotion between the analyzer and VM
    (issue #​52241).
  • Improve performance on functions with many parameters (issue #​1212).

v3.0.0

Compare Source

Language

Dart 3.0 adds the following features. To use them, set your package's SDK
constraint
lower bound to 3.0 or greater (sdk: '^3.0.0').

  • Records: Records are anonymous immutable data structures that let you
    aggregate multiple values together, similar to tuples in other languages.
    With records, you can return multiple values from a function, create composite
    map keys, or use them any other place where you want to bundle a couple of
    objects together.

    For example, using a record to return two values:

    (double x, double y) geoLocation(String name) {
      if (name == 'Nairobi') {
        return (-1.2921, 36.8219);
      } else {
        ...
      }
    }
    
  • Pattern matching: Expressions build values out of smaller pieces.
    Conversely, patterns are an expressive tool for decomposing values back into
    their constituent parts. Patterns can call getters on an object, access
    elements from a list, pull fields out of a record, etc. For example, we can
    destructure the record from the previous example like so:

    var (lat, long) = geoLocation('Nairobi');
    print('Nairobi is at $lat, $long.');
    

    Patterns can also be used in switch cases. There, you can destructure values
    and also test them to see if they have a certain type or value:

    switch (object) {
      case [int a]:
        print('A list with a single integer element $a');
      case ('name', _):
        print('A two-element record whose first field is "name".');
      default: print('Some other object.');
    }
    

    Also, as you can see, non-empty switch cases no longer need break;
    statements.

    Breaking change: Dart 3.0 interprets switch cases as patterns instead of
    constant expressions. Most constant expressions found in switch cases are
    valid patterns with the same meaning (named constants, literals, etc.). You
    may need to tweak a few constant expressions to make them valid. This only
    affects libraries that have upgraded to language version 3.0.

  • Switch expressions: Switch expressions allow you to use patterns and
    multi-way branching in contexts where a statement isn't allowed:

    return TextButton(
      onPressed: _goPrevious,
      child: Text(switch (page) {
        0 => 'Exit story',
        1 => 'First page',
        _ when page == _lastPage => 'Start over',
        _ => 'Previous page',
      }),
    );
    
  • If-case statements and elements: A new if construct that matches a value
    against a pattern and executes the then or else branch depending on whether
    the pattern matches:

    if (json case ['user', var name]) {
      print('Got user message for user $name.');
    }
    

    There is also a corresponding if-case element that can be used in collection
    literals.

  • Sealed classes: When you mark a type sealed, the compiler ensures that
    switches on values of that type exhaustively cover every subtype. This
    enables you to program in an algebraic datatype style with the
    compile-time safety you expect:

    sealed class Amigo {}
    class Lucky extends Amigo {}
    class Dusty extends Amigo {}
    class Ned extends Amigo {}
    
    String lastName(Amigo amigo) =>
        switch (amigo) {
          Lucky _ => 'Day',
          Ned _   => 'Nederlander',
        };
    

    In this last example, the compiler reports an error that the switch doesn't
    cover the subclass Dusty.

  • Class modifiers: New modifiers final, interface, base, and mixin
    on class and mixin declarations let you control how the type can be used.
    By default, Dart is flexible in that a single class declaration can be used as
    an interface, a superclass, or even a mixin. This flexibility can make it
    harder to evolve an API over time without breaking users. We mostly keep the
    current flexible defaults, but these new modifiers give you finer-grained
    control over how the type can be used.

    Breaking change: Class declarations from libraries that have been upgraded
    to Dart 3.0 can no longer be used as mixins by default. If you want the class
    to be usable as both a class and a mixin, mark it mixin class. If you want it to be used only as a mixin, make it a mixin
    declaration. If you haven't upgraded a class to Dart 3.0, you can still use it
    as a mixin.

  • Breaking change #​50902: Dart reports a compile-time error if a
    continue statement targets a label that is not a loop (for, do and
    while statements) or a switch member. Fix this by changing the continue
    to target a valid labeled statement.

  • Breaking change language/#​2357: Starting in language version 3.0,
    Dart reports a compile-time error if a colon (:) is used as the
    separator before the default value of an optional named parameter.
    Fix this by changing the colon (:) to an equal sign (=).

Libraries
General changes
  • Breaking Change: Non-mixin classes in the platform libraries
    can no longer be mixed in, unless they are explicitly marked as mixin class.
    The following existing classes have been made mixin classes:
    • Iterable
    • IterableMixin (now alias for Iterable)
    • IterableBase (now alias for Iterable)
    • ListMixin
    • SetMixin
    • MapMixin
    • LinkedListEntry
    • StringConversionSink
dart:core
  • Added bool.parse and bool.tryParse static methods.

  • Added DateTime.timestamp() constructor to get current time as UTC.

  • The type of RegExpMatch.pattern is now RegExp, not just Pattern.

  • Breaking change #​49529:

    • Removed the deprecated List constructor, as it wasn't null safe.
      Use list literals (e.g. [] for an empty list or <int>[] for an empty
      typed list) or [List.filled][List.filled].
    • Removed the deprecated onError argument on [int.parse][int.parse], [double.parse][double.parse],
      and [num.parse][num.parse]. Use the [tryParse][tryParse] method instead.
    • Removed the deprecated [proxy][proxy] and [Provisional][Provisional] annotations.
      The original proxy annotation has no effect in Dart 2,
      and the Provisional type and [provisional][provisional] constant
      were only used internally during the Dart 2.0 development process.
    • Removed the deprecated [Deprecated.expires][Deprecated.expires] getter.
      Use [Deprecated.message][Deprecated.message] instead.
    • Removed the deprecated [CastError][CastError] error.
      Use [TypeError][TypeError] instead.
    • Removed the deprecated [FallThroughError][FallThroughError] error. The kind of
      fall-through previously throwing this error was made a compile-time
      error in Dart 2.0.
    • Removed the deprecated [NullThrownError][NullThrownError] error. This error is never
      thrown from null safe code.
    • Removed the deprecated [AbstractClassInstantiationError][AbstractClassInstantiationError] error. It was made
      a compile-time error to call the constructor of an abstract class in Dart 2.0.
    • Removed the deprecated [CyclicInitializationError][CyclicInitializationError]. Cyclic dependencies are
      no longer detected at runtime in null safe code. Such code will fail in other
      ways instead, possibly with a StackOverflowError.
    • Removed the deprecated [NoSuchMethodError][NoSuchMethodError] default constructor.
      Use the [NoSuchMethodError.withInvocation][NoSuchMethodError.withInvocation] named constructor instead.
    • Removed the deprecated [BidirectionalIterator][BidirectionalIterator] class.
      Existing bidirectional iterators can still work, they just don't have
      a shared supertype locking them to a specific name for moving backwards.
  • Breaking change when migrating code to Dart 3.0:
    Some changes to platform libraries only affect code when that code is migrated
    to language version 3.0.

    • The Function type can no longer be implemented, extended or mixed in.
      Since Dart 2.0 writing implements Function has been allowed
      for backwards compatibility, but it has not had any effect.
      In Dart 3.0, the Function type is final and cannot be subtyped,
      preventing code from mistakenly assuming it works.

    • The following declarations can only be implemented, not extended:

      • Comparable
      • Exception
      • Iterator
      • Pattern
      • Match
      • RegExp
      • RegExpMatch
      • StackTrace
      • StringSink

      None of these declarations contained any implementation to inherit,
      and are marked as interface to signify that they are only intended
      as interfaces.

    • The following declarations can no longer be implemented or extended:

      • MapEntry
      • OutOfMemoryError
      • StackOverflowError
      • Expando
      • WeakReference
      • Finalizer

      The MapEntry value class is restricted to enable later optimizations.
      The remaining classes are tightly coupled to the platform and not
      intended to be subclassed or implemented.

dart:async
  • Added extension member wait on iterables and 2-9 tuples of futures.

  • Breaking change #​49529:

    • Removed the deprecated [DeferredLibrary][DeferredLibrary] class.
      Use the [deferred as][deferred as] import syntax instead.
dart:collection
  • Added extension members nonNulls, firstOrNull, lastOrNull,
    singleOrNull, elementAtOrNull and indexed on Iterables.
    Also exported from dart:core.

  • Deprecated the HasNextIterator class (#​50883).

  • Breaking change when migrating code to Dart 3.0:
    Some changes to platform libraries only affect code when it is migrated
    to language version 3.0.

    • The following interface can no longer be extended, only implemented:
      • Queue
    • The following implementation classes can no longer be implemented:
      • LinkedList
      • LinkedListEntry
    • The following implementation classes can no longer be implemented
      or extended:
      • HasNextIterator (Also deprecated.)
      • HashMap
      • LinkedHashMap
      • HashSet
      • LinkedHashSet
      • DoubleLinkedQueue
      • ListQueue
      • SplayTreeMap
      • SplayTreeSet
dart:developer
  • Breaking change #​49529:

    • Removed the deprecated [MAX_USER_TAGS][MAX_USER_TAGS] constant.
      Use [maxUserTags][maxUserTags] instead.
  • Callbacks passed to registerExtension will be run in the zone from which
    they are registered.

  • Breaking change #​50231:

    • Removed the deprecated [Metrics][Metrics], [Metric][Metric], [Counter][Counter],
      and [Gauge][Gauge] classes as they have been broken since Dart 2.0.
dart:ffi
  • The experimental @FfiNative annotation is now deprecated.
    Usages should be replaced with the new @Native annotation.
dart:html
  • Breaking change: As previously announced, the deprecated registerElement
    and registerElement2 methods in Document and HtmlDocument have been
    removed. See #​49536 for
    details.
dart:math
  • Breaking change when migrating code to Dart 3.0:
    Some changes to platform libraries only affect code when it is migrated
    to language version 3.0.
    • The Random interface can only be implemented, not extended.
dart:io
  • Added name and signalNumber to the ProcessSignal class.
  • Deprecate NetworkInterface.listSupported. Has always returned true since
    Dart 2.3.
  • Finalize httpEnableTimelineLogging parameter name transition from enable
    to enabled. See #​43638.
  • Favor IPv4 connections over IPv6 when connecting sockets. See
    #​50868.
  • Breaking change #​51035:
    • Update NetworkProfiling to accommodate new String ids
      that are introduced in vm_service:11.0.0
dart:js_util
  • Added several helper functions to access more JavaScript operators, like
    delete and the typeof functionality.
  • jsify is now permissive and has inverse semantics to dartify.
  • jsify and dartify both handle types they understand natively more
    efficiently.
  • Signature of callMethod has been aligned with the other methods and
    now takes Object instead of String.
Tools
Observatory
  • Observatory is no longer served by default and users should instead use Dart
    DevTools. Users requiring specific functionality in Observatory should set
    the --serve-observatory flag.
Web Dev Compiler (DDC)
  • Removed deprecated command line flags -k, --kernel, and --dart-sdk.
  • The compile time flag --nativeNonNullAsserts, which ensures web library APIs
    are sound in their nullability, is by default set to true in sound mode. For
    more information on the flag, see NATIVE_NULL_ASSERTIONS.md.
dart2js
  • The compile time flag --native-null-assertions, which ensures web library
    APIs are sound in their nullability, is by default set to true in sound mode,
    unless -O3 or higher is passed, in which case they are not checked. For more
    information on the flag, see NATIVE_NULL_ASSERTIONS.md.
Dart2js
  • Cleanup related to #​46100:
    the internal dart2js snapshot fails unless it is called from a supported
    interface, such as dart compile js, flutter build, or
    build_web_compilers. This is not expected to be a visible change.
Formatter
  • Format sync* and async* functions with => bodies.
  • Don't split after < in collection literals.
  • Better indentation of multiline function types inside type argument lists.
  • Fix bug where parameter metadata wouldn't always split when it should.
Analyzer
  • Most static analysis "hints" are converted to be "warnings," and any
    remaining hints are intended to be converted soon after the Dart 3.0 release.
    This means that any (previously) hints reported by dart analyze are now
    considered "fatal" (will result in a non-zero exit code). The previous
    behavior, where such hints (now warnings) are not fatal, can be achieved by
    using the --no-fatal-warnings flag. This behavior can also be altered, on a
    code-by-code basis, by changing the severity of rules in an analysis
    options file.
  • Add static enforcement of the SDK-only @Since annotation. When code in a
    package uses a Dart SDK element annotated with @Since, analyzer will report
    a warning if the package's Dart SDK constraint allows versions of Dart
    which don't include that element.
  • Protects the Dart Analysis Server against extreme memory usage by limiting
    the number of plugins per analysis context to 1. (issue [#​50981][]).
Linter

Updates the Linter to 1.35.0, which includes changes that

  • add new lints:
    • implicit_reopen
    • unnecessary_breaks
    • type_literal_in_constant_pattern
    • invalid_case_patterns
  • update existing lints to support patterns and class modifiers
  • remove support for:
    • enable_null_safety
    • invariant_booleans
    • prefer_bool_in_asserts
    • prefer_equal_for_default_values
    • super_goes_last
  • fix unnecessary_parenthesis false-positives with null-aware expressions.
  • fix void_checks to allow assignments of Future<dynamic>? to parameters
    typed FutureOr<void>?.
  • fix use_build_context_synchronously in if conditions.
  • fix a false positive for avoid_private_typedef_functions with generalized
    type aliases.
  • update unnecessary_parenthesis to detect some doubled parens.
  • update void_checks to allow returning Never as void.
  • update no_adjacent_strings_in_list to support set literals and for- and
    if-elements.
  • update avoid_types_as_parameter_names to handle type variables.
  • update avoid_positional_boolean_parameters to handle typedefs.
  • update avoid_redundant_argument_values to check parameters of redirecting
    constructors.
  • improve performance for prefer_const_literals_to_create_immutables.
  • update use_build_context_synchronously to check context properties.
  • improve unnecessary_parenthesis support for property accesses and method
    invocations.
  • update unnecessary_parenthesis to allow parentheses in more null-aware
    cascade contexts.
  • update unreachable_from_main to track static elements.
  • update unnecessary_null_checks to not report on arguments passed to
    Future.value or Completer.complete.
  • mark always_use_package_imports and prefer_relative_imports as
    incompatible rules.
  • update only_throw_errors to not report on Never-typed expressions.
  • update unnecessary_lambdas to not report with late final variables.
  • update avoid_function_literals_in_foreach_calls to not report with nullable-
    typed targets.
  • add new lint: deprecated_member_use_from_same_package which replaces the
    soft-deprecated analyzer hint of the same name.
  • update public_member_api_docs to not require docs on enum constructors.
  • update prefer_void_to_null to not report on as-expressions.
Migration tool removal

The null safety migration tool (dart migrate) has been removed. If you still
have code which needs to be migrated to null safety, please run dart migrate
using Dart version 2.19, before upgrading to Dart version 3.0.

Pub
  • To preserve compatibility with null-safe code pre Dart 3, Pub will interpret a
    language constraint indicating a language version of 2.12 or higher and an
    upper bound of <3.0.0 as <4.0.0.

    For example >=2.19.2 <3.0.0 will be interpreted as >=2.19.2 <4.0.0.

  • dart pub publish will no longer warn about dependency_overrides. Dependency
    overrides only take effect in the root package of a resolution.

  • dart pub token add now verifies that the given token is valid for including
    in a header according to RFC 6750 section
    2.1
    . This means they must
    contain only the characters: ^[a-zA-Z0-9._~+/=-]+$. Before a failure would
    happen when attempting to send the authorization header.

  • dart pub get and related commands will now by default also update the
    dependencies in the example folder (if it exists). Use --no-example to
    avoid this.

  • On Windows the PUB_CACHE has moved to %LOCALAPPDATA%, since Dart 2.8 the
    PUB_CACHE has been created in %LOCALAPPDATA% when one wasn't present.
    Hence, this only affects users with a PUB_CACHE created by Dart 2.7 or
    earlier. If you have path/to/.pub-cache/bin in PATH you may need to
    update your PATH.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dart](https://dart.dev/) ([source](https://github.com/dart-lang/sdk)) | major | `>=2.12.0 <3.0.0` -> `<4.0.0` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the warning logs for more information. --- ### Release Notes <details> <summary>dart-lang/sdk (dart)</summary> ### [`v3.6.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#360) [Compare Source](https://github.com/dart-lang/sdk/compare/3.5.4...3.6.0) ##### Language Dart 3.6 adds [digit separators] to the language. To use them, set your package's \[SDK constraint]\[language version] lower bound to 3.6 or greater (`sdk: '^3.6.0'`). ##### Digit separators [digit separators]: https://github.com/dart-lang/language/issues/2 Digits in number literals (decimal integer literals, double literals, scientific notation literals, and hexadecimal literals) can now include underscores between digits, as "digit separators." The separators do not change the value of a literal, but can serve to make the number more readable. ```dart 100__000_000__000_000__000_000 // one hundred million million millions! 0x4000_0000_0000_0000 0.000_000_000_01 0x00_14_22_01_23_45 // MAC address ``` Separators are not allowed at the start of a number (this would be parsed as an identifier), at the end of a number, or adjacent to another character in a number, like `.`, `x`, or the `e` in scientific notation. - **Breaking Change** [#&#8203;56065][]: The context used by the compiler and analyzer to perform type inference on the operand of a `throw` expression has been changed from the "unknown type" to `Object`. This makes the type system more self-consistent, because it reflects the fact that it's not legal to throw `null`. This change is not expected to make any difference in practice. [#&#8203;56065]: https://github.com/dart-lang/sdk/issues/56065 ##### Libraries ##### `dart:io` - **Breaking Change** [#&#8203;52444][]: Removed the `Platform()` constructor, which has been deprecated since Dart 3.1. - **Breaking Change** [#&#8203;53618][]: `HttpClient` now responds to a redirect that is missing a "Location" header by throwing `RedirectException`, instead of `StateError`. [#&#8203;52444]: https://github.com/dart-lang/sdk/issues/52444 [#&#8203;53618]: https://github.com/dart-lang/sdk/issues/53618 ##### `dart:js_interop` - Added constructors for `JSArrayBuffer`, `JSDataView`, and concrete typed array types e.g. `JSInt8Array`. - Added `length` and `[]`/`[]=` operators to `JSArray`. - Added `toJSCaptureThis` so `this` is passed in from JavaScript to the callback as the first parameter. - Added a static `from` method on `JSArray` to create a `JSArray` from a given JavaScript iterable or array-like object. ##### Tools ##### CFE - **Breaking Change** [#&#8203;56466][]: The implementation of the UP and DOWN algorithms in the CFE are changed to match the specification and the corresponding implementations in the Analyzer. The upper and lower closures of type schemas are now computed just before they are passed into the subtype testing procedure instead of at the very beginning of the UP and DOWN algorithms. [#&#8203;56466]: https://github.com/dart-lang/sdk/issues/56466 ##### Dart format - Preserve type parameters on old-style function-typed formals that also use `this.` or `super.`. - Correctly format imports with both `as` and `if` clauses. ##### Wasm compiler (dart2wasm) - The condition `dart.library.js` is now false on conditional imports in dart2wasm. Note that it was already a static error to import `dart:js` directly (see [#&#8203;55266][]). [#&#8203;55266]: https://github.com/dart-lang/sdk/issues/55266 ##### Pub - Support for workspaces. This allows you to develop and resolve multiple packages from the same repo together. See https://dart.dev/go/pub-workspaces for more info. - New command `dart pub bump`. Increments the version number of the current package. For example: `dart pub bump minor` will change the version from `1.2.3` to `1.3.0`. - New validation: `dart pub publish` will warn if your `git status` is not clean. - New flag `dart pub upgrade --unlock-transitive`. - `dart pub upgrade --unlock-transitive pkg`, will unlock and upgrade all the dependencies of `pkg` instead of just `pkg`. ##### Analyzer - Add the [`use_truncating_division`][use_truncating_division] lint rule. - Add the experimental [`omit_obvious_local_variable_types`][omit_obvious_local_variable_types] lint rule. - Add the experimental [`specify_nonobvious_local_variable_types`][specify_nonobvious_local_variable_types] lint rule. - Add the experimental [`avoid_futureor_void`][avoid_futureor_void] lint rule. - Add quick fixes for more than 14 diagnostics. - Add new assists: "add digit separators", "remove digit separators", and "invert conditional expression". [`use_truncating_division`]: https://dart.dev/lints/use_truncating_division [`omit_obvious_local_variable_types`]: https://dart.dev/lints/omit_obvious_local_variable_types [`specify_nonobvious_local_variable_types`]: https://dart.dev/lints/specify_nonobvious_local_variable_types [`avoid_futureor_void`]: https://dart.dev/lints/avoid_futureor_void ### [`v3.5.4`](https://github.com/dart-lang/sdk/compare/3.5.3...3.5.4) [Compare Source](https://github.com/dart-lang/sdk/compare/3.5.3...3.5.4) ### [`v3.5.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#353---2024-09-11) [Compare Source](https://github.com/dart-lang/sdk/compare/3.5.2...3.5.3) - Fixes an issue with the DevTools Memory tool causing OOMs. and an issue resulting in a missing tab bar when DevTools is embedded in IntelliJ and Android Studio (issue[#&#8203;56607][]). - Fixes an issue with the DevTools release notes showing each time DevTools is opened instead of only the first time (issue[#&#8203;56607][]). - Fixes an issue resulting in a missing tab bar when DevTools is embedded in IntelliJ and Android Studio (issue[#&#8203;56607][]). [#&#8203;56607]: https://github.com/dart-lang/sdk/issues/56607 ### [`v3.5.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#352---2024-08-28) [Compare Source](https://github.com/dart-lang/sdk/compare/3.5.1...3.5.2) - Fixes a bug where `ZLibDecoder` would incorrectly attempt to decompress data past the end of the zlib footer (issue [#&#8203;56481][]). - Fixes issue where running `dart` from `PATH` could result in some commands not working as expected (issues [#&#8203;56080][], [#&#8203;56306][], [#&#8203;56499][]). - Fixes analysis server plugins not receiving `setContextRoots` requests or being provided incorrect context roots in multi-package workspaces (issue [#&#8203;56475][]). [#&#8203;56481]: https://github.com/dart-lang/sdk/issues/56481 [#&#8203;56080]: https://github.com/dart-lang/sdk/issues/56080 [#&#8203;56306]: https://github.com/dart-lang/sdk/issues/56306 [#&#8203;56499]: https://github.com/dart-lang/sdk/issues/56499 [#&#8203;56475]: https://github.com/dart-lang/sdk/issues/56475 ### [`v3.5.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#351---2024-08-14) [Compare Source](https://github.com/dart-lang/sdk/compare/3.5.0...3.5.1) - Fixes resolving `include:` in `analysis_options.yaml` file in a nested folder in the workspace (issue[#&#8203;56464][]). - Fixes source maps generated by `dart compile wasm` when optimizations are enabled (issue [#&#8203;56423][]). - Fixes a bug in the `dart2wasm` compiler in unsound `-O3` / `-O4` modes where a implicit setter for a field of generic type will store `null` instead of the field value (issue [#&#8203;56374][]). - Fixes a bug in the `dart2wasm` compiler that can trigger in certain situations when using partial instantiations of generic tear-offs (constructors or static methods) in constant expressions (issue [#&#8203;56440][]). - The algorithm for computing the standard upper bound of two types, also known is UP, is provided the missing implementation for `StructuralParameterType` objects. In some corner cases cases the lacking implementation resulted in a crash of the compiler (issue [#&#8203;56457][]). [#&#8203;56464]: https://github.com/dart-lang/sdk/issues/56464 [#&#8203;56423]: https://github.com/dart-lang/sdk/issues/56423 [#&#8203;56374]: https://github.com/dart-lang/sdk/issues/56374 [#&#8203;56440]: https://github.com/dart-lang/sdk/issues/56440 [#&#8203;56457]: https://github.com/dart-lang/sdk/issues/56457 ### [`v3.5.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#350---2024-08-06) [Compare Source](https://github.com/dart-lang/sdk/compare/3.4.4...3.5.0) ##### Language - **Breaking Change** [#&#8203;55418][]: The context used by the compiler to perform type inference on the operand of an `await` expression has been changed to match the behavior of the analyzer. This change is not expected to make any difference in practice. - **Breaking Change** [#&#8203;55436][]: The context used by the compiler to perform type inference on the right hand side of an "if-null" expression (`e1 ?? e2`) has been changed to match the behavior of the analyzer. change is expected to have low impact on real-world code. But in principle it could cause compile-time errors or changes in runtime behavior by changing inferred types. The old behavior can be restored by supplying explicit types. [#&#8203;55418]: https://github.com/dart-lang/sdk/issues/55418 [#&#8203;55436]: https://github.com/dart-lang/sdk/issues/55436 ##### Libraries ##### `dart:core` - **Breaking Change** [#&#8203;44876][]: `DateTime` on the web platform now stores microseconds. The web implementation is now practically compatible with the native implementation, where it is possible to round-trip a timestamp in microseconds through a `DateTime` value without rounding the lower digits. This change might be breaking for apps that rely in some way on the `.microsecond` component always being zero, for example, expecting only three fractional second digits in the `toString()` representation. Small discrepancies in arithmetic due to rounding of web integers may still occur for extreme values, (1) `microsecondsSinceEpoch` outside the safe range, corresponding to dates with a year outside of 1685..2255, and (2) arithmetic (`add`, `subtract`, `difference`) where the `Duration` argument or result exceeds 570 years. [#&#8203;44876]: https://github.com/dart-lang/sdk/issues/44876 ##### `dart:io` - **Breaking Change** [#&#8203;55786][]: `SecurityContext` is now `final`. This means that `SecurityContext` can no longer be subclassed. `SecurityContext` subclasses were never able to interoperate with other parts of `dart:io`. - A `ConnectionTask` can now be created using an existing `Future<Socket>`. Fixes [#&#8203;55562]. [#&#8203;55786]: https://github.com/dart-lang/sdk/issues/55786 [#&#8203;55562]: https://github.com/dart-lang/sdk/issues/55562 ##### `dart:typed_data` - **Breaking Change** [#&#8203;53785][]: The unmodifiable view classes for typed data have been removed. These classes were deprecated in Dart 3.4. To create an unmodifiable view of a typed-data object, use the `asUnmodifiableView()` methods added in Dart 3.3. - Added superinterface `TypedDataList` to typed data lists, implementing both `List` and `TypedData`. Allows abstracting over all such lists without losing access to either the `List` or the `TypedData` members. A `ByteData` is still only a `TypedData`, not a list. [#&#8203;53785]: https://github.com/dart-lang/sdk/issues/53785 ##### `dart:js_interop` - **Breaking Change** [#&#8203;55508][]: `importModule` now accepts a `JSAny` instead of a `String` to support other JS values as well, like `TrustedScriptURL`s. - **Breaking Change** [#&#8203;55267][]: `isTruthy` and `not` now return `JSBoolean` instead of `bool` to be consistent with the other operators. - **Breaking Change** `ExternalDartReference` no longer implements `Object`. `ExternalDartReference` now accepts a type parameter `T` with a bound of `Object?` to capture the type of the Dart object that is externalized. `ExternalDartReferenceToObject.toDartObject` now returns a `T`. `ExternalDartReferenceToObject` and `ObjectToExternalDartReference` are now extensions on `T` and `ExternalDartReference<T>`, respectively, where `T extends Object?`. See [#&#8203;55342][] and [#&#8203;55536][] for more details. - Fixed some consistency issues with `Function.toJS` across all compilers. Specifically, calling `Function.toJS` on the same function gives you a new JS function (see issue [#&#8203;55515][]), the maximum number of arguments that are passed to the JS function is determined by the static type of the Dart function, and extra arguments are dropped when passed to the JS function in all compilers (see [#&#8203;48186][]). [#&#8203;55508]: https://github.com/dart-lang/sdk/issues/55508 [#&#8203;55267]: https://github.com/dart-lang/sdk/issues/55267 [#&#8203;55342]: https://github.com/dart-lang/sdk/issues/55342 [#&#8203;55536]: https://github.com/dart-lang/sdk/issues/55536 [#&#8203;55515]: https://github.com/dart-lang/sdk/issues/55515 [#&#8203;48186]: https://github.com/dart-lang/sdk/issues/48186 ##### Tools ##### Analyzer - Add the [`unintended_html_in_doc_comment`][unintended_html_in_doc_comment] lint rule. - Add the [`invalid_runtime_check_with_js_interop_types`][invalid_runtime_check_with_js_interop_types] lint rule. - Add the [`document_ignores`][document_ignores] lint rule. - Add quick fixes for more than 70 diagnostics. - The "Add missing switch cases" quick fix now adds multiple cases, such that the switch becomes exhaustive. - The "Remove const" quick fix now adds `const` keywords to child nodes, where appropriate. [`unintended_html_in_doc_comment`]: https://dart.dev/lints/unintended_html_in_doc_comment [`invalid_runtime_check_with_js_interop_types`]: https://dart.dev/lints/invalid_runtime_check_with_js_interop_types [`document_ignores`]: https://dart.dev/lints/document_ignores ##### Pub - New flag `dart pub downgrade --tighten` to restrict lower bounds of dependencies' constraints to the minimum that can be resolved. ##### Dart Runtime - The Dart VM only executes sound null safe code, running of unsound null safe code using the option `--no-sound-null-safety` has been removed. - `Dart_NewListOf` and `Dart_IsLegacyType` functions are removed from Dart C API. - `Dart_DefaultCanonicalizeUrl` is removed from the Dart C API. ### [`v3.4.4`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#344---2024-06-12) [Compare Source](https://github.com/dart-lang/sdk/compare/3.4.3...3.4.4) This is a patch release that: - Fixes an issue where pub would crash when failing to fetch advisories from the server. (issue [pub#4269]). - Fixes an issue where `const bool.fromEnvironment('dart.library.ffi')` is true and conditional import condition `dart.library.ffi` is true in dart2wasm. (issue [#&#8203;55948]). - Fixes an issue where FFI calls with variadic arguments on MacOS Arm64 would mangle the arguments. (issue [#&#8203;55943]). [pub#4269]: https://github.com/dart-lang/pub/issues/4269 [#&#8203;55948]: https://github.com/dart-lang/sdk/issues/55948 [#&#8203;55943]: https://github.com/dart-lang/sdk/issues/55943 ### [`v3.4.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#343---2024-06-05) [Compare Source](https://github.com/dart-lang/sdk/compare/3.4.2...3.4.3) This is a patch release that: - Fixes an issue where `DART_VM_OPTIONS` were not correctly parsed for standalone Dart executables created with `dart compile exe` (issue [#&#8203;55818]). - Fixes a bug in dart2wasm that can result in a runtime error that says `array.new_fixed()` has a constant larger than 10000 (issue [#&#8203;55873]). - Adds support for `--enable-experiment` flag to `dart compile` wasm (issue [#&#8203;55894]). - Fixes an issue in dart2wasm compiler that can result in incorrect nullability of type parameter (see [#&#8203;55895]). - Disallows `dart:ffi` imports in user code in dart2wasm (e.g. issue \[[#&#8203;53910](https://github.com/dart-lang/sdk/issues/53910)]) as dart2wasm's currently only supports a small subset of `dart:ffi` (issue [#&#8203;55890]). [#&#8203;55818]: https://github.com/dart-lang/sdk/issues/55818 [#&#8203;55873]: https://github.com/dart-lang/sdk/issues/55873 [#&#8203;55894]: https://github.com/dart-lang/sdk/issues/55894 [#&#8203;55895]: https://github.com/dart-lang/sdk/issues/55895 [#&#8203;55910]: https://github.com/dart-lang/sdk/issues/53910 [#&#8203;55890]: https://github.com/dart-lang/sdk/issues/55890 ### [`v3.4.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#342---2024-05-29) [Compare Source](https://github.com/dart-lang/sdk/compare/3.4.1...3.4.2) This is a patch release that: - Marks `dart compile wasm` as no longer experimental. - Fixes two bugs in exception handling in `async` functions in dart2wasm (issues [#&#8203;55347], [#&#8203;55457]). - Fixes restoration of `this` variable in `sync*` and `async` functions in dart2wasm. - Implements missing control flow constructs (exceptions, switch/case with yields) in `sync*` in dart2wasm (issues [#&#8203;51342], [#&#8203;51343]). - Fixes a bug dart2wasm compiler that surfaces as a compiler crash when indexing lists where the compiler proofs the list to be constant and the index is out-of-bounds (issue [#&#8203;55817]). [#&#8203;55347]: https://github.com/dart-lang/sdk/issues/55347 [#&#8203;55457]: https://github.com/dart-lang/sdk/issues/55457 [#&#8203;51342]: https://github.com/dart-lang/sdk/issues/51342 [#&#8203;51343]: https://github.com/dart-lang/sdk/issues/51343 [#&#8203;55817]: https://github.com/dart-lang/sdk/issues/55817 ### [`v3.4.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#341---2024-05-22) [Compare Source](https://github.com/dart-lang/sdk/compare/3.4.0...3.4.1) This is a patch release that: - Fixes a bug in the CFE which could manifest as compilation errors of Flutter web apps when compiled with dart2wasm (issue [#&#8203;55714]). - Fixes a bug in the pub client, such that `dart run` will not interfere with Flutter l10n (at least for most cases) (issue [#&#8203;55758]). [#&#8203;55714]: https://github.com/dart-lang/sdk/issues/55714 [#&#8203;55758]: https://github.com/dart-lang/sdk/issues/55758 ### [`v3.4.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#340---2024-05-14) [Compare Source](https://github.com/dart-lang/sdk/compare/3.3.4...3.4.0) ##### Language Dart 3.4 makes improvements to the type analysis of conditional expressions (`e1 ? e2 : e3`), if-null expressions (`e1 ?? e2`), if-null assignments (`e1 ??= e2`), and switch expressions (`switch (e) { p1 => e1, ... }`). To take advantage of these improvements, set your package's [SDK constraint][language version] lower bound to 3.4 or greater (`sdk: '^3.4.0'`). [language version]: https://dart.dev/guides/language/evolution - **Breaking Change** [#&#8203;54640][]: The pattern context type schema for cast patterns has been changed from `Object?` to `_` (the unknown type), to align with the specification. This change is not expected to make any difference in practice. - **Breaking Change** [#&#8203;54828][]: The type schema used by the compiler front end to perform type inference on the operand of a null-aware spread operator (`...?`) in map and set literals has been made nullable, to match what currently happens in list literals. This makes the compiler front end behavior consistent with that of the analyzer. This change is expected to be very low impact. [#&#8203;54640]: https://github.com/dart-lang/sdk/issues/54640 [#&#8203;54828]: https://github.com/dart-lang/sdk/issues/54828 ##### Libraries ##### `dart:async` - Added option for `ParallelWaitError` to get some meta-information that it can expose in its `toString`, and the `Iterable<Future>.wait` and `(Future,...,Future).wait` extension methods now provide that information. Should make a `ParallelWaitError` easier to log. ##### `dart:cli` - **Breaking change** \[[#&#8203;52121](https://github.com/dart-lang/sdk/issues/52121)]\[]: `waitFor` is removed in 3.4. ##### `dart:ffi` - Added `Struct.create` and `Union.create` to create struct and union views of the sequence of bytes stored in a subtype of `TypedData`. ##### `dart:io` - **Breaking change** [#&#8203;53863][]: `Stdout` has a new field `lineTerminator`, which allows developers to control the line ending used by `stdout` and `stderr`. Classes that `implement Stdout` must define the `lineTerminator` field. The default semantics of `stdout` and `stderr` are not changed. - Deprecates `FileSystemDeleteEvent.isDirectory`, which always returns `false`. [#&#8203;53863]: https://github.com/dart-lang/sdk/issues/53863 ##### `dart:js_interop` - Fixes an issue with several comparison operators in `JSAnyOperatorExtension` that were declared to return `JSBoolean` but really returned `bool`. This led to runtime errors when trying to use the return values. The implementation now returns a `JSBoolean` to align with the interface. See issue [#&#8203;55024] for more details. - Added `ExternalDartReference` and related conversion functions `toExternalReference` and `toDartObject`. This is a faster alternative to `JSBoxedDartObject`, but with fewer safety guarantees and fewer interoperability capabilities. See [#&#8203;55187] for more details. - On dart2wasm, `JSBoxedDartObject` now is an actual JS object that wraps the opaque Dart value instead of only externalizing the value. Like the JS backends, you'll now get a more useful error when trying to use it in another Dart runtime. - Added `isA` helper to make type checks easier with interop types. See [#&#8203;54138][] for more details. [#&#8203;54138]: https://github.com/dart-lang/sdk/issues/54138 [#&#8203;55024]: https://github.com/dart-lang/sdk/issues/55024 [#&#8203;55187]: https://github.com/dart-lang/sdk/issues/55187 ##### `dart:typed_data` - **BREAKING CHANGE** [#&#8203;53218][] [#&#8203;53785][]: The unmodifiable view classes for typed data are deprecated. To create an unmodifiable view of a typed-data object, use the `asUnmodifiableView()` methods added in Dart 3.3: ```dart Uint8List data = ...; final readOnlyView = data.asUnmodifiableView(); // readOnlyView has type Uint8List, and throws if attempted modified. ``` The reason for this change is to allow more flexibility in the implementation of typed data, so the native and web platforms can use different strategies to ensure that typed data has good performance. The deprecated types will be removed in Dart 3.5. [#&#8203;53218]: https://github.com/dart-lang/sdk/issues/53218 [#&#8203;53785]: https://github.com/dart-lang/sdk/issues/53785 ##### Tools ##### Analyzer - Improved code completion. Fixed over 50% of completion correctness bugs, tagged `analyzer-completion-correctness` in the [issue tracker][analyzer-completion-correction-issues]. - Support for new annotations introduced in version 1.14.0 of the [meta] package. - Support for the [`@doNotSubmit`][@&#8203;doNotSubmit] annotation, noting that any usage of an annotated member should not be submitted to source control. - Support for the [`@mustBeConst`][@&#8203;mustBeConst] annotation, which indicates that an annotated parameter only accepts constant arguments. [analyzer-completion-correction-issues]: https://github.com/dart-lang/sdk/labels/analyzer-completion-correctness [meta]: https://pub.dev/packages/meta [`@doNotSubmit`]: https://pub.dev/documentation/meta/latest/meta/doNotSubmit-constant.html [`@mustBeConst`]: https://pub.dev/documentation/meta/latest/meta/mustBeConst-constant.html ##### Linter - Added the [`unnecessary_library_name`][unnecessary_library_name] lint. - Added the [`missing_code_block_language_in_doc_comment`][missing_code_block_language_in_doc_comment] lint. [`unnecessary_library_name`]: https://dart.dev/lints/unnecessary_library_name [`missing_code_block_language_in_doc_comment`]: https://dart.dev/lints/missing_code_block_language_in_doc_comment ##### Compilers - The compilation environment will no longer pretend to contain entries with value `""` for all `dart.library.foo` strings, where `dart:foo` is not an available library. Instead there will only be entries for the available libraries, like `dart.library.core`, where the value was, and still is, `"true"`. This should have no effect on `const bool.fromEnvironment(...)` or `const String.fromEnvironment(...)` without a `defaultValue` argument, an argument which was always ignored previously. It changes the behavior of `const bool.hasEnvironment(...)` on such an input, away from always being `true` and therefore useless. ##### DevTools - Updated DevTools to version 2.33.0 from 2.31.1. To learn more, check out the release notes for versions [2.32.0][devtools-2-32-0] and [2.33.0][devtools-2-33-0]. [devtools-2-32-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.32.0 [devtools-2-33-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.33.0 ##### Pub - Dependency resolution and `dart pub outdated` will now surface if a dependency is affected by a security advisory, unless the advisory is listed under a `ignored_advisories` section in the `pubspec.yaml` file. To learn more about pub's support for security advisories, visit [dart.dev/go/pub-security-advisories][pub-security-advisories]. - `path`-dependencies inside `git`-dependencies are now resolved relative to the git repo. - All `dart pub` commands can now be run from any subdirectory of a project. Pub will find the first parent directory with a `pubspec.yaml` and operate relative it. - New command `dart pub unpack` that downloads a package from pub.dev and extracts it to a subfolder of the current directory. This can be useful for inspecting the code, or playing with examples. [pub-security-advisories]: https://dart.dev/go/pub-security-advisories ##### Dart Runtime - Dart VM flags and options can now be provided to any executable generated using `dart compile exe` via the `DART_VM_OPTIONS` environment variable. `DART_VM_OPTIONS` should be set to a list of comma-separated flags and options with no whitespace. Options that allow for multiple values to be provided as comma-separated values are not supported (e.g., `--timeline-streams=Dart,GC,Compiler`). Example of a valid `DART_VM_OPTIONS` environment variable: ```bash DART_VM_OPTIONS=--random_seed=42,--verbose_gc ``` - Dart VM no longer supports external strings: `Dart_IsExternalString`, `Dart_NewExternalLatin1String` and `Dart_NewExternalUTF16String` functions are removed from Dart C API. ### [`v3.3.4`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#334---2024-04-17) [Compare Source](https://github.com/dart-lang/sdk/compare/3.3.3...3.3.4) This is a patch release that: - Fixes an issue with JS interop in dart2wasm where JS interop methods that used the enclosing library's `@JS` annotation were actually using the invocation's enclosing library's `@JS` annotation. (issue [#&#8203;55430]). [#&#8203;55430]: https://github.com/dart-lang/sdk/issues/55430 ### [`v3.3.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#333---2024-03-27) [Compare Source](https://github.com/dart-lang/sdk/compare/3.3.2...3.3.3) This is a patch release that: - Fixes an issue where dart vm crashed when running on pre-SSE41 older CPUs on Windows (issue [#&#8203;55211][]). [#&#8203;55211]: https://github.com/dart-lang/sdk/issues/55211 ### [`v3.3.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#332---2024-03-20) [Compare Source](https://github.com/dart-lang/sdk/compare/3.3.1...3.3.2) This is a patch release that: - Fixes an issue in the CFE that placed some structural parameter references out of their context in the code restored from dill files, causing crashes in the incremental compiler whenever it restored a typedef from dill such that the typedef contained a generic function type on its right-hand side (issue [#&#8203;55158][]). - Fixes an issue in the CFE that prevented redirecting factories from being resolved in initializers of extension types (issue [#&#8203;55194][]). - Fixes an issues with VM's implementation of `DateTime.timeZoneName` on Windows, which was checking whether current date is in the summer or standard time rather than checking if the given moment is in the summer or standard time (issue [#&#8203;55240][]). [#&#8203;55158]: https://github.com/dart-lang/sdk/issues/55158 [#&#8203;55194]: https://github.com/dart-lang/sdk/issues/55194 [#&#8203;55240]: https://github.com/dart-lang/sdk/issues/55240 ### [`v3.3.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#331---2024-03-06) [Compare Source](https://github.com/dart-lang/sdk/compare/3.3.0...3.3.1) This is a patch release that: - Fixes an issue in dart2js where object literal constructors in interop extension types would fail to compile without an `@JS` annotation on the library (issue [#&#8203;55057][]). - Disallows certain types involving extension types from being used as the operand of an `await` expression, unless the extension type itself implements `Future` (issue [#&#8203;55095][]). [#&#8203;55057]: https://github.com/dart-lang/sdk/issues/55057 [#&#8203;55095]: https://github.com/dart-lang/sdk/issues/55095 ### [`v3.3.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#330) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.6...3.3.0) ##### Language Dart 3.3 adds [extension types] to the language. To use them, set your package's \[SDK constraint]\[language version] lower bound to 3.3 or greater (`sdk: '^3.3.0'`). ##### Extension types [extension types]: https://github.com/dart-lang/language/issues/2727 An *extension type* wraps an existing type with a different, static-only interface. It works in a way which is in many ways similar to a class that contains a single final instance variable holding the wrapped object, but without the space and time overhead of an actual wrapper object. Extension types are introduced by *extension type declarations*. Each such declaration declares a new named type (not just a new name for the same type). It declares a *representation variable* whose type is the *representation type*. The effect of using an extension type is that the *representation* (that is, the value of the representation variable) has the members declared by the extension type rather than the members declared by its "own" type (the representation type). Example: ```dart extension type Meters(int value) { String get label => '${value}m'; Meters operator +(Meters other) => Meters(value + other.value); } void main() { var m = Meters(42); // Has type `Meters`. var m2 = m + m; // OK, type `Meters`. // int i = m; // Compile-time error, wrong type. // m.isEven; // Compile-time error, no such member. assert(identical(m, m.value)); // Succeeds. } ``` The declaration `Meters` is an extension type that has representation type `int`. It introduces an implicit constructor `Meters(int value);` and a getter `int get value`. `m` and `m.value` is the very same object, but `m` has type `Meters` and `m.value` has type `int`. The point is that `m` has the members of `Meters` and `m.value` has the members of `int`. Extension types are entirely static, they do not exist at run time. If `o` is the value of an expression whose static type is an extension type `E` with representation type `R`, then `o` is just a normal object whose run-time type is a subtype of `R`, exactly like the value of an expression of type `R`. Also the run-time value of `E` is `R` (for example, `E == R` is true). In short: At run time, an extension type is erased to the corresponding representation type. A method call on an expression of an extension type is resolved at compile-time, based on the static type of the receiver, similar to how extension method calls work. There is no virtual or dynamic dispatch. This, combined with no memory overhead, means that extension types are zero-cost wrappers around their representation value. While there is thus no performance cost to using extension types, there is a safety cost. Since extension types are erased at compile time, run-time type tests on values that are statically typed as an extension type will check the type of the representation object instead, and if the type check looks like it tests for an extension type, like `is Meters`, it actually checks for the representation type, that is, it works exactly like `is int` at run time. Moreover, as mentioned above, if an extension type is used as a type argument to a generic class or function, the type variable will be bound to the representation type at run time. For example: ```dart void main() { var meters = Meters(3); // At run time, `Meters` is just `int`. print(meters is int); // Prints "true". print(<Meters>[] is List<int>); // Prints "true". // An explicit cast is allowed and succeeds as well: List<Meters> meterList = <int>[1, 2, 3] as List<Meters>; print(meterList[1].label); // Prints "2m". } ``` Extension types are useful when you are willing to sacrifice some run-time encapsulation in order to avoid the overhead of wrapping values in instances of wrapper classes, but still want to provide a different interface than the wrapped object. An example of that is interop, where you may have data that are not Dart objects to begin with (for example, raw JavaScript objects when using JavaScript interop), and you may have large collections of objects where it's not efficient to allocate an extra object for each element. ##### Other changes - **Breaking Change** [#&#8203;54056][]: The rules for private field promotion have been changed so that an abstract getter is considered promotable if there are no conflicting declarations. There are no conflicting declarations if there are no non-final fields, external fields, concrete getters, or `noSuchMethod` forwarding getters with the same name in the same library. This makes the implementation more consistent and allows type promotion in a few rare scenarios where it wasn't previously allowed. It is unlikely, but this change could cause a breakage by changing an inferred type in a way that breaks later code. For example: ```dart class A { int? get _field; } class B extends A { final int? _field; B(this._field); } test(A a) { if (a._field != null) { var x = a._field; // Previously had type `int?`; now has type `int` ... x = null; // Previously allowed; now causes a compile-time error. } } ``` Affected code can be fixed by adding an explicit type annotation. For example, in the above snippet, `var x` can be changed to `int? x`. It's also possible that some continuous integration configurations might fail if they have been configured to treat warnings as errors, because the expanded type promotion could lead to one of the following warnings: - `unnecessary_non_null_assertion` - `unnecessary_cast` - `invalid_null_aware_operator` These warnings can be addressed in the usual way, by removing the unnecessary operation in the first two cases, or changing `?.` to `.` in the third case. To learn more about other rules surrounding type promotion, check out the guide on [Fixing type promotion failures][]. [#&#8203;54056]: https://github.com/dart-lang/sdk/issues/54056 [Fixing type promotion failures]: https://dart.dev/tools/non-promotion-reasons ##### Libraries ##### `dart:core` - `String.fromCharCodes` now allow `start` and `end` to be after the end of the `Iterable` argument, just like `skip` and `take` does on an `Iterable`. ##### `dart:ffi` - In addition to functions, `@Native` can now be used on fields. - Allow taking the address of native functions and fields via `Native.addressOf`. - The `elementAt` pointer arithmetic extension methods on core `Pointer` types are now deprecated. Migrate to the new `-` and `+` operators instead. - The experimental and deprecated `@FfiNative` annotation has been removed. Usages should be updated to use the `@Native` annotation. ##### `dart:js_interop` - **Breaking Change in the representation of JS types** [#&#8203;52687][]: JS types like `JSAny` were previously represented using a custom erasure of `@staticInterop` types that were compiler-specific. They are now represented as extension types where their representation types are compiler-specific. This means that user-defined `@staticInterop` types that implemented `JSAny` or `JSObject` can no longer do so and need to use `JSObject.fromInteropObject`. Going forward, it's recommended to use extension types to define interop APIs. Those extension types can still implement JS types. - **JSArray and JSPromise generics**: `JSArray` and `JSPromise` are now generic types whose type parameter is a subtype of `JSAny?`. Conversions to and from these types are changed to account for the type parameters of the Dart or JS type, respectively. - **Breaking Change in names of extensions**: Some `dart:js_interop` extension members are moved to different extensions on the same type or a supertype to better organize the API surface. See `JSAnyUtilityExtension` and `JSAnyOperatorExtension` for the new extensions. This shouldn't make a difference unless the extension names were explicitly used. - Add `importModule` to allow users to dynamically import modules using the JS `import()` expression. [#&#8203;52687]: https://github.com/dart-lang/sdk/issues/52687 ##### `dart:js_interop_unsafe` - Add `has` helper to make `hasProperty` calls more concise. ##### `dart:typed_data` - **BREAKING CHANGE** (https://github.com/dart-lang/sdk/issues/53218) The unmodifiable view classes for typed data are deprecated. Instead of using the constructors for these classes to create an unmodifiable view, e.g. ```dart Uint8List data = ... final readOnlyView = UnmodifiableUint8ListView(data); ``` use the new `asUnmodifiableView()` methods: ```dart Uint8List data = ... final readOnlyView = data.asUnmodifiableView(); ``` The reason for this change is to allow more flexibility in the implementation of typed data so the native and web platforms can use different strategies for ensuring typed data has good performance. The deprecated types will be removed in a future Dart version. ##### `dart:nativewrappers` - **Breaking Change** [#&#8203;51896][]: The NativeWrapperClasses are marked `base` so that none of their subtypes can be implemented. Implementing subtypes can lead to crashes when passing such native wrapper to a native call, as it will try to unwrap a native field that doesn't exist. [#&#8203;51896]: https://github.com/dart-lang/sdk/issues/51896 ##### Tools ##### Dart command line - The `dart create` command now uses v3 of `package:lints`, including multiple new recommended lints by default. To learn more about the updated collection of lints, check out the `package:lints` [3.0.0 changelog entry][lints-3-0]. [lints-3-0]: https://pub.dev/packages/lints/changelog#300 ##### DevTools - Updated DevTools to version 2.31.1 from 2.28.1. To learn more, check out the release notes for versions [2.29.0][devtools-2-29-0], [2.30.0][devtools-2-30-0], and [2.31.0][devtools-2-31-0]. [devtools-2-29-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.29.0 [devtools-2-30-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.30.0 [devtools-2-31-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.31.0 ##### Wasm compiler (dart2wasm) - **Breaking Change** [#&#8203;54004][]: `dart:js_util`, `package:js`, and `dart:js` are now disallowed from being imported when compiling with `dart2wasm`. Prefer using `dart:js_interop` and `dart:js_interop_unsafe`. [#&#8203;54004]: https://github.com/dart-lang/sdk/issues/54004 ##### Development JavaScript compiler (DDC) - Type arguments of `package:js` interop types are now printed as `any` instead of being omitted. This is simply a change to the textual representation of package js types that have type arguments. These type arguments are still completely ignored by the type system at runtime. - Removed "implements <...>" text from the Chrome custom formatter display for Dart classes. This information provides little value and keeping it imposes an unnecessary maintenance cost. ##### Production JavaScript compiler (dart2js) - **Breaking Change** [#&#8203;54201][]: The `Invocation` that is passed to `noSuchMethod` will no longer have a minified `memberName`, even when dart2js is invoked with `--minify`. See [#&#8203;54201][] for more details. [#&#8203;54201]: https://github.com/dart-lang/sdk/issues/54201 ##### Analyzer - You can now suppress diagnostics in `pubspec.yaml` files by adding an `# ignore: <diagnostic_id>` comment. - Invalid `dart doc` comment directives are now reported. - The [`flutter_style_todos`][flutter_style_todos] lint now has a quick fix. [`flutter_style_todos`]: https://dart.dev/lints/flutter_style_todos ##### Linter - Removed the `iterable_contains_unrelated_type` and `list_remove_unrelated_type` lints. Consider migrating to the expanded [`collection_methods_unrelated_type`][collection_methods_unrelated_type] lint. - Removed various lints that are no longer necessary with sound null safety: - `always_require_non_null_named_parameters` - `avoid_returning_null`, - `avoid_returning_null_for_future` [`collection_methods_unrelated_type`]: https://dart.dev/lints/collection_methods_unrelated_type ### [`v3.2.6`](https://github.com/dart-lang/sdk/compare/3.2.5...3.2.6) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.5...3.2.6) ### [`v3.2.5`](https://github.com/dart-lang/sdk/compare/3.2.4...3.2.5) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.4...3.2.5) ### [`v3.2.4`](https://github.com/dart-lang/sdk/compare/3.2.3...3.2.4) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.3...3.2.4) ### [`v3.2.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#323---2023-12-06) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.2...3.2.3) This is a patch release that: - Disallows final fields to be used in a constant context during analysis (issue [#&#8203;54232][]). - Upgrades Dart DevTools to version 2.28.4 (issue [#&#8203;54213][]). - Fixes new AOT snapshots in the SDK failing with SIGILL in ARM environments that don't support the integer division instructions or x86-64 environments that don't support SSE4.1 (issue [#&#8203;54215][]). [#&#8203;54232]: https://github.com/dart-lang/sdk/issues/54232 [#&#8203;54213]: https://github.com/dart-lang/sdk/issues/54213 [#&#8203;54215]: https://github.com/dart-lang/sdk/issues/54215 ### [`v3.2.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#322---2023-11-29) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.1...3.2.2) This is a patch release that: - Adjusts the nullablity computations in the implementation of the upper bound algorithm in the compiler frontend (issue [#&#8203;53999][]). - Fixes missing closure code completion entries for function parameters for LSP-based editors like VS Code (issue [#&#8203;54112][]). [#&#8203;53999]: https://github.com/dart-lang/sdk/issues/53999 [#&#8203;54112]: https://github.com/dart-lang/sdk/issues/54112 ### [`v3.2.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#321---2023-11-22) [Compare Source](https://github.com/dart-lang/sdk/compare/3.2.0...3.2.1) This is a patch release that: - Fixes the left/mobile sidebar being empty on non-class pages in documentation generated with `dart doc` (issue [#&#8203;54073][]). - Fixes a JSON array parsing bug that causes a segmentation fault when `flutter test` is invoked with the `--coverage` flag (SDK issue [#&#8203;54059][], Flutter issue [#&#8203;124145][]). - Upgrades Dart DevTools to version 2.28.3 (issue [#&#8203;54085][]). [#&#8203;54073]: https://github.com/dart-lang/sdk/issues/54073 [#&#8203;54059]: https://github.com/dart-lang/sdk/issues/54059 [#&#8203;124145]: https://github.com/flutter/flutter/issues/124145 [#&#8203;54085]: https://github.com/dart-lang/sdk/issues/54085 ### [`v3.2.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#320---2023-11-15) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.5...3.2.0) ##### Language Dart 3.2 adds the following features. To use them, set your package's [SDK constraint][language version] lower bound to 3.2 or greater (`sdk: '^3.2.0'`). [language version]: https://dart.dev/guides/language/evolution - **Private field promotion**: In most circumstances, the types of private final fields can now be promoted by null checks and `is` tests. For example: ```dart class Example { final int? _privateField; Example(this._privateField); f() { if (_privateField != null) { // _privateField has now been promoted; you can use it without // null checking it. int i = _privateField; // OK } } } // Private field promotions also work from outside of the class: f(Example x) { if (x._privateField != null) { int i = x._privateField; // OK } } ``` To ensure soundness, a field is not eligible for field promotion in the following circumstances: - If it's not final (because a non-final field could be changed in between the test and the usage, invalidating the promotion). - If it's overridden elsewhere in the library by a concrete getter or a non-final field (because an access to an overridden field might resolve at runtime to the overriding getter or field). - If it's not private (because a non-private field might be overridden elsewhere in the program). - If it has the same name as a concrete getter or a non-final field in some other unrelated class in the library (because a class elsewhere in the program might extend one of the classes and implement the other, creating an override relationship between them). - If there is a concrete class `C` in the library whose interface contains a getter with the same name, but `C` does not have an implementation of that getter (such unimplemented getters aren't safe for field promotion, because they are implicitly forwarded to `noSuchMethod`, which might not return the same value each time it's called). - **Breaking Change** [#&#8203;53167][]: Use a more precise split point for refutable patterns. Previously, in an if-case statement, if flow analysis could prove that the scrutinee expression was guaranteed to throw an exception, it would sometimes fail to propagate type promotions implied by the pattern to the (dead) code that follows. This change makes the type promotion behavior of if-case statements consistent regardless of whether the scrutinee expression throws an exception. No live code is affected by this change, but there is a small chance that the change in types will cause a compile-time error to appear in some dead code in the user's project, where no compile-time error appeared previously. [#&#8203;53167]: https://github.com/dart-lang/sdk/issues/53167 ##### Libraries ##### `dart:async` - Added `broadcast` parameter to `Stream.empty` constructor. ##### `dart:cli` - **Breaking change** [#&#8203;52121][]: - `waitFor` is disabled by default and slated for removal in 3.4. Attempting to call this function will now throw an exception. Users that still depend on `waitFor` can enable it by passing `--enable_deprecated_wait_for` flag to the VM. [#&#8203;52121]: https://github.com/dart-lang/sdk/issues/52121 ##### `dart:convert` - **Breaking change** [#&#8203;52801][]: - Changed return types of `utf8.encode()` and `Utf8Codec.encode()` from `List<int>` to `Uint8List`. [#&#8203;52801]: https://github.com/dart-lang/sdk/issues/52801 ##### `dart:developer` - Deprecated the `Service.getIsolateID` method. - Added `getIsolateId` method to `Service`. - Added `getObjectId` method to `Service`. ##### `dart:ffi` - Added the `NativeCallable.isolateLocal` constructor. This creates `NativeCallable`s with the same functionality as `Pointer.fromFunction`, except that `NativeCallable` accepts closures. - Added the `NativeCallable.keepIsolateAlive` method, which determines whether the `NativeCallable` keeps the isolate that created it alive. - All `NativeCallable` constructors can now accept closures. Previously `NativeCallable`s had the same restrictions as `Pointer.fromFunction`, and could only create callbacks for static functions. - **Breaking change** [#&#8203;53311][]: `NativeCallable.nativeFunction` now throws an error if is called after the `NativeCallable` has already been `close`d. Calls to `close` after the first are now ignored. [#&#8203;53311]: https://github.com/dart-lang/sdk/issues/53311 ##### `dart:io` - **Breaking change** [#&#8203;53005][]: The headers returned by `HttpClientResponse.headers` and `HttpRequest.headers` no longer include trailing whitespace in their values. - **Breaking change** [#&#8203;53227][]: Folded headers values returned by `HttpClientResponse.headers` and `HttpRequest.headers` now have a space inserted at the fold point. [#&#8203;53005]: https://dartbug.com/53005 [#&#8203;53227]: https://dartbug.com/53227 ##### `dart:isolate` - Added `Isolate.packageConfigSync` and `Isolate.resolvePackageUriSync` APIs. ##### `dart:js_interop` - **Breaking Change on JSNumber.toDart and Object.toJS**: `JSNumber.toDart` is removed in favor of `toDartDouble` and `toDartInt` to make the type explicit. `Object.toJS` is also removed in favor of `Object.toJSBox`. Previously, this function would allow Dart objects to flow into JS unwrapped on the JS backends. Now, there's an explicit wrapper that is added and unwrapped via `JSBoxedDartObject.toDart`. Similarly, `JSExportedDartObject` is renamed to `JSBoxedDartObject` and the extensions `ObjectToJSExportedDartObject` and `JSExportedDartObjectToObject` are renamed to `ObjectToJSBoxedDartObject` and `JSBoxedDartObjectToObject` in order to avoid confusion with `@JSExport`. - **Type parameters in external APIs**: Type parameters must now be bound to a static interop type or one of the `dart:js_interop` types like `JSNumber` when used in an external API. This only affects `dart:js_interop` classes and not `package:js` or other forms of JS interop. - **Subtyping `dart:js_interop` types**: `@staticInterop` types can subtype only `JSObject` and `JSAny` from the set of JS types in `dart:js_interop`. Subtyping other types from `dart:js_interop` would result in confusing type errors before, so this makes it a static error. - **Global context of `dart:js_interop` and `@staticInterop` APIs**: Static interop APIs will now use the same global context as non-static interop instead of `globalThis` to avoid a greater migration. Static interop APIs, either through `dart:js_interop` or the `@staticInterop` annotation, have used JavaScript's `globalThis` as the global context. This is relevant to things like external top-level members or external constructors, as this is the root context we expect those members to reside in. Historically, this was not the case in dart2js and DDC. We used either `self` or DDC's `global` in non-static interop APIs with `package:js`. So, static interop APIs will now use one of those global contexts. Functionally, this should matter in only a very small number of cases, like when using older browser versions. `dart:js_interop`'s `globalJSObject` is also renamed to `globalContext` and returns the global context used in the lowerings. - **Breaking Change on Types of `dart:js_interop` External APIs**: External JS interop APIs when using `dart:js_interop` are restricted to a set of allowed types. Namely, this includes the primitive types like `String`, JS types from `dart:js_interop`, and other static interop types (either through `@staticInterop` or extension types). - **Breaking Change on `dart:js_interop` `isNull` and `isUndefined`**: `null` and `undefined` can only be discerned in the JS backends. dart2wasm conflates the two values and treats them both as Dart null. Therefore, these two helper methods should not be used on dart2wasm and will throw to avoid potentially erroneous code. - **Breaking Change on `dart:js_interop` `typeofEquals` and `instanceof`**: Both APIs now return a `bool` instead of a `JSBoolean`. `typeofEquals` also now takes in a `String` instead of a `JSString`. - **Breaking Change on `dart:js_interop` `JSAny` and `JSObject`**: These types can only be implemented, and no longer extended, by user `@staticInterop` types. - **Breaking Change on `dart:js_interop` `JSArray.withLength`**: This API now takes in an `int` instead of `JSNumber`. ##### Tools ##### Development JavaScript compiler (DDC) - Applications compiled by DDC will no longer add members to the native JavaScript Object prototype. - **Breaking change for JS interop with Symbols and BigInts**: JavaScript `Symbol`s and `BigInt`s are now associated with their own interceptor and should not be used with `package:js` classes. These types were being intercepted with the assumption that they are a subtype of JavaScript's `Object`, but this is incorrect. This lead to erroneous behavior when using these types as Dart `Object`s. See [#&#8203;53106][] for more details. Use `dart:js_interop`'s `JSSymbol` and `JSBigInt` with extension types to interop with these types. ##### Production JavaScript compiler (dart2js) - **Breaking change for JS interop with Symbols and BigInts**: JavaScript `Symbol`s and `BigInt`s are now associated with their own interceptor and should not be used with `package:js` classes. These types were being intercepted with the assumption that they are a subtype of JavaScript's `Object`, but this is incorrect. This lead to erroneous behavior when using these types as Dart `Object`s. See [#&#8203;53106][] for more details. Use `dart:js_interop`'s `JSSymbol` and `JSBigInt` with extension types to interop with these types. [#&#8203;53106]: https://github.com/dart-lang/sdk/issues/53106 ##### Dart command line - The `dart create` command has a new `cli` template to quickly create Dart command-line applications with basic argument parsing capabilities. To learn more about using the template, run `dart help create`. ##### Dart format - Always split enum declarations containing a line comment. - Fix regression in splitting type annotations with library prefixes. - Support `--enable-experiment` command-line option to enable language experiments. ##### DevTools - Incorporated the [2.26.1][devtools-2-26-1], [2.27.0][devtools-2-27-0], and [2.28.1][devtools-2-28-1] releases of DevTools. [devtools-2-26-1]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.26.1 [devtools-2-27-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.27.0 [devtools-2-28-1]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.28.1 ##### Linter - Added the experimental [`annotate_redeclares`][annotate_redeclares] lint. - Marked the [`use_build_context_synchronously`][use_build_context_synchronously] lint as stable. [`annotate_redeclares`]: https://dart.dev/lints/annotate_redeclares [`use_build_context_synchronously`]: https://dart.dev/lints/use_build_context_synchronously ##### Pub - New option `dart pub upgrade --tighten` which will update dependencies' lower bounds in `pubspec.yaml` to match the current version. - The commands `dart pub get`/`add`/`upgrade` will now show if a dependency changed between direct, dev and transitive dependency. - The command `dart pub upgrade` no longer shows unchanged dependencies. ### [`v3.1.5`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#315---2023-10-25) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.4...3.1.5) This is a patch release that: - Fixes an issue affecting Dart compiled to JavaScript running in Node.js 21. A change in Node.js 21 affected the Dart Web compiler runtime. This patch release accommodates for those changes (issue [#&#8203;53810](https://github.com/dart-lang/sdk/issues/53810)). [#&#8203;53810]: https://github.com/dart-lang/sdk/issues/53810 ### [`v3.1.4`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#314---2023-10-18) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.3...3.1.4) This is a patch release that: - Fixes an issue in the Dart VM, users are not being able to see value of variables while debugging code (issue \[[#&#8203;53747](https://github.com/dart-lang/sdk/issues/53747)]). [#&#8203;53654]: https://github.com/dart-lang/sdk/issues/53747 ### [`v3.1.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#313---2023-09-27) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.2...3.1.3) This is a patch release that: - Fixes a bug in dart2js which would cause the compiler to crash when using `@staticInterop` `@anonymous` factory constructors with type parameters (see issue [#&#8203;53579] for more details). - The standalone Dart VM now exports symbols only for the Dart_\* embedding API functions, avoiding conflicts with other DSOs loaded into the same process, such as shared libraries loaded through `dart:ffi`, that may have different versions of the same symbols (issue \[[#&#8203;53503](https://github.com/dart-lang/sdk/issues/53503)]). - Fixes an issue with super slow access to variables while debugging. The fix avoids searching static functions in the imported libraries as references to members are fully resolved by the front-end. (issue [#&#8203;53541]) [#&#8203;53579]: https://github.com/dart-lang/sdk/issues/53579 [#&#8203;53267]: https://github.com/dart-lang/sdk/issues/53503 [#&#8203;53541]: https://github.com/dart-lang/sdk/issues/53541 ### [`v3.1.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#312---2023-09-13) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.1...3.1.2) This is a patch release that: - Fixes a bug in dart2js which crashed the compiler when a typed record pattern was used outside the scope of a function body, such as in a field initializer. For example `final x = { for (var (int a,) in someList) a: a };` (issue [#&#8203;53449]) - Fixes an expedient issue of users seeing an unhandled exception pause in the debugger, please see https://github.com/dart-lang/sdk/issues/53450 for more details. The fix uses try/catch in lookupAddresses instead of Future error so that we don't see an unhandled exception pause in the debugger (issue [#&#8203;53450]) [#&#8203;53449]: https://github.com/dart-lang/sdk/issues/53449 [#&#8203;53450]: https://github.com/dart-lang/sdk/issues/53450 ### [`v3.1.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#311---2023-09-07) [Compare Source](https://github.com/dart-lang/sdk/compare/3.1.0...3.1.1) This is a patch release that: - Fixes a bug in the parser which prevented a record pattern from containing a nested record pattern, where the nested record pattern uses record destructuring shorthand syntax, for example `final ((:a, :b), c) = record;` (issue [#&#8203;53352]). [#&#8203;53352]: https://github.com/dart-lang/sdk/issues/53352 ### [`v3.1.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#310---2023-08-16) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.7...3.1.0) ##### Libraries ##### `dart:async` - **Breaking change** [#&#8203;52334][]: - Added the `interface` modifier to purely abstract classes: `MultiStreamController`, `StreamConsumer`, `StreamIterator` and `StreamTransformer`. As a result, these types can only be implemented, not extended or mixed in. [#&#8203;52334]: https://github.com/dart-lang/sdk/issues/52334 ##### `dart:core` - `Uri.base` on native platforms now respects `IOOverrides` overriding current directory ([#&#8203;39796][]). [#&#8203;39796]: https://github.com/dart-lang/sdk/issues/39796 ##### `dart:ffi` - Added the `NativeCallable` class, which can be used to create callbacks that allow native code to call into Dart code from any thread. See `NativeCallable.listener`. In future releases, `NativeCallable` will be updated with more functionality, and will become the recommended way of creating native callbacks for all use cases, replacing `Pointer.fromFunction`. ##### `dart:io` - **Breaking change** [#&#8203;51486][]: - Added `sameSite` to the `Cookie` class. - Added class `SameSite`. - **Breaking change** [#&#8203;52027][]: `FileSystemEvent` is [`sealed`](https://dart.dev/language/class-modifiers#sealed). This means that `FileSystemEvent` cannot be extended or implemented. - Added a deprecation warning when `Platform` is instantiated. - Added `Platform.lineTerminator` which exposes the character or characters that the operating system uses to separate lines of text, e.g., `"\r\n"` on Windows. [#&#8203;51486]: https://github.com/dart-lang/sdk/issues/51486 [#&#8203;52027]: https://github.com/dart-lang/sdk/issues/52027 ##### `dart:js_interop` - **Object literal constructors**: `ObjectLiteral` is removed from `dart:js_interop`. It's no longer needed in order to declare an object literal constructor with inline classes. As long as an external constructor has at least one named parameter, it'll be treated as an object literal constructor. If you want to create an object literal with no named members, use `{}.jsify()`. ##### Other libraries ##### `package:js` - **Breaking change to `@staticInterop` and `external` extension members**: `external` `@staticInterop` members and `external` extension members can no longer be used as tear-offs. Declare a closure or a non-`external` method that calls these members, and use that instead. - **Breaking change to `@staticInterop` and `external` extension members**: `external` `@staticInterop` members and `external` extension members will generate slightly different JS code for methods that have optional parameters. Whereas before, the JS code passed in the default value for missing optionals, it will now pass in only the provided members. This aligns with how JS parameters work, where omitted parameters are actually omitted. For example, calling `external void foo([int a, int b])` as `foo(0)` will now result in `foo(0)`, and not `foo(0, null)`. ##### Tools ##### DevTools - Incorporated the [2.24.0][devtools-2-24-0] and [2.25.0][devtools-2-25-0] releases of DevTools. [devtools-2-24-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.24.0 [devtools-2-25-0]: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.25.0 ##### Linter - Added new static analysis lints you can [enable][enable-lints] in your package's `analysis_options.yaml` file: - [`no_self_assignments`](https://dart.dev/lints/no_self_assignments) - [`no_wildcard_variable_uses`](https://dart.dev/lints/no_wildcard_variable_uses) [enable-lints]: https://dart.dev/tools/analysis#enabling-linter-rules ### [`v3.0.7`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#307---2023-07-26) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.6...3.0.7) This is a patch release that: - Fixes a bug in dart2js which would cause certain uses of records to lead to bad codegen causing a `TypeError` or `NoSuchMethodError` to be thrown at runtime (issue [#&#8203;53001]). [#&#8203;53001]: https://github.com/dart-lang/sdk/issues/53001 ### [`v3.0.6`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#306---2023-07-12) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.5...3.0.6) This is a patch release that: - Fixes a flow in flow analysis that causes it to sometimes ignore destructuring assignments (issue [#&#8203;52767]). - Fixes an infinite loop in some web development compiles that include `is` or `as` expressions involving record types with named fields (issue [#&#8203;52869]). - Fixes a memory leak in Dart analyzer's file-watching (issue [#&#8203;52791]). - Fixes a memory leak of file system watcher related data structures (issue [#&#8203;52793]). [#&#8203;52767]: https://github.com/dart-lang/sdk/issues/52767 [#&#8203;52869]: https://github.com/dart-lang/sdk/issues/52869 [#&#8203;52791]: https://github.com/dart-lang/sdk/issues/52791 [#&#8203;52793]: https://github.com/dart-lang/sdk/issues/52793 ### [`v3.0.5`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#305---2023-06-14) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.4...3.0.5) This is a patch release that: - Fixes a bad cast in the frontend which can manifest as a crash in the dart2js `ListFactorySpecializer` during Flutter web builds (issue [#&#8203;52403]). [#&#8203;52403]: https://github.com/dart-lang/sdk/issues/52403 ### [`v3.0.4`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#304---2023-06-07) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.3...3.0.4) This is a patch release that: - `dart format` now handles formatting nullable record types with no fields (dart_style issue [#&#8203;1224]). - Fixes error when using records when targeting the web in development mode (issue [#&#8203;52480]). [#&#8203;1224]: https://github.com/dart-lang/dart_style/issues/1224 [#&#8203;52480]: https://github.com/dart-lang/sdk/issues/52480 ### [`v3.0.3`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#303---2023-02-07) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.2...3.0.3) This is a patch release that: - Fixes an AOT compiler crash when generating an implicit getter returning an unboxed record (issue [#&#8203;52449]). - Fixes a situation in which variables appearing in multiple branches of an or-pattern might be erroneously reported as being mismatched (issue [#&#8203;52373]). - Adds missing `interface` modifiers on the purely abstract classes `MultiStreamController`, `StreamConsumer`, `StreamIterator` and `StreamTransformer` (issue [#&#8203;52334]). - Fixes an error during debugging when `InternetAddress.tryParse` is used (issue [#&#8203;52423]). - Fixes a VM issue causing crashes on hot reload (issue [#&#8203;126884]). - Improves linter support (issue [#&#8203;4195]). - Fixes an issue in variable patterns preventing users from expressing a pattern match using a variable or wildcard pattern with a nullable record type (issue [#&#8203;52439]). - Updates warnings and provide instructions for updating the Dart pub cache on Windows (issue [#&#8203;52386]). [#&#8203;52373]: https://github.com/dart-lang/sdk/issues/52373 [#&#8203;52334]: https://github.com/dart-lang/sdk/issues/52334 [#&#8203;52423]: https://github.com/dart-lang/sdk/issues/52423 [#&#8203;126884]: https://github.com/flutter/flutter/issues/126884 [#&#8203;4195]: https://github.com/dart-lang/linter/issues/4195 [#&#8203;52439]: https://github.com/dart-lang/sdk/issues/52439 [#&#8203;52449]: https://github.com/dart-lang/sdk/issues/52449 [#&#8203;52386]: https://github.com/dart-lang/sdk/issues/52386 ### [`v3.0.2`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#302---2023-05-24) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.1...3.0.2) This is a patch release that: - Fixes a dart2js crash when using a switch case expression on a record where the fields don't match the cases (issue [#&#8203;52438]). - Add class modifier chips on class and mixin pages generated with `dart doc` (issue [#&#8203;3392]). - Fixes a situation causing the parser to fail resulting in an infinite loop leading to higher memory usage (issue [#&#8203;52352]). - Add clear errors when mixing inheritance in pre and post Dart 3 libraries (issue: [#&#8203;52078]). [#&#8203;52438]: https://github.com/dart-lang/sdk/issues/52438 [#&#8203;3392]: https://github.com/dart-lang/dartdoc/issues/3392 [#&#8203;52352]: https://github.com/dart-lang/sdk/issues/52352 [#&#8203;52078]: https://github.com/dart-lang/sdk/issues/52078 ### [`v3.0.1`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#301---2023-05-17) [Compare Source](https://github.com/dart-lang/sdk/compare/3.0.0...3.0.1) This is a patch release that: - Fixes a compiler crash involving redirecting factories and FFI (issue [#&#8203;124369]). - Fixes a dart2js crash when using a combination of local functions, generics, and records (issue [#&#8203;51899]). - Fixes incorrect error using a `void` in a switch case expression (issue [#&#8203;52191]). - Fixes a false error when using in switch case expressions when the switch refers to a private getter (issue [#&#8203;52041]). - Prevent the use of `when` and `as` as variable names in patterns (issue [#&#8203;52260]). - Fixes an inconsistency in type promotion between the analyzer and VM (issue [#&#8203;52241]). - Improve performance on functions with many parameters (issue [#&#8203;1212]). [#&#8203;124369]: https://github.com/flutter/flutter/issues/124369 [#&#8203;51899]: https://github.com/dart-lang/sdk/issues/51899 [#&#8203;52191]: https://github.com/dart-lang/sdk/issues/52191 [#&#8203;52041]: https://github.com/dart-lang/sdk/issues/52041 [#&#8203;52260]: https://github.com/dart-lang/sdk/issues/52260 [#&#8203;52241]: https://github.com/dart-lang/sdk/issues/52241 [#&#8203;1212]: https://github.com/dart-lang/dart_style/issues/1212 ### [`v3.0.0`](https://github.com/dart-lang/sdk/blob/HEAD/CHANGELOG.md#300---2023-05-10) [Compare Source](https://github.com/dart-lang/sdk/compare/2.19.6...3.0.0) ##### Language Dart 3.0 adds the following features. To use them, set your package's [SDK constraint][language version] lower bound to 3.0 or greater (`sdk: '^3.0.0'`). [language version]: https://dart.dev/guides/language/evolution - **[Records]**: Records are anonymous immutable data structures that let you aggregate multiple values together, similar to [tuples][] in other languages. With records, you can return multiple values from a function, create composite map keys, or use them any other place where you want to bundle a couple of objects together. For example, using a record to return two values: ```dart (double x, double y) geoLocation(String name) { if (name == 'Nairobi') { return (-1.2921, 36.8219); } else { ... } } ``` - **[Pattern matching]**: Expressions build values out of smaller pieces. Conversely, patterns are an expressive tool for decomposing values back into their constituent parts. Patterns can call getters on an object, access elements from a list, pull fields out of a record, etc. For example, we can destructure the record from the previous example like so: ```dart var (lat, long) = geoLocation('Nairobi'); print('Nairobi is at $lat, $long.'); ``` Patterns can also be used in [switch cases]. There, you can destructure values and also test them to see if they have a certain type or value: ```dart switch (object) { case [int a]: print('A list with a single integer element $a'); case ('name', _): print('A two-element record whose first field is "name".'); default: print('Some other object.'); } ``` Also, as you can see, non-empty switch cases no longer need `break;` statements. **Breaking change**: Dart 3.0 interprets [switch cases] as patterns instead of constant expressions. Most constant expressions found in switch cases are valid patterns with the same meaning (named constants, literals, etc.). You may need to tweak a few constant expressions to make them valid. This only affects libraries that have upgraded to language version 3.0. - **[Switch expressions]**: Switch expressions allow you to use patterns and multi-way branching in contexts where a statement isn't allowed: ```dart return TextButton( onPressed: _goPrevious, child: Text(switch (page) { 0 => 'Exit story', 1 => 'First page', _ when page == _lastPage => 'Start over', _ => 'Previous page', }), ); ``` - **[If-case statements and elements]**: A new if construct that matches a value against a pattern and executes the then or else branch depending on whether the pattern matches: ```dart if (json case ['user', var name]) { print('Got user message for user $name.'); } ``` There is also a corresponding [if-case element] that can be used in collection literals. - **[Sealed classes]**: When you mark a type `sealed`, the compiler ensures that switches on values of that type [exhaustively cover] every subtype. This enables you to program in an [algebraic datatype][] style with the compile-time safety you expect: ```dart sealed class Amigo {} class Lucky extends Amigo {} class Dusty extends Amigo {} class Ned extends Amigo {} String lastName(Amigo amigo) => switch (amigo) { Lucky _ => 'Day', Ned _ => 'Nederlander', }; ``` In this last example, the compiler reports an error that the switch doesn't cover the subclass `Dusty`. - **[Class modifiers]**: New modifiers `final`, `interface`, `base`, and `mixin` on `class` and `mixin` declarations let you control how the type can be used. By default, Dart is flexible in that a single class declaration can be used as an interface, a superclass, or even a mixin. This flexibility can make it harder to evolve an API over time without breaking users. We mostly keep the current flexible defaults, but these new modifiers give you finer-grained control over how the type can be used. **Breaking change:** Class declarations from libraries that have been upgraded to Dart 3.0 can no longer be used as mixins by default. If you want the class to be usable as both a class and a mixin, mark it [`mixin class`][mixin class]. If you want it to be used only as a mixin, make it a `mixin` declaration. If you haven't upgraded a class to Dart 3.0, you can still use it as a mixin. - **Breaking change** [#&#8203;50902][]: Dart reports a compile-time error if a `continue` statement targets a [label] that is not a loop (`for`, `do` and `while` statements) or a `switch` member. Fix this by changing the `continue` to target a valid labeled statement. - **Breaking change** [language/#&#8203;2357][]: Starting in language version 3.0, Dart reports a compile-time error if a colon (`:`) is used as the separator before the default value of an optional named parameter. Fix this by changing the colon (`:`) to an equal sign (`=`). [records]: https://dart.dev/language/records [tuples]: https://en.wikipedia.org/wiki/Tuple [pattern matching]: https://dart.dev/language/patterns [switch cases]: https://dart.dev/language/branches#switch [switch expressions]: https://dart.dev/language/branches#switch-expressions [if-case statements and elements]: https://dart.dev/language/branches#if-case [if-case element]: https://dart.dev/language/collections#control-flow-operators [sealed classes]: https://dart.dev/language/class-modifiers#sealed [exhaustively cover]: https://dart.dev/language/branches#exhaustiveness-checking [algebraic datatype]: https://en.wikipedia.org/wiki/Algebraic_data_type [class modifiers]: https://dart.dev/language/class-modifiers [mixin class]: https://dart.dev/language/mixins#class-mixin-or-mixin-class [#&#8203;50902]: https://github.com/dart-lang/sdk/issues/50902 [label]: https://dart.dev/language/branches#switch [language/#&#8203;2357]: https://github.com/dart-lang/language/issues/2357 ##### Libraries ##### General changes - **Breaking Change**: Non-`mixin` classes in the platform libraries can no longer be mixed in, unless they are explicitly marked as `mixin class`. The following existing classes have been made mixin classes: - `Iterable` - `IterableMixin` (now alias for `Iterable`) - `IterableBase` (now alias for `Iterable`) - `ListMixin` - `SetMixin` - `MapMixin` - `LinkedListEntry` - `StringConversionSink` ##### `dart:core` - Added `bool.parse` and `bool.tryParse` static methods. - Added `DateTime.timestamp()` constructor to get current time as UTC. - The type of `RegExpMatch.pattern` is now `RegExp`, not just `Pattern`. - **Breaking change** [#&#8203;49529][]: - Removed the deprecated `List` constructor, as it wasn't null safe. Use list literals (e.g. `[]` for an empty list or `<int>[]` for an empty typed list) or [`List.filled`][List.filled]. - Removed the deprecated `onError` argument on [`int.parse`][int.parse], [`double.parse`][double.parse], and [`num.parse`][num.parse]. Use the [`tryParse`][tryParse] method instead. - Removed the deprecated [`proxy`][proxy] and [`Provisional`][Provisional] annotations. The original `proxy` annotation has no effect in Dart 2, and the `Provisional` type and [`provisional`][provisional] constant were only used internally during the Dart 2.0 development process. - Removed the deprecated [`Deprecated.expires`][Deprecated.expires] getter. Use [`Deprecated.message`][Deprecated.message] instead. - Removed the deprecated [`CastError`][CastError] error. Use [`TypeError`][TypeError] instead. - Removed the deprecated [`FallThroughError`][FallThroughError] error. The kind of fall-through previously throwing this error was made a compile-time error in Dart 2.0. - Removed the deprecated [`NullThrownError`][NullThrownError] error. This error is never thrown from null safe code. - Removed the deprecated [`AbstractClassInstantiationError`][AbstractClassInstantiationError] error. It was made a compile-time error to call the constructor of an abstract class in Dart 2.0. - Removed the deprecated [`CyclicInitializationError`][CyclicInitializationError]. Cyclic dependencies are no longer detected at runtime in null safe code. Such code will fail in other ways instead, possibly with a StackOverflowError. - Removed the deprecated [`NoSuchMethodError`][NoSuchMethodError] default constructor. Use the [`NoSuchMethodError.withInvocation`][NoSuchMethodError.withInvocation] named constructor instead. - Removed the deprecated [`BidirectionalIterator`][BidirectionalIterator] class. Existing bidirectional iterators can still work, they just don't have a shared supertype locking them to a specific name for moving backwards. - **Breaking change when migrating code to Dart 3.0**: Some changes to platform libraries only affect code when that code is migrated to language version 3.0. - The `Function` type can no longer be implemented, extended or mixed in. Since Dart 2.0 writing `implements Function` has been allowed for backwards compatibility, but it has not had any effect. In Dart 3.0, the `Function` type is `final` and cannot be subtyped, preventing code from mistakenly assuming it works. - The following declarations can only be implemented, not extended: - `Comparable` - `Exception` - `Iterator` - `Pattern` - `Match` - `RegExp` - `RegExpMatch` - `StackTrace` - `StringSink` None of these declarations contained any implementation to inherit, and are marked as `interface` to signify that they are only intended as interfaces. - The following declarations can no longer be implemented or extended: - `MapEntry` - `OutOfMemoryError` - `StackOverflowError` - `Expando` - `WeakReference` - `Finalizer` The `MapEntry` value class is restricted to enable later optimizations. The remaining classes are tightly coupled to the platform and not intended to be subclassed or implemented. [#&#8203;49529]: https://github.com/dart-lang/sdk/issues/49529 [`List.filled`]: https://api.dart.dev/stable/2.18.6/dart-core/List/List.filled.html [`int.parse`]: https://api.dart.dev/stable/2.18.4/dart-core/int/parse.html [`double.parse`]: https://api.dart.dev/stable/2.18.4/dart-core/double/parse.html [`num.parse`]: https://api.dart.dev/stable/2.18.4/dart-core/num/parse.html [`tryParse`]: https://api.dart.dev/stable/2.18.4/dart-core/num/tryParse.html [`Deprecated.expires`]: https://api.dart.dev/stable/2.18.4/dart-core/Deprecated/expires.html [`Deprecated.message`]: https://api.dart.dev/stable/2.18.4/dart-core/Deprecated/message.html [`AbstractClassInstantiationError`]: https://api.dart.dev/stable/2.17.4/dart-core/AbstractClassInstantiationError-class.html [`CastError`]: https://api.dart.dev/stable/2.17.4/dart-core/CastError-class.html [`FallThroughError`]: https://api.dart.dev/stable/2.17.4/dart-core/FallThroughError-class.html [`NoSuchMethodError`]: https://api.dart.dev/stable/2.18.4/dart-core/NoSuchMethodError/NoSuchMethodError.html [`NoSuchMethodError.withInvocation`]: https://api.dart.dev/stable/2.18.4/dart-core/NoSuchMethodError/NoSuchMethodError.withInvocation.html [`CyclicInitializationError`]: https://api.dart.dev/dev/2.19.0-430.0.dev/dart-core/CyclicInitializationError-class.html [`Provisional`]: https://api.dart.dev/stable/2.18.4/dart-core/Provisional-class.html [`provisional`]: https://api.dart.dev/stable/2.18.4/dart-core/provisional-constant.html [`proxy`]: https://api.dart.dev/stable/2.18.4/dart-core/proxy-constant.html [`CastError`]: https://api.dart.dev/stable/2.18.3/dart-core/CastError-class.html [`TypeError`]: https://api.dart.dev/stable/2.18.3/dart-core/TypeError-class.html [`FallThroughError`]: https://api.dart.dev/dev/2.19.0-374.0.dev/dart-core/FallThroughError-class.html [`NullThrownError`]: https://api.dart.dev/dev/2.19.0-430.0.dev/dart-core/NullThrownError-class.html [`AbstractClassInstantiationError`]: https://api.dart.dev/stable/2.18.3/dart-core/AbstractClassInstantiationError-class.html [`CyclicInitializationError`]: https://api.dart.dev/dev/2.19.0-430.0.dev/dart-core/CyclicInitializationError-class.html [`BidirectionalIterator`]: https://api.dart.dev/dev/2.19.0-430.0.dev/dart-core/BidirectionalIterator-class.html ##### `dart:async` - Added extension member `wait` on iterables and 2-9 tuples of futures. - **Breaking change** [#&#8203;49529][]: - Removed the deprecated [`DeferredLibrary`][DeferredLibrary] class. Use the [`deferred as`][deferred as] import syntax instead. [#&#8203;49529]: https://github.com/dart-lang/sdk/issues/49529 [`DeferredLibrary`]: https://api.dart.dev/stable/2.18.4/dart-async/DeferredLibrary-class.html [`deferred as`]: https://dart.dev/language/libraries#deferred-loading ##### `dart:collection` - Added extension members `nonNulls`, `firstOrNull`, `lastOrNull`, `singleOrNull`, `elementAtOrNull` and `indexed` on `Iterable`s. Also exported from `dart:core`. - Deprecated the `HasNextIterator` class ([#&#8203;50883][]). - **Breaking change when migrating code to Dart 3.0**: Some changes to platform libraries only affect code when it is migrated to language version 3.0. - The following interface can no longer be extended, only implemented: - `Queue` - The following implementation classes can no longer be implemented: - `LinkedList` - `LinkedListEntry` - The following implementation classes can no longer be implemented or extended: - `HasNextIterator` (Also deprecated.) - `HashMap` - `LinkedHashMap` - `HashSet` - `LinkedHashSet` - `DoubleLinkedQueue` - `ListQueue` - `SplayTreeMap` - `SplayTreeSet` [#&#8203;50883]: https://github.com/dart-lang/sdk/issues/50883 ##### `dart:developer` - **Breaking change** [#&#8203;49529][]: - Removed the deprecated [`MAX_USER_TAGS`][MAX_USER_TAGS] constant. Use [`maxUserTags`][maxUserTags] instead. - Callbacks passed to `registerExtension` will be run in the zone from which they are registered. - **Breaking change** [#&#8203;50231][]: - Removed the deprecated [`Metrics`][Metrics], [`Metric`][Metric], [`Counter`][Counter], and [`Gauge`][Gauge] classes as they have been broken since Dart 2.0. [#&#8203;49529]: https://github.com/dart-lang/sdk/issues/49529 [#&#8203;50231]: https://github.com/dart-lang/sdk/issues/50231 [`MAX_USER_TAGS`]: https://api.dart.dev/stable/2.19.6/dart-developer/UserTag/MAX_USER_TAGS-constant.html [`maxUserTags`]: https://api.dart.dev/beta/2.19.0-255.2.beta/dart-developer/UserTag/maxUserTags-constant.html [`Metrics`]: https://api.dart.dev/stable/2.18.2/dart-developer/Metrics-class.html [`Metric`]: https://api.dart.dev/stable/2.18.2/dart-developer/Metric-class.html [`Counter`]: https://api.dart.dev/stable/2.18.2/dart-developer/Counter-class.html [`Gauge`]: https://api.dart.dev/stable/2.18.2/dart-developer/Gauge-class.html ##### `dart:ffi` - The experimental `@FfiNative` annotation is now deprecated. Usages should be replaced with the new `@Native` annotation. ##### `dart:html` - **Breaking change**: As previously announced, the deprecated `registerElement` and `registerElement2` methods in `Document` and `HtmlDocument` have been removed. See [#&#8203;49536](https://github.com/dart-lang/sdk/issues/49536) for details. ##### `dart:math` - **Breaking change when migrating code to Dart 3.0**: Some changes to platform libraries only affect code when it is migrated to language version 3.0. - The `Random` interface can only be implemented, not extended. ##### `dart:io` - Added `name` and `signalNumber` to the `ProcessSignal` class. - Deprecate `NetworkInterface.listSupported`. Has always returned true since Dart 2.3. - Finalize `httpEnableTimelineLogging` parameter name transition from `enable` to `enabled`. See [#&#8203;43638][]. - Favor IPv4 connections over IPv6 when connecting sockets. See [#&#8203;50868]. - **Breaking change** [#&#8203;51035][]: - Update `NetworkProfiling` to accommodate new `String` ids that are introduced in vm_service:11.0.0 [#&#8203;43638]: https://github.com/dart-lang/sdk/issues/43638 [#&#8203;50868]: https://github.com/dart-lang/sdk/issues/50868 [#&#8203;51035]: https://github.com/dart-lang/sdk/issues/51035 ##### `dart:js_util` - Added several helper functions to access more JavaScript operators, like `delete` and the `typeof` functionality. - `jsify` is now permissive and has inverse semantics to `dartify`. - `jsify` and `dartify` both handle types they understand natively more efficiently. - Signature of `callMethod` has been aligned with the other methods and now takes `Object` instead of `String`. ##### Tools ##### Observatory - Observatory is no longer served by default and users should instead use Dart DevTools. Users requiring specific functionality in Observatory should set the `--serve-observatory` flag. ##### Web Dev Compiler (DDC) - Removed deprecated command line flags `-k`, `--kernel`, and `--dart-sdk`. - The compile time flag `--nativeNonNullAsserts`, which ensures web library APIs are sound in their nullability, is by default set to true in sound mode. For more information on the flag, see [NATIVE_NULL_ASSERTIONS.md][]. [NATIVE_NULL_ASSERTIONS.md]: https://github.com/dart-lang/sdk/blob/main/sdk/lib/html/doc/NATIVE_NULL_ASSERTIONS.md ##### dart2js - The compile time flag `--native-null-assertions`, which ensures web library APIs are sound in their nullability, is by default set to true in sound mode, unless `-O3` or higher is passed, in which case they are not checked. For more information on the flag, see [NATIVE_NULL_ASSERTIONS.md][]. [NATIVE_NULL_ASSERTIONS.md]: https://github.com/dart-lang/sdk/blob/main/sdk/lib/html/doc/NATIVE_NULL_ASSERTIONS.md ##### Dart2js - Cleanup related to [#&#8203;46100](https://github.com/dart-lang/sdk/issues/46100): the internal dart2js snapshot fails unless it is called from a supported interface, such as `dart compile js`, `flutter build`, or `build_web_compilers`. This is not expected to be a visible change. ##### Formatter - Format `sync*` and `async*` functions with `=>` bodies. - Don't split after `<` in collection literals. - Better indentation of multiline function types inside type argument lists. - Fix bug where parameter metadata wouldn't always split when it should. ##### Analyzer - Most static analysis "hints" are converted to be "warnings," and any remaining hints are intended to be converted soon after the Dart 3.0 release. This means that any (previously) hints reported by `dart analyze` are now considered "fatal" (will result in a non-zero exit code). The previous behavior, where such hints (now warnings) are not fatal, can be achieved by using the `--no-fatal-warnings` flag. This behavior can also be altered, on a code-by-code basis, by [changing the severity of rules] in an analysis options file. - Add static enforcement of the SDK-only `@Since` annotation. When code in a package uses a Dart SDK element annotated with `@Since`, analyzer will report a warning if the package's [Dart SDK constraint] allows versions of Dart which don't include that element. - Protects the Dart Analysis Server against extreme memory usage by limiting the number of plugins per analysis context to 1. (issue \[[#&#8203;50981](https://github.com/dart-lang/sdk/issues/50981)]\[]). [changing the severity of rules]: https://dart.dev/tools/analysis#changing-the-severity-of-rules [Dart SDK constraint]: https://dart.dev/tools/pub/pubspec#sdk-constraints ##### Linter Updates the Linter to `1.35.0`, which includes changes that - add new lints: - `implicit_reopen` - `unnecessary_breaks` - `type_literal_in_constant_pattern` - `invalid_case_patterns` - update existing lints to support patterns and class modifiers - remove support for: - `enable_null_safety` - `invariant_booleans` - `prefer_bool_in_asserts` - `prefer_equal_for_default_values` - `super_goes_last` - fix `unnecessary_parenthesis` false-positives with null-aware expressions. - fix `void_checks` to allow assignments of `Future<dynamic>?` to parameters typed `FutureOr<void>?`. - fix `use_build_context_synchronously` in if conditions. - fix a false positive for `avoid_private_typedef_functions` with generalized type aliases. - update `unnecessary_parenthesis` to detect some doubled parens. - update `void_checks` to allow returning `Never` as void. - update `no_adjacent_strings_in_list` to support set literals and for- and if-elements. - update `avoid_types_as_parameter_names` to handle type variables. - update `avoid_positional_boolean_parameters` to handle typedefs. - update `avoid_redundant_argument_values` to check parameters of redirecting constructors. - improve performance for `prefer_const_literals_to_create_immutables`. - update `use_build_context_synchronously` to check context properties. - improve `unnecessary_parenthesis` support for property accesses and method invocations. - update `unnecessary_parenthesis` to allow parentheses in more null-aware cascade contexts. - update `unreachable_from_main` to track static elements. - update `unnecessary_null_checks` to not report on arguments passed to `Future.value` or `Completer.complete`. - mark `always_use_package_imports` and `prefer_relative_imports` as incompatible rules. - update `only_throw_errors` to not report on `Never`-typed expressions. - update `unnecessary_lambdas` to not report with `late final` variables. - update `avoid_function_literals_in_foreach_calls` to not report with nullable- typed targets. - add new lint: `deprecated_member_use_from_same_package` which replaces the soft-deprecated analyzer hint of the same name. - update `public_member_api_docs` to not require docs on enum constructors. - update `prefer_void_to_null` to not report on as-expressions. ##### Migration tool removal The null safety migration tool (`dart migrate`) has been removed. If you still have code which needs to be migrated to null safety, please run `dart migrate` using Dart version 2.19, before upgrading to Dart version 3.0. ##### Pub - To preserve compatibility with null-safe code pre Dart 3, Pub will interpret a language constraint indicating a language version of `2.12` or higher and an upper bound of `<3.0.0` as `<4.0.0`. For example `>=2.19.2 <3.0.0` will be interpreted as `>=2.19.2 <4.0.0`. - `dart pub publish` will no longer warn about `dependency_overrides`. Dependency overrides only take effect in the root package of a resolution. - `dart pub token add` now verifies that the given token is valid for including in a header according to [RFC 6750 section 2.1](https://www.rfc-editor.org/rfc/rfc6750#section-2.1). This means they must contain only the characters: `^[a-zA-Z0-9._~+/=-]+$`. Before a failure would happen when attempting to send the authorization header. - `dart pub get` and related commands will now by default also update the dependencies in the `example` folder (if it exists). Use `--no-example` to avoid this. - On Windows the `PUB_CACHE` has moved to `%LOCALAPPDATA%`, since Dart 2.8 the `PUB_CACHE` has been created in `%LOCALAPPDATA%` when one wasn't present. Hence, this only affects users with a `PUB_CACHE` created by Dart 2.7 or earlier. If you have `path/to/.pub-cache/bin` in `PATH` you may need to update your `PATH`. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
renovate added 1 commit 2023-12-17 01:09:57 +00:00
Update dependency dart to v3
Some checks failed
renovate/artifacts Artifact file update failure
valuya/embedded-webview/pipeline/head There was a failure building this commit
valuya/embedded-webview/pipeline/pr-master There was a failure building this commit
980bfece03
Author
Owner

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pubspec.lock
Command failed: docker pull ghcr.io/containerbase/sidecar:9.30.5
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

### ⚠ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: pubspec.lock ``` Command failed: docker pull ghcr.io/containerbase/sidecar:9.30.5 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ```
This repo is archived. You cannot comment on pull requests.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Valuya/embedded-webview#60
No description provided.