mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Bindings now have a debugRegisterServiceExtensions() method that is
invoked in debug mode (only). (Once we have a profile mode, there'll be
a registerProfileServiceExtensions() method that gets called in that
mode only to register extensions that apply then.)
The BindingBase class provides convenience methods for registering
service extensions that do the equivalent of:
```dart
void extension() { ... }
bool extension([bool enabled]) { ... }
double extension([double extension]) { ... }
Map<String, String> extension([Map<String, String> parameters]) { ... }
```
The BindingBase class also itself registers ext.flutter.reassemble,
which it has call a function on the binding called
reassembleApplication().
The Scheduler binding now exposes the preexisting
ext.flutter.timeDilation.
The Renderer binding now exposes the preexisting ext.flutter.debugPaint.
The Renderer binding hooks reassembleApplication to trigger the
rendering tree to be reprocessed (in particular, to fix up the
optimisation closures).
All the logic from rendering/debug.dart about service extensions is
replaced by the above.
I moved basic_types to foundation.
The FlutterWidgets binding hooks reassembleApplication to trigger the
widget tree to be entirely rebuilt.
Flutter Driver now uses ext.flutter.driver instead of
ext.flutter_driver, and is hooked using the same binding mechanism.
Eventually we'll probably move the logic into the Flutter library so
that you just get it without having to invoke a special method first.
52 lines
2.1 KiB
Dart
52 lines
2.1 KiB
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.
|
|
|
|
/// The Flutter rendering tree.
|
|
///
|
|
/// The [RenderObject] hierarchy is used by the Flutter Widgets
|
|
/// library to implement its layout and painting back-end. Generally,
|
|
/// while you may use custom [RenderBox] classes for specific effects
|
|
/// in your applications, most of the time your only interaction with
|
|
/// the [RenderObject] hierarchy will be in debugging layout issues.
|
|
///
|
|
/// If you are developing your own library or application directly on
|
|
/// top of the rendering library, then you will want to have a binding
|
|
/// (see [BindingBase]). You can use [RenderingFlutterBinding], or you
|
|
/// can create your own binding. If you create your own binding, it
|
|
/// needs to import at least [Scheduler], [Gesturer], [Services], and
|
|
/// [Renderer]. The rendering library does not automatically create a
|
|
/// binding, but relies on one being initialized with those features.
|
|
library rendering;
|
|
|
|
export 'src/rendering/auto_layout.dart';
|
|
export 'src/rendering/binding.dart';
|
|
export 'src/rendering/block.dart';
|
|
export 'src/rendering/box.dart';
|
|
export 'src/rendering/child_view.dart';
|
|
export 'src/rendering/custom_layout.dart';
|
|
export 'src/rendering/debug.dart';
|
|
export 'src/rendering/editable_line.dart';
|
|
export 'src/rendering/error.dart';
|
|
export 'src/rendering/flex.dart';
|
|
export 'src/rendering/grid.dart';
|
|
export 'src/rendering/image.dart';
|
|
export 'src/rendering/layer.dart';
|
|
export 'src/rendering/list.dart';
|
|
export 'src/rendering/node.dart';
|
|
export 'src/rendering/object.dart';
|
|
export 'src/rendering/overflow.dart';
|
|
export 'src/rendering/paragraph.dart';
|
|
export 'src/rendering/performance_overlay.dart';
|
|
export 'src/rendering/proxy_box.dart';
|
|
export 'src/rendering/rotated_box.dart';
|
|
export 'src/rendering/semantics.dart';
|
|
export 'src/rendering/shifted_box.dart';
|
|
export 'src/rendering/stack.dart';
|
|
export 'src/rendering/table.dart';
|
|
export 'src/rendering/view.dart';
|
|
export 'src/rendering/viewport.dart';
|
|
|
|
export 'package:flutter/foundation.dart';
|
|
export 'package:vector_math/vector_math_64.dart' show Matrix4;
|