Yuncong Zhang
6 年前
当前提交
11206008
共有 18 个文件被更改,包括 2805 次插入 和 39 次删除
-
386Runtime/material/app_bar.cs
-
3Samples/UIWidgetsGallery/gallery/app.cs
-
16Samples/UIWidgetsGallery/gallery/demos.cs
-
14Samples/UIWidgetsGallery/gallery/home.cs
-
2Tests/Resources/ali_landscape.png.meta
-
395Runtime/rendering/sliver_persistent_header.cs
-
3Runtime/rendering/sliver_persistent_header.cs.meta
-
372Runtime/widgets/sliver_persistent_header.cs
-
3Runtime/widgets/sliver_persistent_header.cs.meta
-
365Samples/UIWidgetsGallery/demo/contacts_demo.cs
-
3Samples/UIWidgetsGallery/demo/contacts_demo.cs.meta
-
1001Tests/Resources/ali_landscape.png
-
55Tests/Resources/unity-black.png
-
88Tests/Resources/unity-black.png.meta
-
25Tests/Resources/unity-white.png
-
88Tests/Resources/unity-white.png.meta
-
25Tests/Resources/unity.png
-
0/Tests/Resources/ali_landscape.png.meta
|
|||
using System; |
|||
using Unity.UIWidgets.animation; |
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.gestures; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.scheduler; |
|||
using Unity.UIWidgets.ui; |
|||
using UnityEngine; |
|||
|
|||
namespace Unity.UIWidgets.rendering { |
|||
public abstract class RenderSliverPersistentHeader : RenderObjectWithChildMixinRenderSliver<RenderBox> { |
|||
public RenderSliverPersistentHeader(RenderBox child = null) { |
|||
this.child = child; |
|||
} |
|||
|
|||
public virtual float? maxExtent { get; } |
|||
|
|||
public virtual float? minExtent { get; } |
|||
|
|||
public float childExtent { |
|||
get { |
|||
if (this.child == null) { |
|||
return 0.0f; |
|||
} |
|||
|
|||
D.assert(this.child.hasSize); |
|||
D.assert(this.constraints.axis != null); |
|||
switch (this.constraints.axis) { |
|||
case Axis.vertical: |
|||
return this.child.size.height; |
|||
case Axis.horizontal: |
|||
return this.child.size.width; |
|||
default: |
|||
throw new Exception("Unknown axis: " + this.constraints.axis); |
|||
} |
|||
} |
|||
} |
|||
|
|||
bool _needsUpdateChild = true; |
|||
float _lastShrinkOffset = 0.0f; |
|||
bool _lastOverlapsContent = false; |
|||
|
|||
protected virtual void updateChild(float shrinkOffset, bool overlapsContent) { |
|||
} |
|||
|
|||
public override void markNeedsLayout() { |
|||
this._needsUpdateChild = true; |
|||
base.markNeedsLayout(); |
|||
} |
|||
|
|||
protected void layoutChild(float scrollOffset, float maxExtent, bool overlapsContent = false) { |
|||
D.assert(maxExtent != null); |
|||
float shrinkOffset = Mathf.Min(scrollOffset, maxExtent); |
|||
if (this._needsUpdateChild || this._lastShrinkOffset != shrinkOffset || |
|||
this._lastOverlapsContent != overlapsContent) { |
|||
this.invokeLayoutCallback<SliverConstraints>((SliverConstraints constraints) => { |
|||
D.assert(this.constraints == this.constraints); |
|||
this.updateChild(shrinkOffset, overlapsContent); |
|||
}); |
|||
this._lastShrinkOffset = shrinkOffset; |
|||
this._lastOverlapsContent = overlapsContent; |
|||
this._needsUpdateChild = false; |
|||
} |
|||
|
|||
D.assert(this.minExtent != null); |
|||
D.assert(() => { |
|||
if (this.minExtent <= maxExtent) { |
|||
return true; |
|||
} |
|||
|
|||
throw new UIWidgetsError( |
|||
"The maxExtent for this $runtimeType is less than its minExtent.\n" + |
|||
"The specified maxExtent was: ${maxExtent.toStringAsFixed(1)}\n" + |
|||
"The specified minExtent was: ${minExtent.toStringAsFixed(1)}\n" |
|||
); |
|||
}); |
|||
this.child?.layout( |
|||
this.constraints.asBoxConstraints( |
|||
maxExtent: Mathf.Max(this.minExtent ?? 0.0f, maxExtent - shrinkOffset)), |
|||
parentUsesSize: true |
|||
); |
|||
} |
|||
|
|||
public override float childMainAxisPosition(RenderObject child) { |
|||
return base.childMainAxisPosition(this.child); |
|||
} |
|||
|
|||
protected override bool hitTestChildren(HitTestResult result, float mainAxisPosition, float crossAxisPosition) { |
|||
D.assert(this.geometry.hitTestExtent > 0.0f); |
|||
if (this.child != null) { |
|||
return RenderSliverHelpers.hitTestBoxChild(this, result, this.child, mainAxisPosition: mainAxisPosition, |
|||
crossAxisPosition: crossAxisPosition); |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
public override void applyPaintTransform(RenderObject child, Matrix3 transform) { |
|||
D.assert(child != null); |
|||
D.assert(child == this.child); |
|||
RenderSliverHelpers.applyPaintTransformForBoxChild(this, this.child, transform); |
|||
} |
|||
|
|||
public override void paint(PaintingContext context, Offset offset) { |
|||
if (this.child != null && this.geometry.visible) { |
|||
D.assert(this.constraints.axisDirection != null); |
|||
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(this.constraints.axisDirection, |
|||
this.constraints.growthDirection)) { |
|||
case AxisDirection.up: |
|||
offset += new Offset(0.0f, |
|||
this.geometry.paintExtent - this.childMainAxisPosition(this.child) - this.childExtent); |
|||
break; |
|||
case AxisDirection.down: |
|||
offset += new Offset(0.0f, this.childMainAxisPosition(this.child)); |
|||
break; |
|||
case AxisDirection.left: |
|||
offset += new Offset( |
|||
this.geometry.paintExtent - this.childMainAxisPosition(this.child) - this.childExtent, |
|||
0.0f); |
|||
break; |
|||
case AxisDirection.right: |
|||
offset += new Offset(this.childMainAxisPosition(this.child), 0.0f); |
|||
break; |
|||
} |
|||
|
|||
context.paintChild(this.child, offset); |
|||
} |
|||
} |
|||
|
|||
protected bool excludeFromSemanticsScrolling { |
|||
get { return this._excludeFromSemanticsScrolling; } |
|||
set { |
|||
if (this._excludeFromSemanticsScrolling == value) { |
|||
return; |
|||
} |
|||
|
|||
this._excludeFromSemanticsScrolling = value; |
|||
} |
|||
} |
|||
|
|||
bool _excludeFromSemanticsScrolling = false; |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(FloatProperty.lazy("maxExtent", () => this.maxExtent)); |
|||
properties.add(FloatProperty.lazy("child position", () => this.childMainAxisPosition(this.child))); |
|||
} |
|||
} |
|||
|
|||
public abstract class RenderSliverScrollingPersistentHeader : RenderSliverPersistentHeader { |
|||
public RenderSliverScrollingPersistentHeader( |
|||
RenderBox child = null |
|||
) : base(child: child) { |
|||
} |
|||
|
|||
float _childPosition; |
|||
|
|||
protected override void performLayout() { |
|||
float? maxExtent = this.maxExtent; |
|||
this.layoutChild(this.constraints.scrollOffset, maxExtent ?? 0.0f); |
|||
float? paintExtent = maxExtent - this.constraints.scrollOffset; |
|||
this.geometry = new SliverGeometry( |
|||
scrollExtent: maxExtent ?? 0.0f, |
|||
paintOrigin: Mathf.Min(this.constraints.overlap, 0.0f), |
|||
paintExtent: paintExtent?.clamp(0.0f, this.constraints.remainingPaintExtent) ?? 0.0f, |
|||
maxPaintExtent: maxExtent ?? 0.0f, |
|||
hasVisualOverflow: true |
|||
); |
|||
this._childPosition = Mathf.Min(0.0f, paintExtent ?? 0.0f - this.childExtent); |
|||
} |
|||
|
|||
public override float childMainAxisPosition(RenderObject child) { |
|||
D.assert(child == this.child); |
|||
return this._childPosition; |
|||
} |
|||
} |
|||
|
|||
public abstract class RenderSliverPinnedPersistentHeader : RenderSliverPersistentHeader { |
|||
public RenderSliverPinnedPersistentHeader( |
|||
RenderBox child = null |
|||
) : base(child: child) { |
|||
} |
|||
|
|||
protected override void performLayout() { |
|||
float? maxExtent = this.maxExtent; |
|||
bool overlapsContent = this.constraints.overlap > 0.0f; |
|||
this.excludeFromSemanticsScrolling = |
|||
overlapsContent || (this.constraints.scrollOffset > maxExtent - this.minExtent); |
|||
this.layoutChild(this.constraints.scrollOffset, maxExtent ?? 0.0f, overlapsContent: overlapsContent); |
|||
float? layoutExtent = |
|||
(maxExtent - this.constraints.scrollOffset)?.clamp(0.0f, this.constraints.remainingPaintExtent); |
|||
this.geometry = new SliverGeometry( |
|||
scrollExtent: maxExtent ?? 0.0f, |
|||
paintOrigin: this.constraints.overlap, |
|||
paintExtent: Mathf.Min(this.childExtent, this.constraints.remainingPaintExtent), |
|||
layoutExtent: layoutExtent, |
|||
maxPaintExtent: maxExtent ?? 0.0f, |
|||
maxScrollObstructionExtent: this.minExtent ?? 0.0f, |
|||
cacheExtent: layoutExtent > 0.0f ? -this.constraints.cacheOrigin + layoutExtent : layoutExtent, |
|||
hasVisualOverflow: true |
|||
); |
|||
} |
|||
|
|||
public override float childMainAxisPosition(RenderObject child) { |
|||
return 0.0f; |
|||
} |
|||
} |
|||
|
|||
public class FloatingHeaderSnapConfiguration { |
|||
public FloatingHeaderSnapConfiguration( |
|||
TickerProvider vsync, |
|||
Curve curve = null, |
|||
TimeSpan? duration = null |
|||
) { |
|||
D.assert(this.vsync != null); |
|||
this.vsync = vsync; |
|||
this.curve = curve ?? Curves.ease; |
|||
this.duration = duration ?? new TimeSpan(0, 0, 0, 0, 300); |
|||
} |
|||
|
|||
public readonly TickerProvider vsync; |
|||
|
|||
public readonly Curve curve; |
|||
|
|||
public readonly TimeSpan duration; |
|||
} |
|||
|
|||
|
|||
public abstract class RenderSliverFloatingPersistentHeader : RenderSliverPersistentHeader { |
|||
public RenderSliverFloatingPersistentHeader( |
|||
RenderBox child = null, |
|||
FloatingHeaderSnapConfiguration snapConfiguration = null |
|||
) : base(child: child) { |
|||
this._snapConfiguration = snapConfiguration; |
|||
} |
|||
|
|||
AnimationController _controller; |
|||
Animation<float> _animation; |
|||
protected float _lastActualScrollOffset; |
|||
protected float _effectiveScrollOffset; |
|||
|
|||
float _childPosition; |
|||
|
|||
public override void detach() { |
|||
this._controller?.dispose(); |
|||
this._controller = null; |
|||
base.detach(); |
|||
} |
|||
|
|||
public FloatingHeaderSnapConfiguration snapConfiguration { |
|||
get { return this._snapConfiguration; } |
|||
set { |
|||
if (value == this._snapConfiguration) { |
|||
return; |
|||
} |
|||
|
|||
if (value == null) { |
|||
this._controller?.dispose(); |
|||
} |
|||
else { |
|||
if (this._snapConfiguration != null && value.vsync != this._snapConfiguration.vsync) { |
|||
this._controller?.resync(value.vsync); |
|||
} |
|||
} |
|||
|
|||
this._snapConfiguration = value; |
|||
} |
|||
} |
|||
|
|||
FloatingHeaderSnapConfiguration _snapConfiguration; |
|||
|
|||
protected virtual float updateGeometry() { |
|||
float? maxExtent = this.maxExtent; |
|||
float? paintExtent = maxExtent - this._effectiveScrollOffset; |
|||
float? layoutExtent = maxExtent - this.constraints.scrollOffset; |
|||
this.geometry = new SliverGeometry( |
|||
scrollExtent: maxExtent ?? 0.0f, |
|||
paintOrigin: Mathf.Min(this.constraints.overlap, 0.0f), |
|||
paintExtent: paintExtent?.clamp(0.0f, this.constraints.remainingPaintExtent) ?? 0.0f, |
|||
layoutExtent: layoutExtent?.clamp(0.0f, this.constraints.remainingPaintExtent), |
|||
maxPaintExtent: maxExtent ?? 0.0f, |
|||
maxScrollObstructionExtent: maxExtent ?? 0.0f, |
|||
hasVisualOverflow: true |
|||
); |
|||
return Mathf.Min(0.0f, paintExtent ?? 0.0f - this.childExtent); |
|||
} |
|||
|
|||
public void maybeStartSnapAnimation(ScrollDirection direction) { |
|||
if (this.snapConfiguration == null) { |
|||
return; |
|||
} |
|||
|
|||
if (direction == ScrollDirection.forward && this._effectiveScrollOffset <= 0.0f) { |
|||
return; |
|||
} |
|||
|
|||
if (direction == ScrollDirection.reverse && this._effectiveScrollOffset >= this.maxExtent) { |
|||
return; |
|||
} |
|||
|
|||
TickerProvider vsync = this.snapConfiguration.vsync; |
|||
TimeSpan duration = this.snapConfiguration.duration; |
|||
this._controller = this._controller ?? new AnimationController(vsync: vsync, duration: duration); |
|||
this._controller.addListener(() => { |
|||
if (this._effectiveScrollOffset == this._animation.value) { |
|||
return; |
|||
} |
|||
|
|||
this._effectiveScrollOffset = this._animation.value; |
|||
this.markNeedsLayout(); |
|||
}); |
|||
|
|||
this._animation = this._controller.drive( |
|||
new FloatTween( |
|||
begin: this._effectiveScrollOffset, |
|||
end: direction == ScrollDirection.forward ? 0.0f : this.maxExtent ?? 0.0f |
|||
).chain(new CurveTween( |
|||
curve: this.snapConfiguration.curve |
|||
)) |
|||
); |
|||
|
|||
this._controller.forward(from: 0.0f); |
|||
} |
|||
|
|||
public void maybeStopSnapAnimation(ScrollDirection direction) { |
|||
this._controller?.stop(); |
|||
} |
|||
|
|||
protected override void performLayout() { |
|||
float? maxExtent = this.maxExtent; |
|||
if (this._lastActualScrollOffset != null && |
|||
((this.constraints.scrollOffset < this._lastActualScrollOffset) || |
|||
(this._effectiveScrollOffset < maxExtent))) { |
|||
float delta = this._lastActualScrollOffset - this.constraints.scrollOffset; |
|||
bool allowFloatingExpansion = this.constraints.userScrollDirection == ScrollDirection.forward; |
|||
if (allowFloatingExpansion) { |
|||
if (this._effectiveScrollOffset > maxExtent) { |
|||
this._effectiveScrollOffset = maxExtent ?? 0.0f; |
|||
} |
|||
} |
|||
else { |
|||
if (delta > 0.0f) { |
|||
delta = 0.0f; |
|||
} |
|||
} |
|||
|
|||
this._effectiveScrollOffset = |
|||
(this._effectiveScrollOffset - delta).clamp(0.0f, this.constraints.scrollOffset); |
|||
} |
|||
else { |
|||
this._effectiveScrollOffset = this.constraints.scrollOffset; |
|||
} |
|||
|
|||
bool overlapsContent = this._effectiveScrollOffset < this.constraints.scrollOffset; |
|||
this.excludeFromSemanticsScrolling = overlapsContent; |
|||
this.layoutChild(this._effectiveScrollOffset, maxExtent ?? 0.0f, overlapsContent: overlapsContent); |
|||
this._childPosition = this.updateGeometry(); |
|||
this._lastActualScrollOffset = this.constraints.scrollOffset; |
|||
} |
|||
|
|||
public override float childMainAxisPosition(RenderObject child) { |
|||
D.assert(child == this.child); |
|||
return this._childPosition; |
|||
} |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(new FloatProperty("effective scroll offset", this._effectiveScrollOffset)); |
|||
} |
|||
} |
|||
|
|||
public abstract class RenderSliverFloatingPinnedPersistentHeader : RenderSliverFloatingPersistentHeader { |
|||
public RenderSliverFloatingPinnedPersistentHeader( |
|||
RenderBox child = null, |
|||
FloatingHeaderSnapConfiguration snapConfiguration = null |
|||
) : base(child: child, snapConfiguration: snapConfiguration) { |
|||
} |
|||
|
|||
protected override float updateGeometry() { |
|||
float? minExtent = this.minExtent; |
|||
float? maxExtent = this.maxExtent; |
|||
float? paintExtent = maxExtent - this._effectiveScrollOffset; |
|||
float? layoutExtent = maxExtent - this.constraints.scrollOffset; |
|||
this.geometry = new SliverGeometry( |
|||
scrollExtent: maxExtent ?? 0.0f, |
|||
paintExtent: paintExtent?.clamp(minExtent ?? 0.0f, this.constraints.remainingPaintExtent) ?? 0.0f, |
|||
layoutExtent: layoutExtent?.clamp(0.0f, this.constraints.remainingPaintExtent - minExtent ?? 0.0f), |
|||
maxPaintExtent: maxExtent ?? 0.0f, |
|||
maxScrollObstructionExtent: maxExtent ?? 0.0f, |
|||
hasVisualOverflow: true |
|||
); |
|||
return 0.0f; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8bf4842a43ca4b13ae8d333813e166c9 |
|||
timeCreated: 1553064435 |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.rendering; |
|||
|
|||
namespace Unity.UIWidgets.widgets { |
|||
public abstract class SliverPersistentHeaderDelegate { |
|||
public SliverPersistentHeaderDelegate() { |
|||
} |
|||
|
|||
public abstract Widget build(BuildContext context, float shrinkOffset, bool overlapsContent); |
|||
|
|||
public abstract float? minExtent { get; } |
|||
|
|||
public abstract float? maxExtent { get; } |
|||
|
|||
public virtual FloatingHeaderSnapConfiguration snapConfiguration { |
|||
get { return null; } |
|||
} |
|||
|
|||
public abstract bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate); |
|||
} |
|||
|
|||
public class SliverPersistentHeader : StatelessWidget { |
|||
public SliverPersistentHeader( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null, |
|||
bool pinned = false, |
|||
bool floating = false |
|||
) : base(key: key) { |
|||
D.assert(del != null); |
|||
D.assert(pinned != null); |
|||
D.assert(floating != null); |
|||
this.del = del; |
|||
this.pinned = pinned; |
|||
this.floating = floating; |
|||
} |
|||
|
|||
public readonly SliverPersistentHeaderDelegate del; |
|||
|
|||
public readonly bool pinned; |
|||
|
|||
public readonly bool floating; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
if (this.floating && this.pinned) { |
|||
return new _SliverFloatingPinnedPersistentHeader(del: this.del); |
|||
} |
|||
|
|||
if (this.pinned) { |
|||
return new _SliverPinnedPersistentHeader(del: this.del); |
|||
} |
|||
|
|||
if (this.floating) { |
|||
return new _SliverFloatingPersistentHeader(del: this.del); |
|||
} |
|||
|
|||
return new _SliverScrollingPersistentHeader(del: this.del); |
|||
} |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(new DiagnosticsProperty<SliverPersistentHeaderDelegate>("del", this.del)); |
|||
List<string> flags = new List<string> { }; |
|||
if (this.pinned) { |
|||
flags.Add("pinned"); |
|||
} |
|||
|
|||
if (this.floating) { |
|||
flags.Add("floating"); |
|||
} |
|||
|
|||
if (flags.isEmpty()) { |
|||
flags.Add("normal"); |
|||
} |
|||
|
|||
properties.add(new EnumerableProperty<string>("mode", flags)); |
|||
} |
|||
} |
|||
|
|||
class _SliverPersistentHeaderElement : RenderObjectElement { |
|||
public _SliverPersistentHeaderElement(_SliverPersistentHeaderRenderObjectWidget widget) : base(widget) { |
|||
} |
|||
|
|||
public _SliverPersistentHeaderRenderObjectWidget widget { |
|||
get { return (_SliverPersistentHeaderRenderObjectWidget) base.widget; } |
|||
} |
|||
|
|||
public override RenderObject renderObject { |
|||
get { return base.renderObject; } |
|||
} |
|||
|
|||
public override void mount(Element parent, object newSlot) { |
|||
base.mount(parent, newSlot); |
|||
(this.renderObject as _RenderSliverPersistentHeaderForWidgetsMixin)._element = this; |
|||
} |
|||
|
|||
public override void unmount() { |
|||
base.unmount(); |
|||
(this.renderObject as _RenderSliverPersistentHeaderForWidgetsMixin)._element = null; |
|||
} |
|||
|
|||
public override void update(Widget _newWidget) { |
|||
base.update(_newWidget); |
|||
_SliverPersistentHeaderRenderObjectWidget newWidget = |
|||
_newWidget as _SliverPersistentHeaderRenderObjectWidget; |
|||
_SliverPersistentHeaderRenderObjectWidget oldWidget = this.widget; |
|||
SliverPersistentHeaderDelegate newDelegate = newWidget.del; |
|||
SliverPersistentHeaderDelegate oldDelegate = oldWidget.del; |
|||
if (newDelegate != oldDelegate && |
|||
(newDelegate.GetType() != oldDelegate.GetType() || newDelegate.shouldRebuild(oldDelegate))) { |
|||
(this.renderObject as _RenderSliverPersistentHeaderForWidgetsMixin).triggerRebuild(); |
|||
} |
|||
} |
|||
|
|||
protected override void performRebuild() { |
|||
base.performRebuild(); |
|||
(this.renderObject as _RenderSliverPersistentHeaderForWidgetsMixin).triggerRebuild(); |
|||
} |
|||
|
|||
Element child; |
|||
|
|||
public void _build(float shrinkOffset, bool overlapsContent) { |
|||
this.owner.buildScope(this, |
|||
() => { |
|||
this.child = this.updateChild(this.child, |
|||
this.widget.del.build(this, shrinkOffset, overlapsContent), null); |
|||
}); |
|||
} |
|||
|
|||
protected override void forgetChild(Element child) { |
|||
D.assert(child == this.child); |
|||
this.child = null; |
|||
} |
|||
|
|||
protected override void insertChildRenderObject(RenderObject child, object slot) { |
|||
D.assert((bool) (this.renderObject as RenderSliverPersistentHeader).debugValidateChild(child)); |
|||
(this.renderObject as RenderSliverPersistentHeader).child = (RenderBox) child; |
|||
} |
|||
|
|||
protected override void moveChildRenderObject(RenderObject child, object slot) { |
|||
D.assert(false); |
|||
} |
|||
|
|||
protected override void removeChildRenderObject(RenderObject child) { |
|||
(this.renderObject as RenderSliverPersistentHeader).child = null; |
|||
} |
|||
|
|||
public override void visitChildren(ElementVisitor visitor) { |
|||
if (this.child != null) { |
|||
visitor(this.child); |
|||
} |
|||
} |
|||
} |
|||
|
|||
abstract class _SliverPersistentHeaderRenderObjectWidget : RenderObjectWidget { |
|||
public _SliverPersistentHeaderRenderObjectWidget( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null |
|||
) : base(key: key) { |
|||
D.assert(del != null); |
|||
this.del = del; |
|||
} |
|||
|
|||
public readonly SliverPersistentHeaderDelegate del; |
|||
|
|||
public override Element createElement() { |
|||
return new _SliverPersistentHeaderElement(this); |
|||
} |
|||
|
|||
public abstract override RenderObject createRenderObject(BuildContext context); |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder description) { |
|||
base.debugFillProperties(description); |
|||
description.add(new DiagnosticsProperty<SliverPersistentHeaderDelegate>("del", this.del)); |
|||
} |
|||
} |
|||
|
|||
interface _RenderSliverPersistentHeaderForWidgetsMixin { |
|||
_SliverPersistentHeaderElement _element { get; set; } |
|||
|
|||
float? minExtent { get; } |
|||
|
|||
float? maxExtent { get; } |
|||
|
|||
void triggerRebuild(); |
|||
} |
|||
|
|||
class _SliverScrollingPersistentHeader : _SliverPersistentHeaderRenderObjectWidget { |
|||
public _SliverScrollingPersistentHeader( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null |
|||
) : base(key: key, del: del) { |
|||
} |
|||
|
|||
public override RenderObject createRenderObject(BuildContext context) { |
|||
return new _RenderSliverScrollingPersistentHeaderForWidgets(); |
|||
} |
|||
} |
|||
|
|||
abstract class _RenderSliverScrollingPersistentHeader : RenderSliverScrollingPersistentHeader { |
|||
} |
|||
|
|||
class _RenderSliverScrollingPersistentHeaderForWidgets : _RenderSliverScrollingPersistentHeader, |
|||
_RenderSliverPersistentHeaderForWidgetsMixin { |
|||
public _SliverPersistentHeaderElement _element { |
|||
get { return this._ele; } |
|||
set { this._ele = value; } |
|||
} |
|||
|
|||
_SliverPersistentHeaderElement _ele; |
|||
|
|||
public override float? minExtent { |
|||
get { return this._element.widget.del.minExtent; } |
|||
} |
|||
|
|||
public override float? maxExtent { |
|||
get { return this._element.widget.del.maxExtent; } |
|||
} |
|||
|
|||
protected override void updateChild(float shrinkOffset, bool overlapsContent) { |
|||
D.assert(this._element != null); |
|||
this._element._build(shrinkOffset, overlapsContent); |
|||
} |
|||
|
|||
public void triggerRebuild() { |
|||
this.markNeedsLayout(); |
|||
} |
|||
} |
|||
|
|||
class _SliverPinnedPersistentHeader : _SliverPersistentHeaderRenderObjectWidget { |
|||
public _SliverPinnedPersistentHeader( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null |
|||
) : base(key: key, del: del) { |
|||
} |
|||
|
|||
public override RenderObject createRenderObject(BuildContext context) { |
|||
return new _RenderSliverPinnedPersistentHeaderForWidgets(); |
|||
} |
|||
} |
|||
|
|||
abstract class _RenderSliverPinnedPersistentHeader : RenderSliverPinnedPersistentHeader { |
|||
} |
|||
|
|||
class _RenderSliverPinnedPersistentHeaderForWidgets : _RenderSliverPinnedPersistentHeader, |
|||
_RenderSliverPersistentHeaderForWidgetsMixin { |
|||
public _SliverPersistentHeaderElement _element { |
|||
get { return this._ele; } |
|||
set { this._ele = value; } |
|||
} |
|||
|
|||
_SliverPersistentHeaderElement _ele; |
|||
|
|||
public override float? minExtent { |
|||
get { return this._element.widget.del.minExtent; } |
|||
} |
|||
|
|||
public override float? maxExtent { |
|||
get { return this._element.widget.del.maxExtent; } |
|||
} |
|||
|
|||
protected override void updateChild(float shrinkOffset, bool overlapsContent) { |
|||
D.assert(this._element != null); |
|||
this._element._build(shrinkOffset, overlapsContent); |
|||
} |
|||
|
|||
public void triggerRebuild() { |
|||
this.markNeedsLayout(); |
|||
} |
|||
} |
|||
|
|||
class _SliverFloatingPersistentHeader : _SliverPersistentHeaderRenderObjectWidget { |
|||
public _SliverFloatingPersistentHeader( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null |
|||
) : base(key: key, del: del) { |
|||
} |
|||
|
|||
public override RenderObject createRenderObject(BuildContext context) { |
|||
_RenderSliverFloatingPersistentHeaderForWidgets ret = new _RenderSliverFloatingPersistentHeaderForWidgets(); |
|||
ret.snapConfiguration = this.del.snapConfiguration; |
|||
return ret; |
|||
} |
|||
|
|||
public override void updateRenderObject(BuildContext context, RenderObject _renderObject) { |
|||
_RenderSliverFloatingPersistentHeaderForWidgets renderObject = |
|||
_renderObject as _RenderSliverFloatingPersistentHeaderForWidgets; |
|||
renderObject.snapConfiguration = this.del.snapConfiguration; |
|||
} |
|||
} |
|||
|
|||
abstract class _RenderSliverFloatingPinnedPersistentHeader : RenderSliverFloatingPinnedPersistentHeader { |
|||
} |
|||
|
|||
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets : _RenderSliverFloatingPinnedPersistentHeader, |
|||
_RenderSliverPersistentHeaderForWidgetsMixin { |
|||
public _SliverPersistentHeaderElement _element { |
|||
get { return this._ele; } |
|||
set { this._ele = value; } |
|||
} |
|||
|
|||
_SliverPersistentHeaderElement _ele; |
|||
|
|||
public override float? minExtent { |
|||
get { return this._element.widget.del.minExtent; } |
|||
} |
|||
|
|||
public override float? maxExtent { |
|||
get { return this._element.widget.del.maxExtent; } |
|||
} |
|||
|
|||
protected override void updateChild(float shrinkOffset, bool overlapsContent) { |
|||
D.assert(this._element != null); |
|||
this._element._build(shrinkOffset, overlapsContent); |
|||
} |
|||
|
|||
public void triggerRebuild() { |
|||
this.markNeedsLayout(); |
|||
} |
|||
} |
|||
|
|||
class _SliverFloatingPinnedPersistentHeader : _SliverPersistentHeaderRenderObjectWidget { |
|||
public _SliverFloatingPinnedPersistentHeader( |
|||
Key key = null, |
|||
SliverPersistentHeaderDelegate del = null |
|||
) : base(key: key, del: del) { |
|||
} |
|||
|
|||
public override RenderObject createRenderObject(BuildContext context) { |
|||
_RenderSliverFloatingPinnedPersistentHeaderForWidgets ret = |
|||
new _RenderSliverFloatingPinnedPersistentHeaderForWidgets(); |
|||
ret.snapConfiguration = this.del.snapConfiguration; |
|||
return ret; |
|||
} |
|||
|
|||
public override void updateRenderObject(BuildContext context, RenderObject _renderObject) { |
|||
_RenderSliverFloatingPinnedPersistentHeaderForWidgets renderObject = |
|||
_renderObject as _RenderSliverFloatingPinnedPersistentHeaderForWidgets; |
|||
renderObject.snapConfiguration = this.del.snapConfiguration; |
|||
} |
|||
} |
|||
|
|||
abstract class _RenderSliverFloatingPersistentHeader : RenderSliverFloatingPersistentHeader { |
|||
} |
|||
|
|||
class _RenderSliverFloatingPersistentHeaderForWidgets : _RenderSliverFloatingPersistentHeader, |
|||
_RenderSliverPersistentHeaderForWidgetsMixin { |
|||
public _SliverPersistentHeaderElement _element { |
|||
get { return this._ele; } |
|||
set { this._ele = value; } |
|||
} |
|||
|
|||
_SliverPersistentHeaderElement _ele; |
|||
|
|||
public override float? minExtent { |
|||
get { return this._element.widget.del.minExtent; } |
|||
} |
|||
|
|||
public override float? maxExtent { |
|||
get { return this._element.widget.del.maxExtent; } |
|||
} |
|||
|
|||
protected override void updateChild(float shrinkOffset, bool overlapsContent) { |
|||
D.assert(this._element != null); |
|||
this._element._build(shrinkOffset, overlapsContent); |
|||
} |
|||
|
|||
public void triggerRebuild() { |
|||
this.markNeedsLayout(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1e795962fe2d4c3291bbbe4bb1146a80 |
|||
timeCreated: 1553067038 |
|
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.material; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.rendering; |
|||
using Unity.UIWidgets.service; |
|||
using Unity.UIWidgets.ui; |
|||
using Unity.UIWidgets.widgets; |
|||
using Image = Unity.UIWidgets.widgets.Image; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
class _ContactCategory : StatelessWidget { |
|||
public _ContactCategory(Key key = null, IconData icon = null, List<Widget> children = null) : base(key: key) { |
|||
this.icon = icon; |
|||
this.children = children; |
|||
} |
|||
|
|||
public readonly IconData icon; |
|||
public readonly List<Widget> children; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
ThemeData themeData = Theme.of(context); |
|||
return new Container( |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f), |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(color: themeData.dividerColor)) |
|||
), |
|||
child: new DefaultTextStyle( |
|||
style: Theme.of(context).textTheme.subhead, |
|||
child: new SafeArea( |
|||
top: false, |
|||
bottom: false, |
|||
child: new Row( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
children: new List<Widget> { |
|||
new Container( |
|||
padding: EdgeInsets.symmetric(vertical: 24.0f), |
|||
width: 72.0f, |
|||
child: new Icon(this.icon, color: themeData.primaryColor) |
|||
), |
|||
new Expanded(child: new Column(children: this.children)) |
|||
} |
|||
) |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
|
|||
class _ContactItem : StatelessWidget { |
|||
public _ContactItem(Key key = null, IconData icon = null, List<string> lines = null, string tooltip = null, |
|||
VoidCallback onPressed = null) : base(key: key) { |
|||
D.assert(lines.Count > 1); |
|||
this.icon = icon; |
|||
this.lines = lines; |
|||
this.tooltip = tooltip; |
|||
this.onPressed = onPressed; |
|||
} |
|||
|
|||
public readonly IconData icon; |
|||
public readonly List<string> lines; |
|||
public readonly string tooltip; |
|||
public readonly VoidCallback onPressed; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
ThemeData themeData = Theme.of(context); |
|||
List<Widget> columnChildren = this.lines.GetRange(0, this.lines.Count - 1) |
|||
.Select<string, Widget>((string line) => new Text(line)).ToList(); |
|||
columnChildren.Add(new Text(this.lines.Last(), style: themeData.textTheme.caption)); |
|||
|
|||
List<Widget> rowChildren = new List<Widget> { |
|||
new Expanded( |
|||
child: new Column( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
children: columnChildren |
|||
) |
|||
) |
|||
}; |
|||
if (this.icon != null) { |
|||
rowChildren.Add(new SizedBox( |
|||
width: 72.0f, |
|||
child: new IconButton( |
|||
icon: new Icon(this.icon), |
|||
color: themeData.primaryColor, |
|||
onPressed: this.onPressed |
|||
) |
|||
)); |
|||
} |
|||
|
|||
return new Padding( |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f), |
|||
child: new Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: rowChildren |
|||
) |
|||
); |
|||
} |
|||
} |
|||
|
|||
public class ContactsDemo : StatefulWidget { |
|||
public const string routeName = "/contacts"; |
|||
|
|||
public override State createState() { |
|||
return new ContactsDemoState(); |
|||
} |
|||
} |
|||
|
|||
public enum AppBarBehavior { |
|||
normal, |
|||
pinned, |
|||
floating, |
|||
snapping |
|||
} |
|||
|
|||
public class ContactsDemoState : State<ContactsDemo> { |
|||
readonly GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>.key(); |
|||
const float _appBarHeight = 256.0f; |
|||
|
|||
AppBarBehavior _appBarBehavior = AppBarBehavior.pinned; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new Theme( |
|||
data: new ThemeData( |
|||
brightness: Brightness.light, |
|||
primarySwatch: Colors.indigo, |
|||
platform: Theme.of(context).platform |
|||
), |
|||
child: new Scaffold( |
|||
key: this._scaffoldKey, |
|||
body: new CustomScrollView( |
|||
slivers: new List<Widget> { |
|||
new SliverAppBar( |
|||
expandedHeight: _appBarHeight, |
|||
pinned: this._appBarBehavior == AppBarBehavior.pinned, |
|||
floating: this._appBarBehavior == AppBarBehavior.floating || |
|||
this._appBarBehavior == AppBarBehavior.snapping, |
|||
snap: this._appBarBehavior == AppBarBehavior.snapping, |
|||
actions: new List<Widget> { |
|||
new IconButton( |
|||
icon: new Icon(Icons.create), |
|||
tooltip: "Edit", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text("Editing isn't supported in this screen.") |
|||
)); |
|||
} |
|||
), |
|||
new PopupMenuButton<AppBarBehavior>( |
|||
onSelected: (AppBarBehavior value) => { |
|||
this.setState(() => { this._appBarBehavior = value; }); |
|||
}, |
|||
itemBuilder: (BuildContext _context) => new List<PopupMenuEntry<AppBarBehavior>> { |
|||
new PopupMenuItem<AppBarBehavior>( |
|||
value: AppBarBehavior.normal, |
|||
child: new Text("App bar scrolls away") |
|||
), |
|||
new PopupMenuItem<AppBarBehavior>( |
|||
value: AppBarBehavior.pinned, |
|||
child: new Text("App bar stays put") |
|||
), |
|||
new PopupMenuItem<AppBarBehavior>( |
|||
value: AppBarBehavior.floating, |
|||
child: new Text("App bar floats") |
|||
), |
|||
new PopupMenuItem<AppBarBehavior>( |
|||
value: AppBarBehavior.snapping, |
|||
child: new Text("App bar snaps") |
|||
) |
|||
} |
|||
) |
|||
}, |
|||
flexibleSpace: new FlexibleSpaceBar( |
|||
title: new Text("Ali Connors"), |
|||
background: new Stack( |
|||
fit: StackFit.expand, |
|||
children: new List<Widget> { |
|||
Image.asset( |
|||
"ali_landscape.png", |
|||
fit: BoxFit.cover, |
|||
height: _appBarHeight |
|||
), |
|||
new DecoratedBox( |
|||
decoration: new BoxDecoration( |
|||
gradient: new LinearGradient( |
|||
begin: new Alignment(0.0f, -1.0f), |
|||
end: new Alignment(0.0f, -0.4f), |
|||
colors: new List<Color> |
|||
{new Color(0x60000000), new Color(0x00000000)} |
|||
) |
|||
) |
|||
) |
|||
} |
|||
) |
|||
) |
|||
), |
|||
new SliverList( |
|||
del: new SliverChildListDelegate(new List<Widget> { |
|||
new AnnotatedRegion<SystemUiOverlayStyle>( |
|||
value: SystemUiOverlayStyle.dark, |
|||
child: new _ContactCategory( |
|||
icon: Icons.call, |
|||
children: new List<Widget> { |
|||
new _ContactItem( |
|||
icon: Icons.message, |
|||
tooltip: "Send message", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text( |
|||
"Pretend that this opened your SMS application.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"(650) 555-1234", |
|||
"Mobile" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
icon: Icons.message, |
|||
tooltip: "Send message", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text("A messaging app appears.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"(323) 555-6789", |
|||
"Work" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
icon: Icons.message, |
|||
tooltip: "Send message", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text( |
|||
"Imagine if you will, a messaging application.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"(650) 555-6789", |
|||
"Home" |
|||
} |
|||
) |
|||
} |
|||
) |
|||
), |
|||
new _ContactCategory( |
|||
icon: Icons.contact_mail, |
|||
children: new List<Widget> { |
|||
new _ContactItem( |
|||
icon: Icons.email, |
|||
tooltip: "Send personal e-mail", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text("Here, your e-mail application would open.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"ali_connors@example.com", |
|||
"Personal" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
icon: Icons.email, |
|||
tooltip: "Send work e-mail", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text( |
|||
"Summon your favorite e-mail application here.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"aliconnors@example.com", |
|||
"Work" |
|||
} |
|||
) |
|||
} |
|||
), |
|||
new _ContactCategory( |
|||
icon: Icons.location_on, |
|||
children: new List<Widget> { |
|||
new _ContactItem( |
|||
icon: Icons.map, |
|||
tooltip: "Open map", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text("This would show a map of San Francisco.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"2000 Main Street", |
|||
"San Francisco, CA", |
|||
"Home" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
icon: Icons.map, |
|||
tooltip: "Open map", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text("This would show a map of Mountain View.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"1600 Amphitheater Parkway", |
|||
"Mountain View, CA", |
|||
"Work" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
icon: Icons.map, |
|||
tooltip: "Open map", |
|||
onPressed: () => { |
|||
this._scaffoldKey.currentState.showSnackBar(new SnackBar( |
|||
content: new Text( |
|||
"This would also show a map, if this was not a demo.") |
|||
)); |
|||
}, |
|||
lines: new List<string> { |
|||
"126 Severyns Ave", |
|||
"Mountain View, CA", |
|||
"Jet Travel", |
|||
} |
|||
) |
|||
} |
|||
), |
|||
new _ContactCategory( |
|||
icon: Icons.today, |
|||
children: new List<Widget> { |
|||
new _ContactItem( |
|||
lines: new List<string> { |
|||
"Birthday", |
|||
"January 9th, 1989" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
lines: new List<string> { |
|||
"Wedding anniversary", |
|||
"June 21st, 2014" |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
lines: new List<string> { |
|||
"First day in office", |
|||
"January 20th, 2015", |
|||
} |
|||
), |
|||
new _ContactItem( |
|||
lines: new List<string> { |
|||
"Last day in office", |
|||
"August 9th, 2018" |
|||
} |
|||
) |
|||
} |
|||
) |
|||
}) |
|||
) |
|||
} |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 42aac0c9b12e437db9787de912355ed9 |
|||
timeCreated: 1553060178 |
1001
Tests/Resources/ali_landscape.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: b09b9022b548f4a788de5d6d2b47aeac |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 9 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
25
Tests/Resources/unity-white.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 18b226d86a5e74dd392f35201ac60139 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 9 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue