文件最后提交记录最后更新时间
Update repo for 3.32 stable (#9311) Does all of the steps from https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md for the 3.32 stable release (except the first one, as the stable roller has already landed).1 年前
[analysis_options] sync lint rules with flutter/flutter (#2495) 3 年前
[ci] Add a web version of Dart unit tests (#4352) Adds new LUCI targets in bringup mode to run all possible Dart unit tests in Chrome. This is a new test (see linked issue), not a port of a Cirrus test, so it involves changes to tooling and packages: - The tooling now accepts an explicit platform. The default behavior if none is provided is the previous behavior of running in VM for everything but web plugin implementations (since that's convenient locally). - The tooling now has a basic understanding of dart_test.yaml test_on directives, to know when to skip. - Packages that don't support web have opt-out files. - Packages that do support web but have a few tests that fail on web have those tests opted out. - Packages that do support web but have a lot of failures on web have temporary opt-out files with TODOs + issue links. Most of https://github.com/flutter/flutter/issues/1289792 年前
add StandardMessageCodec extracted from Flutter SDK (#2434) 3 年前
add StandardMessageCodec extracted from Flutter SDK (#2434) 3 年前
Update repo for 3.32 stable (#9311) Does all of the steps from https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md for the 3.32 stable release (except the first one, as the stable roller has already landed).1 年前
add StandardMessageCodec extracted from Flutter SDK (#2434) 3 年前
[flutter_plugin_tools] Reimplements the excerpt system inline in the tool, rather than relying on a separate package. (#4417) * Allows excerpts to come from any package, not just examples. * Fixes a bug in the excerpting logic that was causing a stray } to appear in one example. * Removes the need for build.excerpt.yaml files. * Remove the dependency on build_runner for excerpts. * Reduces the time to generate the excerpts from about 10 minutes to about 5 seconds. * Almost certainly fixes https://github.com/flutter/flutter/issues/107180 (untested). The new logic is not quite backwards compatible; the path-base feature now specifies a real path to the actual source directories, rather than a path into the invisible generated excerpts/ directory with its special structure. Also, a number of features from the previous package that were not actually used in this repository are no longer supported (such as having multiple section names per #docregion pragma).2 年前
[various] Disable sandbox in Chrome dart tests (#8909) flutter test automatically disables sandbox in headless mode, but dart test does not, and the Linux CI bots no longer support the sandbox, so this turns it off explicitly for packages that don't rely on Flutter (and thus use dart test). Fixes https://github.com/flutter/flutter/issues/1656641 年前
Update repo for 3.32 stable (#9311) Does all of the steps from https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md for the 3.32 stable release (except the first one, as the stable roller has already landed).1 年前
README.md

An efficient and schemaless binary format used by the Flutter SDK.

Features

Efficiency

The standard message codec is a binary format, as opposed to text based formats like JSON. Consider the following snippet of JSON:

{
    "data": [1, 2, 3, 4],
}

In order for this message to be decoded into a Dart map, a utf8 binary file must first be parsed and validated into a Dart string. Then a second pass is performed which looks for specific characters that indicate JSON structures - for example "{" and "}". No sizes or lengths are known ahead of time while, parsing, so the resulting Dart list created for the "data" key is append to as decoding happens.

In contrast, decoding the standard message codec version of this message avoids utf8 decoding, instead operating on the bytes themselves. The only string constructed will be for the "data" key. The length of the list in the data field is encoded in the structure, meaning the correct length object can be allocated and filled in as decoding happens.

Schemaless

Using standard message codec does not require a schema (like protobuf) or any generated code. This makes it easy to use for dynamic messages and simplifies the integration into existing codebases.

The tradeoff for this ease of use is that it becomes the application's responsibility to verify the structure of messages sent/received. There is also no automatic backwards compatibility like protobuf.

Getting started

standard_message_codec can be used to encode and decode messages in either Flutter or pure Dart applications.

void main() {
  final ByteData? data =
      const StandardMessageCodec().encodeMessage(<Object, Object>{
    'foo': true,
    3: 'fizz',
  });
  print('The encoded message is $data');
}