浏览代码

fix warnings (step 1)

/zxw-refine_codegen
Xingwei Zhu 3 年前
当前提交
906429b5
共有 34 个文件被更改,包括 70 次插入188 次删除
  1. 5
      Samples/UIWidgetsSamples_2019_4/Assets/CountDemo.cs
  2. 1
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/DividerAndButton.cs
  3. 10
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/HoverSample.cs
  4. 6
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/MaterialThemeSample.cs
  5. 8
      Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs
  6. 5
      Samples/UIWidgetsSamples_2019_4/Assets/Script/StreamTest.cs
  7. 5
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextFieldTest.cs
  8. 22
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs
  9. 4
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/grid_list_demo.cs
  10. 2
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/scrollable_tabs_demo.cs
  11. 2
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/search_demo.cs
  12. 8
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/slider_demo.cs
  13. 6
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/cut_corners_border.cs
  14. 4
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/BackdropFilterSample.cs
  15. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ExpansionPanelSample.cs
  16. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/HttpRequestSample.cs
  17. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/UIWidgetsSamplePanel.cs
  18. 3
      com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs
  19. 18
      com.unity.uiwidgets/Editor/third_parties/editor_coroutines/EditorCoroutines.cs
  20. 4
      com.unity.uiwidgets/Editor/widgets/unity_object_detector.cs
  21. 2
      com.unity.uiwidgets/Runtime/async/async_cast.cs
  22. 10
      com.unity.uiwidgets/Runtime/async/stream.cs
  23. 1
      com.unity.uiwidgets/Runtime/async/stream_controller.cs
  24. 2
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  25. 16
      com.unity.uiwidgets/Runtime/foundation/diagnostics.cs
  26. 15
      com.unity.uiwidgets/Runtime/material/pickers/calendar_date_picker.cs
  27. 2
      com.unity.uiwidgets/Runtime/material/popup_menu.cs
  28. 39
      com.unity.uiwidgets/Runtime/painting/box_border.cs
  29. 26
      com.unity.uiwidgets/Runtime/painting/edge_insets.cs
  30. 14
      com.unity.uiwidgets/Runtime/rendering/flex.cs
  31. 4
      com.unity.uiwidgets/Runtime/rendering/paragraph.cs
  32. 4
      com.unity.uiwidgets/Runtime/ui/window.cs
  33. 4
      com.unity.uiwidgets/Runtime/widgets/binding.cs
  34. 3
      com.unity.uiwidgets/Runtime/widgets/navigator.cs

5
Samples/UIWidgetsSamples_2019_4/Assets/CountDemo.cs


{
public class CountDemo : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

1
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/DividerAndButton.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;

10
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/HoverSample.cs


namespace UIWidgetsSample
{
/**
*
* STILL NOT WORKING, THERE SHOULD BE A BUG. FIX IT !!!!
*
*/
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

6
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/MaterialThemeSample.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using UnityEngine;
using Image = Unity.UIWidgets.widgets.Image;
using ui_ = Unity.UIWidgets.widgets.ui_;
namespace UIWidgetsSample {

8
Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs


using System.Collections.Generic;
using Unity.UIWidgets.animation;
using FontStyle = Unity.UIWidgets.ui.FontStyle;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
using ui_ = Unity.UIWidgets.widgets.ui_;
namespace UIWidgetsSample

protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

5
Samples/UIWidgetsSamples_2019_4/Assets/Script/StreamTest.cs


}
public class StreamTest : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

5
Samples/UIWidgetsSamples_2019_4/Assets/Script/TextFieldTest.cs


{
public class TextFieldTest : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

22
Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs


using System.Collections.Generic;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
//using Unity.UIWidgets.material;
using Unity.UIWidgets.ui;
using FontStyle = Unity.UIWidgets.ui.FontStyle;
using Image = Unity.UIWidgets.widgets.Image;
using Unity.UIWidgets.rendering;
//using UIWidgetsGallery.gallery;
using Unity.UIWidgets.service;
using Brightness = Unity.UIWidgets.ui.Brightness;
using UnityEngine;
using System;
using UnityEngine.Networking;
using Random = UnityEngine.Random;
using Transform = Unity.UIWidgets.widgets.Transform;
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

4
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/grid_list_demo.cs


internal bool isFavorite;
internal string tag => assetName; // Assuming that all asset names are unique.
internal bool isValid => assetName != null && title != null && caption != null && isFavorite != null;
internal bool isValid => assetName != null && title != null && caption != null;
}
internal class GridPhotoViewer : StatefulWidget

child: image
);
}
D.assert(tileStyle != null);
return null;
}
}

