Add missing debug vars to debugAssertAllRenderVarsUnset (#91848)
This commit is contained in:
parent
ac745b3f75
commit
9570d353b3
@ -238,8 +238,12 @@ bool debugAssertAllRenderVarsUnset(String reason, { bool debugCheckIntrinsicSize
|
||||
debugPrintMarkNeedsPaintStacks ||
|
||||
debugPrintLayouts ||
|
||||
debugCheckIntrinsicSizes != debugCheckIntrinsicSizesOverride ||
|
||||
debugProfileLayoutsEnabled ||
|
||||
debugProfilePaintsEnabled ||
|
||||
debugOnProfilePaint != null) {
|
||||
debugOnProfilePaint != null ||
|
||||
debugDisableClipLayers ||
|
||||
debugDisablePhysicalShapeLayers ||
|
||||
debugDisableOpacityLayers) {
|
||||
throw FlutterError(reason);
|
||||
}
|
||||
return true;
|
||||
|
@ -234,4 +234,28 @@ void main() {
|
||||
expect(opacityLayer.offset, const Offset(40, 40));
|
||||
debugDisableOpacityLayers = false;
|
||||
});
|
||||
|
||||
test('debugAssertAllRenderVarsUnset warns when debugProfileLayoutsEnabled set', () {
|
||||
debugProfileLayoutsEnabled = true;
|
||||
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
|
||||
debugProfileLayoutsEnabled = false;
|
||||
});
|
||||
|
||||
test('debugAssertAllRenderVarsUnset warns when debugDisableClipLayers set', () {
|
||||
debugDisableClipLayers = true;
|
||||
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
|
||||
debugDisableClipLayers = false;
|
||||
});
|
||||
|
||||
test('debugAssertAllRenderVarsUnset warns when debugDisablePhysicalShapeLayers set', () {
|
||||
debugDisablePhysicalShapeLayers = true;
|
||||
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
|
||||
debugDisablePhysicalShapeLayers = false;
|
||||
});
|
||||
|
||||
test('debugAssertAllRenderVarsUnset warns when debugDisableOpacityLayers set', () {
|
||||
debugDisableOpacityLayers = true;
|
||||
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
|
||||
debugDisableOpacityLayers = false;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user