浏览代码

Merge pull request #74 from Unity-Technologies/zgh/cupertino/fix

Zgh/cupertino/fix
/siyaoH-1.17-PlatformMessage
GitHub 4 年前
当前提交
ffbf463a
共有 12 个文件被更改,包括 512 次插入42 次删除
  1. 8
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/cupertino/cupertino_navigation_demo.cs
  2. 1
      com.unity.uiwidgets/Runtime/painting/image_resolution.cs
  3. 5
      com.unity.uiwidgets/Runtime/rendering/list_wheel_viewport.cs
  4. 4
      com.unity.uiwidgets/Runtime/rendering/sliver_persistent_header.cs
  5. 2
      com.unity.uiwidgets/Runtime/services/text_input.cs
  6. 7
      com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.gen.cs
  7. 4
      com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.njk
  8. 3
      com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.gen.cs
  9. 5
      com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.njk
  10. 43
      com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.cs
  11. 232
      com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.mixin.gen.cs
  12. 240
      com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.mixin.njk

8
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/cupertino/cupertino_navigation_demo.cs


public readonly List<string> colorNameItems;
public override Widget build(BuildContext context) {
return new WillPopScope(
//onWillPop: () => { return Promise<bool>.Resolved(true); },
//onWillPop: this.onWillPop,

title: new Text("Profile")
)
}
),
tabBuilder: (BuildContext _context, int index) => {
D.assert(index >= 0 && index <= 2);

height: 44.0f,
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage(
"people/square/trevor"
image: new FileImage(
file:""
)
),
shape: BoxShape.circle

height: 44.0f,
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage(
image: new FileImage(
"people/square/sandra"
)
),

1
com.unity.uiwidgets/Runtime/painting/image_resolution.cs


public class AssetImage : AssetBundleImageProvider, IEquatable<AssetImage> {
public AssetImage(string assetName,
AssetBundle bundle = null) {
D.assert(false,() => "AssetImage is currently not supported, you can use FileImage instead");
D.assert(assetName != null);
this.assetName = assetName;
this.bundle = bundle;

5
com.unity.uiwidgets/Runtime/rendering/list_wheel_viewport.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

RenderBox after = null
) {
invokeLayoutCallback<BoxConstraints>((BoxConstraints constraints) => {
D.assert(this.constraints == this.constraints);
D.assert(constraints == this.constraints);
childManager.createChild(index, after: after);
});
}

D.assert(this.constraints == this.constraints);
D.assert(constraints == this.constraints);
childManager.removeChild(child);
});
}

4
com.unity.uiwidgets/Runtime/rendering/sliver_persistent_header.cs


