浏览代码

fix alert

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
60a6fcdb
共有 2 个文件被更改,包括 23 次插入22 次删除
  1. 37
      com.unity.uiwidgets/Runtime/cupertino/dialog.cs
  2. 8
      com.unity.uiwidgets/Runtime/widgets/framework.cs

37
com.unity.uiwidgets/Runtime/cupertino/dialog.cs


content: content,
scrollController: scrollController
);
children.Add(new Flexible(flex: 3, child: titleSection));
children.Add(new Flexible
(
flex: 3,
child: titleSection));
}
return new Container(

public override Widget build(BuildContext context) {
CupertinoLocalizations localizations = CupertinoLocalizations.of(context);
bool isInAccessibilityMode = CupertinoDialogUtils._isInAccessibilityMode(context);
float textScaleFactor = MediaQuery.of(context).textScaleFactor;
return new CupertinoUserInterfaceLevel(
data: CupertinoUserInterfaceLevelData.elevatedlayer,

removeBottom: true,
context: _context,
child: new Center(
child: new Container(
margin: EdgeInsets.symmetric(vertical: CupertinoDialogUtils._kEdgePadding),
width: isInAccessibilityMode
? CupertinoDialogUtils._kAccessibilityCupertinoDialogWidth
: CupertinoDialogUtils._kCupertinoDialogWidth,
child: new CupertinoPopupSurface(
isSurfacePainted: false,
child: new _CupertinoDialogRenderWidget(
contentSection: _buildContent(_context),
actionsSection: _buildActions()
child: new Container(
margin: EdgeInsets.symmetric(vertical: CupertinoDialogUtils._kEdgePadding),
width: isInAccessibilityMode
? CupertinoDialogUtils._kAccessibilityCupertinoDialogWidth
: CupertinoDialogUtils._kCupertinoDialogWidth,
child: new CupertinoPopupSurface(
isSurfacePainted: false,
child: new _CupertinoDialogRenderWidget(
contentSection: _buildContent(_context),
actionsSection: _buildActions()
)
)
)
)
);

protected override void insertChildRenderObject(RenderObject child, object slot) {
D.assert(slot != null);
switch (slot) {
switch ((_AlertDialogSections)slot) {
case _AlertDialogSections.contentSection:
renderObject.contentSection = child as RenderBox;
break;

}
}
protected override void moveChildRenderObject(RenderObject child, object slot) {
D.assert(false);
protected override void moveChildRenderObject(RenderObject child,object slot) {
//D.assert(false);
newWidget = (RenderObjectWidget) newWidget;
base.update(newWidget);
_contentElement = updateChild(_contentElement, widget.contentSection,
_AlertDialogSections.contentSection);

}
}
class _DialogActionButtonParentDataWidget : ParentDataWidget<_DialogActionButtonParentData> {
class _DialogActionButtonParentDataWidget : ParentDataWidget<_ActionButtonParentData> {
public _DialogActionButtonParentDataWidget(
Key key = null,
bool isPressed = false,

8
com.unity.uiwidgets/Runtime/widgets/framework.cs


D.assert(child != null);
D.assert(child._parent == this);
ElementVisitor visit = null;
visit = (element) => {
void visit(Element element) {
if (!(element is RenderObjectElement)) {
if (!(element is RenderObjectElement))
}
};
}
visit(child);
}

正在加载...
取消
保存