mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #194 from abarth/fix_image_layout
Images don't appears in VariableHeightScrollables
This commit is contained in:
commit
3ced08ed52
@ -8,6 +8,8 @@ import 'package:sky/widgets/block_viewport.dart';
|
||||
import 'package:sky/widgets/scrollable.dart';
|
||||
import 'package:sky/widgets/widget.dart';
|
||||
|
||||
export 'package:sky/widgets/block_viewport.dart' show BlockViewportLayoutState;
|
||||
|
||||
class VariableHeightScrollable extends Scrollable {
|
||||
VariableHeightScrollable({
|
||||
String key,
|
||||
|
||||
@ -6,7 +6,6 @@ import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/base/debug.dart';
|
||||
import 'package:sky/base/hit_test.dart';
|
||||
import 'package:sky/mojo/activity.dart' as activity;
|
||||
import 'package:sky/rendering/box.dart';
|
||||
@ -600,17 +599,20 @@ int _inLayoutCallbackBuilder = 0;
|
||||
|
||||
class LayoutCallbackBuilderHandle { bool _active = true; }
|
||||
LayoutCallbackBuilderHandle enterLayoutCallbackBuilder() {
|
||||
if (!inDebugBuild)
|
||||
return null;
|
||||
_inLayoutCallbackBuilder += 1;
|
||||
assert(() {
|
||||
_inLayoutCallbackBuilder += 1;
|
||||
return true;
|
||||
});
|
||||
return new LayoutCallbackBuilderHandle();
|
||||
}
|
||||
void exitLayoutCallbackBuilder(LayoutCallbackBuilderHandle handle) {
|
||||
if (!inDebugBuild)
|
||||
return;
|
||||
assert(handle._active);
|
||||
handle._active = false;
|
||||
_inLayoutCallbackBuilder -= 1;
|
||||
assert(() {
|
||||
assert(handle._active);
|
||||
handle._active = false;
|
||||
_inLayoutCallbackBuilder -= 1;
|
||||
return true;
|
||||
});
|
||||
Widget._notifyMountStatusChanged();
|
||||
}
|
||||
|
||||
List<int> _debugFrameTimes = <int>[];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user