Add an assert and remove a TODO (#7368)

The assert helped me debug an issue recently.

The TODO is obsolete.
This commit is contained in:
Ian Hickson
2017-01-05 22:11:29 -08:00
committed by GitHub
parent 1c43c4e24d
commit ec9a6fbbdd
2 changed files with 1 additions and 1 deletions

View File

@@ -517,7 +517,6 @@ abstract class SchedulerBinding extends BindingBase {
///
/// This is only valid while [handleBeginFrame] is running, i.e. while a frame
/// is being produced.
// TODO(ianh): Replace this when fixing https://github.com/flutter/flutter/issues/5469
Duration get currentFrameTimeStamp {
assert(_currentFrameTimeStamp != null);
return _currentFrameTimeStamp;

View File

@@ -2790,6 +2790,7 @@ class RepaintBoundary extends SingleChildRenderObjectWidget {
/// The key for the [RepaintBoundary] is derived either from the child's key
/// (if the child has a non-null key) or from the given `childIndex`.
factory RepaintBoundary.wrap(Widget child, int childIndex) {
assert(child != null);
Key key = child.key != null ? new ValueKey<Key>(child.key) : new ValueKey<int>(childIndex);
return new RepaintBoundary(key: key, child: child);
}