blob: ea70bc2ffd55e3b4e78c2c4c164ea297a2c0e9ab [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file exists solely to host compiled excerpts for README.md, and is not
// intended for use as an actual example application.
// ignore_for_file: avoid_print
// #docregion Encoding
import 'dart:typed_data';
import 'package:standard_message_codec/standard_message_codec.dart';
// #enddocregion Encoding
void main() {
final ByteData? data =
const StandardMessageCodec().encodeMessage(<Object, Object>{
'foo': true,
3: 'fizz',
});
print('The encoded message is $data');
}