2
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/scrollable_tabs_demo.cs


indicator: getIndicator(),
tabs: _Page._allPages.Select<_Page, Widget>((_Page page) =>
{
D.assert(_demoStyle != null);
switch (_demoStyle)
{
case TabsDemoStyle.iconsAndText:

case TabsDemoStyle.textOnly:
return new Tab(text: page.text);
}
return null;
}).ToList()
)

2
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/search_demo.cs


context: context,
del: this._delegate
).then_((selected) => {
if (selected != null && (int) selected != this._lastIntegerSelected) {
if (selected != this._lastIntegerSelected) {
this.setState(() => { this._lastIntegerSelected = (int) selected; });
}
});

8
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/slider_demo.cs


textAlign: TextAlign.center,
onSubmitted: (string value) =>
{
float.TryParse(value, out float newValue);
float? newValue = null;
if (float.TryParse(value, out float convertValue))
{
newValue = convertValue;
}
setState(() => { _continuousValue = newValue.clamp(0.0f, 100.0f); });
setState(() => { _continuousValue = newValue.Value.clamp(0.0f, 100.0f); });
},
keyboardType: TextInputType.number,
controller: new TextEditingController(

6
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/cut_corners_border.cs


public void paint(
Canvas canvas,
Rect rect,
float gapStart,
float? gapStart = null,
float gapExtent = 0.0f,
float gapPercentage = 0.0f,
TextDirection? textDirection = null

float extent = lerpFloat(0.0f, gapExtent + gapPadding * 2.0f, gapPercentage)?? 0.0f;
switch (textDirection) {
case TextDirection.rtl: {
Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart.Value + gapPadding - extent, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart.Value - gapPadding, extent);
canvas.drawPath(path, paint);
break;
}

4
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/BackdropFilterSample.cs


}
}
class BackdropFilterApp : StatefulWidget {
public class BackdropFilterApp : StatefulWidget {
public BackdropFilterApp(Key key = null) : base(key) {
}

}
class BackdropFilterAppState : State<BackdropFilterApp> {
public class BackdropFilterAppState : State<BackdropFilterApp> {
public override Widget build(BuildContext context)
{
var item = new Container(

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ExpansionPanelSample.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.rendering;

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/HttpRequestSample.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.rendering;

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/UIWidgetsSamplePanel.cs


using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.widgets;
namespace UIWidgetsSample {

3
com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs


_EditorTrackedAnnotation hitAnnotation = _findAnnotation(hit);
// While acrossing two areas, set the flag to true to prevent setting the Pointer Copy VisualMode to None
bool enterFlag = false;
enterFlag = true;
// Both onRelease or onEnter event will enable Copy VisualMode
if (hitAnnotation.annotation?.onDragFromEditorRelease != null ||
hitAnnotation.annotation?.onDragFromEditorEnter != null) {

18
com.unity.uiwidgets/Editor/third_parties/editor_coroutines/EditorCoroutines.cs


}
}
struct YieldWWW : ICoroutineYield
{
public WWW Www;
public bool IsDone(float deltaTime)
{
return Www.isDone;
}
}
struct YieldAsync : ICoroutineYield
struct YieldAsync : ICoroutineYield
{
public AsyncOperation asyncOperation;

customYield = current as CustomYieldInstruction
};
}
else if (current is WWW)
{
coroutine.currentYield = new YieldWWW {Www = (WWW) current};
}
else if (current is WaitForFixedUpdate || current is WaitForEndOfFrame)
else if (current is WaitForFixedUpdate || current is WaitForEndOfFrame)
{
coroutine.currentYield = new YieldDefault();
}

4
com.unity.uiwidgets/Editor/widgets/unity_object_detector.cs


HitTestBehavior _defaultBehavior {
get { return widget.child == null ? HitTestBehavior.translucent : HitTestBehavior.deferToChild; }
}
private bool isActivated = false;
private Object[] objectReferences;
private string[] paths;

2
com.unity.uiwidgets/Runtime/async/async_cast.cs


return result;
}
Stream<R> cast<R>() => new CastStream<S, R>(_source);
public override Stream<R> cast<R>() => new CastStream<S, R>(_source);
}

10
com.unity.uiwidgets/Runtime/async/stream.cs


return new _BoundSinkStream<T, T>(source, mapSink);
}
static Stream<T> castFrom<S, T>(Stream<S> source) =>
new CastStream<S, T>(source);
static Stream<U> castFrom<S, U>(Stream<S> source) =>
new CastStream<S, U>(source);
public virtual bool isBroadcast {
get { return false; }

}
}
public Stream<R> cast<R>() => Stream<T>.castFrom<T, R>(this);
public virtual Stream<R> cast<R>() => Stream<T>.castFrom<T, R>(this);
public Future<List<T>> toList() {
List<T> result = new List<T>();

public abstract class StreamTransformer<S, T> {
// c# does not support change constructor
public static StreamTransformer<S, T> create<S, T>(_async._SubscriptionTransformer<S, T> onListen)
public static StreamTransformer<U, V> create<U, V>(_async._SubscriptionTransformer<U, V> onListen)
return new _StreamSubscriptionTransformer<S, T>(onListen);
return new _StreamSubscriptionTransformer<U, V>(onListen);
}

1
com.unity.uiwidgets/Runtime/async/stream_controller.cs


//
abstract class _SyncStreamControllerDispatch<T>
: _StreamController<T>, SynchronousStreamController<T> {
internal virtual int _state { get; set; }
public override void _sendData(T data) {
_subscription._add(data);

2
com.unity.uiwidgets/Runtime/foundation/assertions.cs


details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).TrimEnd(), details.exception);
}
D.logError($"Another exception was thrown: ${details.summary}", details.exception);
D.logError($"Another exception was thrown: {details.summary}", details.exception);
_errorCount += 1;
}

