Ian Hickson 7cf2dbdf37 Fix crash when dumping the app if it uses RichText
Specifically:

* Handle null styles in TextSpan without crashing in toString().

* Handle null children in TextSpan child lists without crashing in
  toString().

* Handle entirely empty TextSpans in toString() explicitly.

* Assert that TextSpans don't contain nulls in various places. This is
  done more often than one might think necessary, because it turns out
  that TextSpan takes a (mutable) List for one of its arguments, so
  who knows what it will contain at any given time. By asserting all
  over the place, hopefully we'll catch it near the change if they do
  change it.

* Add a RichText example to Stocks to exercise RichText and TextSpans.

See also: https://github.com/flutter/flutter/issues/2514, https://github.com/flutter/flutter/issues/2519
2016-03-10 20:48:50 -08:00

24 lines
840 B
Dart

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// System services exposed to Flutter apps.
///
/// For example, this library includes [fetch], which fetches data from the
/// network.
///
/// This library depends only on core Dart libraries as well as the `mojo`,
/// `mojo_services`, and `sky_services` and packages.
library services;
export 'src/services/activity.dart';
export 'src/services/assertions.dart';
export 'src/services/asset_bundle.dart';
export 'src/services/binding.dart';
export 'src/services/fetch.dart';
export 'src/services/image_cache.dart';
export 'src/services/image_decoder.dart';
export 'src/services/image_resource.dart';
export 'src/services/keyboard.dart';
export 'src/services/print.dart';