bool _lastOverlapsContent = false;
public OverScrollHeaderStretchConfiguration stretchConfiguration;
protected void updateChild(float shrinkOffset, bool overlapsContent) {
protected virtual void updateChild(float shrinkOffset, bool overlapsContent) {
}
public override void markNeedsLayout() {

}
}
FloatingHeaderSnapConfiguration _snapConfiguration;
public FloatingHeaderSnapConfiguration _snapConfiguration;
protected virtual float updateGeometry() {
float stretchOffset = 0.0f;

2
com.unity.uiwidgets/Runtime/services/text_input.cs


string text = "",
TextSelection selection = null,
TextRange composing = null) {
selection = selection ?? TextSelection.collapsed(offset: -1);
D.assert(text != null);
D.assert(selection != null);
this.text = text;

7
com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.gen.cs


using System;
using Unity.UIWidgets.ui;
using UnityEngine;
namespace Unity.UIWidgets.foundation {
public class DiagnosticableTreeMixinChangeNotifier : ChangeNotifier, DiagnosticableTreeMixin {
protected DiagnosticableTreeMixinChangeNotifier() {

}
public virtual void debugFillProperties(DiagnosticPropertiesBuilder properties) { }
}
}

4
com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.njk


using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Unity.UIWidgets.foundation {
{% macro DiagnosticableTreeMixin(with) %}
{% set className = 'DiagnosticableTreeMixin' + with %}

3
com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.gen.cs


using System;
using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.widgets {
public class DirectionalFocusTraversalPolicyMixinFocusTraversalPolicy : FocusTraversalPolicy, DirectionalFocusTraversalPolicyMixin {
protected DirectionalFocusTraversalPolicyMixinFocusTraversalPolicy() {

5
com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.njk


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
namespace Unity.UIWidgets.widgets {
{% macro DirectionalFocusTraversalPolicyMixin(with) %}
{% set className = 'DirectionalFocusTraversalPolicyMixin' + with %}

43
com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.cs


using Unity.UIWidgets.rendering;
namespace Unity.UIWidgets.widgets {
static class sliver_persistent_header_utils {
public static _SliverPersistentHeaderElement _element { get; set; }
}
public abstract class SliverPersistentHeaderDelegate {
public SliverPersistentHeaderDelegate() {
}

}
}
class _SliverPersistentHeaderElement : RenderObjectElement {
public class _SliverPersistentHeaderElement : RenderObjectElement {
public _SliverPersistentHeaderElement(_SliverPersistentHeaderRenderObjectWidget widget) : base(widget) {
}

public override void mount(Element parent, object newSlot) {
base.mount(parent, newSlot);
(renderObject as _RenderSliverPersistentHeaderForWidgetsMixin)._element = this;
sliver_persistent_header_utils._element = this;
(renderObject as _RenderSliverPersistentHeaderForWidgetsMixin)._element = null;
sliver_persistent_header_utils._element = null;
}
public override void update(Widget _newWidget) {

}
}
abstract class _SliverPersistentHeaderRenderObjectWidget : RenderObjectWidget {
public abstract class _SliverPersistentHeaderRenderObjectWidget : RenderObjectWidget {
public _SliverPersistentHeaderRenderObjectWidget(
Key key = null,
SliverPersistentHeaderDelegate layoutDelegate = null

}
}
interface _RenderSliverPersistentHeaderForWidgetsMixin {
// on RenderSliverPersistentHeader ???? todo
_SliverPersistentHeaderElement _element { get; set; }
public interface _RenderSliverPersistentHeaderForWidgetsMixin {
float? minExtent {
get;
}
float? maxExtent {
get;
}
void updateChild(float shrinkOffset, bool overlapsContent);
void triggerRebuild();
}

abstract class _RenderSliverScrollingPersistentHeader : RenderSliverScrollingPersistentHeader {
}
class _RenderSliverScrollingPersistentHeaderForWidgets : RenderSliverScrollingPersistentHeader, _RenderSliverPersistentHeaderForWidgetsMixin {
class _RenderSliverScrollingPersistentHeaderForWidgets : _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverScrollingPersistentHeader {
public _RenderSliverScrollingPersistentHeaderForWidgets(
RenderBox child = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null

abstract class _RenderSliverPinnedPersistentHeader : RenderSliverPinnedPersistentHeader {
}
class _RenderSliverPinnedPersistentHeaderForWidgets : RenderSliverPinnedPersistentHeader,
_RenderSliverPersistentHeaderForWidgetsMixin {
class _RenderSliverPinnedPersistentHeaderForWidgets : _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverPinnedPersistentHeader {
public _RenderSliverPinnedPersistentHeaderForWidgets(
RenderBox child = null,

}
public _SliverPersistentHeaderElement _element {
get { return _ele; }
set { _ele = value; }
get { return sliver_persistent_header_utils._element; }
set { sliver_persistent_header_utils._element = value; }
}
_SliverPersistentHeaderElement _ele;

abstract class _RenderSliverFloatingPinnedPersistentHeader : RenderSliverFloatingPinnedPersistentHeader {
}
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets : RenderSliverFloatingPinnedPersistentHeader,
_RenderSliverPersistentHeaderForWidgetsMixin {
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets : _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPinnedPersistentHeader {
public _RenderSliverFloatingPinnedPersistentHeaderForWidgets(
RenderBox child = null,
FloatingHeaderSnapConfiguration snapConfiguration = null,

abstract class _RenderSliverFloatingPersistentHeader : RenderSliverFloatingPersistentHeader {
}
class _RenderSliverFloatingPersistentHeaderForWidgets : RenderSliverFloatingPersistentHeader,
_RenderSliverPersistentHeaderForWidgetsMixin {
class _RenderSliverFloatingPersistentHeaderForWidgets : _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPersistentHeader {
public _RenderSliverFloatingPersistentHeaderForWidgets(
RenderBox child = null,

232
com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.mixin.gen.cs


using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
namespace Unity.UIWidgets.widgets {
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPersistentHeader : RenderSliverFloatingPersistentHeader, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPersistentHeader(
RenderBox child = null,
FloatingHeaderSnapConfiguration snapConfiguration = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(
child: child,
stretchConfiguration: stretchConfiguration) {
_snapConfiguration = snapConfiguration;
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPinnedPersistentHeader : RenderSliverFloatingPinnedPersistentHeader, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPinnedPersistentHeader(
RenderBox child = null,
FloatingHeaderSnapConfiguration snapConfiguration = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
snapConfiguration: snapConfiguration,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverPinnedPersistentHeader : RenderSliverPinnedPersistentHeader, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverPinnedPersistentHeader(
RenderBox child = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverScrollingPersistentHeader : RenderSliverScrollingPersistentHeader, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverScrollingPersistentHeader(
RenderBox child = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
}

240
com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.mixin.njk


using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
namespace Unity.UIWidgets.widgets {
{% macro _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader(with) %}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader{{with}} : {{with}}, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPersistentHeader(
RenderBox child = null,
FloatingHeaderSnapConfiguration snapConfiguration = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(
child: child,
stretchConfiguration: stretchConfiguration) {
_snapConfiguration = snapConfiguration;
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
{% endmacro %}
{{ _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader('RenderSliverFloatingPersistentHeader') }}
{% macro _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader(with) %}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader{{with}} : {{with}}, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverFloatingPinnedPersistentHeader(
RenderBox child = null,
FloatingHeaderSnapConfiguration snapConfiguration = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
snapConfiguration: snapConfiguration,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
{% endmacro %}
{{ _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader('RenderSliverFloatingPinnedPersistentHeader') }}
{% macro _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader(with) %}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader{{with}} : {{with}}, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverPinnedPersistentHeader(
RenderBox child = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
{% endmacro %}
{{ _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader('RenderSliverPinnedPersistentHeader') }}
{% macro _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader(with) %}
public abstract class _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader{{with}} : {{with}}, _RenderSliverPersistentHeaderForWidgetsMixin {
public _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeaderRenderSliverScrollingPersistentHeader(
RenderBox child = null,
OverScrollHeaderStretchConfiguration stretchConfiguration = null
) : base(child: child,
stretchConfiguration: stretchConfiguration) {
}
public _SliverPersistentHeaderElement _element {
get {
return sliver_persistent_header_utils._element;
}
set {
if (value == sliver_persistent_header_utils._element) {
return;
}
sliver_persistent_header_utils._element = value;
}
}
public override float? minExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
public override float? maxExtent {
get {
return _element.widget.layoutDelegate.minExtent;
}
}
protected override void updateChild(float shrinkOffset, bool overlapsContent) {
D.assert(_element != null);
_element._build(shrinkOffset, overlapsContent);
}
void _RenderSliverPersistentHeaderForWidgetsMixin.triggerRebuild() {
triggerRebuild();
}
void triggerRebuild() {
markNeedsLayout();
}
protected override void performLayout() {
base.performLayout();
}
}
{% endmacro %}
{{ _RenderSliverPersistentHeaderForWidgetsMixinOnRenderSliverPersistentHeader('RenderSliverScrollingPersistentHeader') }}
}
正在加载...
取消
保存