16
com.unity.uiwidgets/Runtime/foundation/diagnostics.cs


}
DiagnosticLevel level {
public override DiagnosticLevel level {
get {
if (!_hasNonNullEntry() && ifEmpty == null) {
return DiagnosticLevel.hidden;

public interface IDiagnosticable {
string toStringShort();
string toString(DiagnosticLevel minLevel = DiagnosticLevel.debug);
string toString(DiagnosticLevel minLevel = DiagnosticLevel.info);
DiagnosticsNode toDiagnosticsNode(
string name = null,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse);

}
public interface DiagnosticableTreeMixin : IDiagnosticable{
string toString(DiagnosticLevel minLevel = DiagnosticLevel.info);
public interface DiagnosticableTreeMixin : IDiagnosticable {
string toStringShallow(
string joiner = ", ",
DiagnosticLevel minLevel = DiagnosticLevel.debug

string prefixLineOne = "",
string prefixOtherLines = null,
DiagnosticLevel minLevel = DiagnosticLevel.debug);
string toStringShort();
DiagnosticsNode toDiagnosticsNode(string name = null, DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse);
void debugFillProperties(DiagnosticPropertiesBuilder properties);
}
public abstract class DiagnosticableTree : Diagnosticable,DiagnosticableTreeMixin {

15
com.unity.uiwidgets/Runtime/material/pickers/calendar_date_picker.cs


this.firstDate = utils.dateOnly(firstDate.Value);
this.lastDate = utils.dateOnly(lastDate.Value);
D.assert(onDateChanged != null);
D.assert(initialCalendarMode != null);
this.onDateChanged = onDateChanged;
this.onDisplayedMonthChanged = onDisplayedMonthChanged;

child: new Text(localizations.formatDecimal(day), style: dayStyle.apply(color: dayColor))
)
);
if (isDisabled) {
dayWidget = dayWidget;
}
else {
if (!isDisabled) {
dayWidget = new GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () => onChanged(dayToBuild),

)
)
);
if (isDisabled) {
yearItem = yearItem;
}
else {
if (!isDisabled) {
yearItem = new InkWell(
key: new ValueKey<int>(year),
onTap: () => {

2
com.unity.uiwidgets/Runtime/material/popup_menu.cs


public override Offset getPositionForChild(Size size, Size childSize) {
float y = position.top;
if (selectedItemIndex != null && itemSizes != null) {
if (itemSizes != null) {
float selectedItemOffset = material_._kMenuVerticalPadding;
for (int index = 0; index < selectedItemIndex; index += 1)
selectedItemOffset += itemSizes[index].height;

39
com.unity.uiwidgets/Runtime/painting/box_border.cs


isUniform = false;
}
public virtual BorderSide top { get; }
public BorderSide top { get; set; }
public virtual BorderSide bottom { get; }
public BorderSide bottom { get; set; }
public virtual bool isUniform { get; }

paint(canvas, rect, textDirection);
}
internal static void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
internal virtual void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
BorderRadius borderRadius) {
D.assert(side.style != BorderStyle.none);
Paint paint = new Paint();

}
}
internal static void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
internal virtual void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

internal static void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
internal virtual void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

left: BorderSide.merge(a.left, b.left)
);
}
public readonly BorderSide top;
public readonly BorderSide bottom;
public readonly BorderSide left;
public override EdgeInsetsGeometry dimensions {

}
}
public bool isUniform {
public override bool isUniform {
get { return isSameColor && isSameWidth && isSameStyle; }
}

paint(canvas, rect, textDirection);
}
public void paint(Canvas canvas, Rect rect,
public override void paint(Canvas canvas, Rect rect,
TextDirection? textDirection = null,
BoxShape shape = BoxShape.rectangle,
BorderRadius borderRadius = null) {

top: top, right: right, bottom: bottom, left: left);
}
static void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
internal override void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
BorderRadius borderRadius) {
D.assert(side.style != BorderStyle.none);
Paint paint = new Paint {

}
}
static void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
internal override void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

static void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
internal override void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

bottom: BorderSide.merge(a.bottom, b.bottom)
);
}
public override BorderSide top { get; }
public override BorderSide bottom { get; }
public override EdgeInsetsGeometry dimensions {
get => EdgeInsetsDirectional.fromSTEB(start.width, top.width, end.width, bottom.width);
}

case BoxShape.circle:
D.assert(borderRadius == null,
() => "A borderRadius can only be given for rectangular boxes.");
BoxBorder._paintUniformBorderWithCircle(canvas, rect, top);
_paintUniformBorderWithCircle(canvas, rect, top);
BoxBorder._paintUniformBorderWithRadius(canvas, rect, top, borderRadius);
_paintUniformBorderWithRadius(canvas, rect, top, borderRadius);
BoxBorder._paintUniformBorderWithRectangle(canvas, rect, top);
_paintUniformBorderWithRectangle(canvas, rect, top);
break;
}

26
com.unity.uiwidgets/Runtime/painting/edge_insets.cs


using System;
using JetBrains.Annotations;
using UnityEngine;
internal float _bottom { get; }
internal float _end { get; }
internal float _left { get; }
internal float _right { get; }
internal float _start { get; }
internal float _top { get; }
internal virtual float _bottom { get; }
internal virtual float _end { get; }
internal virtual float _left { get; }
internal virtual float _right { get; }
internal virtual float _start { get; }
internal virtual float _top { get; }
public static EdgeInsetsGeometry infinity = _MixedEdgeInsets.fromLRSETB(

public readonly float start;
float _start {
internal override float _start {
float _end {
internal override float _end {
float _top {
internal override float _top {
float _bottom {
internal override float _bottom {
float _left {
internal override float _left {
float _right {
internal override float _right {
get { return 0f; }
}

14
com.unity.uiwidgets/Runtime/rendering/flex.cs


// i.e. there's more than one child
switch (direction) {
case Axis.horizontal:
D.assert(textDirection != null, () => "Horizontal $runtimeType with multiple children has a null textDirection, so the layout order is undefined.");
D.assert(textDirection != null, () => $"Horizontal {GetType()} with multiple children has a null textDirection, so the layout order is undefined.");
D.assert(verticalDirection != null, () => "Vertical $runtimeType with multiple children has a null verticalDirection, so the layout order is undefined.");
D.assert(verticalDirection != null, () => $"Vertical {GetType()} with multiple children has a null verticalDirection, so the layout order is undefined.");
break;
}
}

case Axis.horizontal:
D.assert(textDirection != null, () => "Horizontal $runtimeType with $mainAxisAlignment has a null textDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => $"Horizontal {GetType()} with {mainAxisAlignment} has a null textDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => "Vertical $runtimeType with $mainAxisAlignment has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => $"Vertical {GetType()} with {mainAxisAlignment} has a null verticalDirection, so the alignment cannot be resolved.");
break;
}
}

case Axis.horizontal:
D.assert(verticalDirection != null, () => "Horizontal $runtimeType with $crossAxisAlignment has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => $"Horizontal {GetType()} with {crossAxisAlignment} has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => "Vertical $runtimeType with $crossAxisAlignment has a null textDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => $"Vertical {GetType()} with {crossAxisAlignment} has a null textDirection, so the alignment cannot be resolved.");
break;
}
}

new ErrorDescription(
$"The edge of the {GetType()} that is overflowing has been marked " +
"in the rendering with a yellow and black striped pattern. This is " +
"usually caused by the contents being too big for the $runtimeType."
"usually caused by the contents being too big for the {GetType()}."
),
new ErrorHint(
"Consider applying a flex factor (e.g. using an Expanded widget) to " +

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


public float scale;
public override string ToString() {
List<string> values = new List<string>();
if (offset != null) values.Add("offset=$offset");
if (scale != null) values.Add("scale=$scale");
if (offset != null) values.Add($"offset={offset}");
if (scale != null) values.Add($"scale={scale}");
values.Add(base.ToString());
return string.Join("; ", values);
}

4
com.unity.uiwidgets/Runtime/ui/window.cs


get { return _onLocaleChanged; }
set {
_onLocaleChanged = value;
_onLocaleChangedZone = Zone.current;
Zone _onLocaleChangedZone = Zone.root;
_initialLifecycleStateAccessed = true;
bool _initialLifecycleStateAccessed = false;
public float textScaleFactor { get; internal set; } = 1.0f;
public VoidCallback onTextScaleFactorChanged { get; set; }

4
com.unity.uiwidgets/Runtime/widgets/binding.cs


});
}
}
bool _readyToProduceFrames = false;
public RenderObjectToWidgetElement<RenderBox> renderViewElement {
get { return _renderViewElement; }

}
public void attachRootWidget(Widget rootWidget) {
_readyToProduceFrames = true;
_renderViewElement = new RenderObjectToWidgetAdapter<RenderBox>(
container: renderView,
debugShortDescription: "[root]",

3
com.unity.uiwidgets/Runtime/widgets/navigator.cs


"There was no corresponding route in the app, and therefore the initial route specified will be " +
$"ignored and {defaultRouteName} will be used instead."
);
return true;
});
result.Clear();
}

if (lastEntry == null) {
return false;
}
D.assert(disposition != null);
if (!mounted)
return true; // forget about this pop, we were disposed in the meantime
_RouteEntry newLastEntry = null;

_history.Count - 1,
_RouteEntry.willBePresentPredicate
);
D.assert(routeIndex != null);
Route route = _history[routeIndex].route;
Route previousRoute = null;
if (!route.willHandlePopInternally && routeIndex > 0) {

正在加载...
取消
保存