Commit ec9a6fbb authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Add an assert and remove a TODO (#7368)

The assert helped me debug an issue recently.

The TODO is obsolete.
parent 1c43c4e2
......@@ -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;
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment