浏览代码

fix debug.cs

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
d2d95dfe
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 10
      com.unity.uiwidgets/Runtime/widgets/debug.cs

10
com.unity.uiwidgets/Runtime/widgets/debug.cs


public static bool debugCheckHasMediaQuery(BuildContext context) {
D.assert(() => {
if (!(context.widget is MediaQuery) && context.ancestorWidgetOfExactType(typeof(MediaQuery)) == null) {
Element element = (Element) context;
if (!(context.widget is MediaQuery) && context.findAncestorWidgetOfExactType<MediaQuery>() == null) {
throw new UIWidgetsError(
"No MediaQuery widget found.\n" +
context.widget.GetType() + " widgets require a MediaQuery widget ancestor.\n" +

" " + element.debugGetCreatorChain(10) + "\n" +
" " + ((Element)context).debugGetCreatorChain(10) + "\n" +
"Typically, the MediaQuery widget is introduced by the MaterialApp or " +
"WidgetsApp widget at the top of your application widget tree."
);

public static bool debugCheckHasDirectionality(BuildContext context) {
D.assert(() => {
if (!(context.widget is Directionality) &&
context.ancestorWidgetOfExactType(typeof(Directionality)) == null) {
Element element = (Element) context;
context.findAncestorWidgetOfExactType<Directionality>() == null) {
throw new UIWidgetsError(
"No Directionality widget found.\n" +
context.widget.GetType() + " widgets require a Directionality widget ancestor.\n" +

" " + element.debugGetCreatorChain(10) + "\n" +
" " + ((Element) context).debugGetCreatorChain(10) + "\n" +
"Typically, the Directionality widget is introduced by the MaterialApp " +
"or WidgetsApp widget at the top of your application widget tree. It " +
"determines the ambient reading direction and is used, for example, to " +

正在加载...
取消
保存