浏览代码

fix errors

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
e0ec89ea
共有 14 个文件被更改,包括 61 次插入86 次删除
  1. 4
      com.unity.uiwidgets/Runtime/widgets/animated_size.cs
  2. 1
      com.unity.uiwidgets/Runtime/widgets/app.cs
  3. 12
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  4. 74
      com.unity.uiwidgets/Runtime/widgets/editable_text.cs
  5. 17
      com.unity.uiwidgets/Runtime/widgets/fade_in_image.cs
  6. 2
      com.unity.uiwidgets/Runtime/widgets/focus_manager.cs
  7. 4
      com.unity.uiwidgets/Runtime/widgets/focus_traversal.cs
  8. 3
      com.unity.uiwidgets/Runtime/widgets/image_filter.cs
  9. 4
      com.unity.uiwidgets/Runtime/widgets/navigator.cs
  10. 6
      com.unity.uiwidgets/Runtime/widgets/scroll_notification.cs
  11. 3
      com.unity.uiwidgets/Runtime/widgets/scroll_simulation.cs
  12. 2
      com.unity.uiwidgets/Runtime/widgets/transitions.cs
  13. 3
      com.unity.uiwidgets/Runtime/widgets/viewport.cs
  14. 12
      com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs

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


public AnimatedSize(
Key key = null,
Widget child = null,
Alignment alignment = null,
AlignmentGeometry alignment = null,
Curve curve = null,
TimeSpan? duration = null,
TimeSpan? reverseDuration = null,

this.vsync = vsync;
}
public readonly Alignment alignment;
public readonly AlignmentGeometry alignment;
public readonly Curve curve;

1
com.unity.uiwidgets/Runtime/widgets/app.cs


public class _MediaQueryFromWindow : StatefulWidget {
public _MediaQueryFromWindow(Key key = null, Widget child = null) : base(key: key) {
this.child = child;
}
public readonly Widget child;

12
com.unity.uiwidgets/Runtime/widgets/basic.cs


Widget child = null
) : base(key: key) {
this.child = child;
this.start = start;
this.top = top;
this.end = end;
this.bottom = bottom;
this.width = width;
}
public readonly float? start;

VoidCallback onBuild = null
) :base(key: new GlobalObjectKey<State>(renderBox)) {
D.assert(renderBox != null);
this.onBuild = onBuild;
}

PointerUpEventListener onPointerUp = null,
PointerCancelEventListener onPointerCancel = null,
PointerSignalEventListener onPointerSignal = null,
// PointerScrollEventListener onPointerScroll = null,
// PointerDragFromEditorEnterEventListener onPointerDragFromEditorEnter = null,
// PointerDragFromEditorHoverEventListener onPointerDragFromEditorHover = null,
// PointerDragFromEditorExitEventListener onPointerDragFromEditorExit = null,
// PointerDragFromEditorReleaseEventListener onPointerDragFromEditorRelease = null,
HitTestBehavior behavior = HitTestBehavior.deferToChild,
Widget child = null
) : base(key: key) {

this.onPointerHover = onPointerHover;
//this.onPointerExit = onPointerExit;
//this.onPointerEnter = onPointerEnter;
// this.onPointerScroll = onPointerScroll;
this.behavior = behavior;
}

74
com.unity.uiwidgets/Runtime/widgets/editable_text.cs


float caretStart;
float caretEnd;
if (_isMultiline) {
// The caret is vertically centered within the line. Expand the caret's
// height so that it spans the line because we're going to ensure that the entire
// expanded caret is scrolled into view.
float lineHeight = renderEditable.preferredLineHeight;
float caretOffset = (lineHeight - caretRect.height) / 2;
caretStart = caretRect.top - caretOffset;

);
_selectionOverlay.handlesVisible = widget.showSelectionHandles;
_selectionOverlay.showHandles();
/*bool longPress = cause == SelectionChangedCause.longPress;
if (cause != SelectionChangedCause.keyboard && (_value.text.isNotEmpty() || longPress)) {
_selectionOverlay.showHandles();
}
if (longPress || cause == SelectionChangedCause.doubleTap) {
_selectionOverlay.showToolbar();
}*/
if (widget.onSelectionChanged != null) {
widget.onSelectionChanged(selection, cause);
}

public void didChangeAccessibilityFeatures() {}
//_WhitespaceDirectionalityFormatter _whitespaceFormatter;
//whitespaceFormatter ??= new _WhitespaceDirectionalityFormatter(textDirection: _textDirection);
bool textChanged = _value?.text != value?.text;
bool isRepeatText = value?.text == _lastFormattedUnmodifiedTextEditingValue?.text;
bool isRepeatSelection = value?.selection == _lastFormattedUnmodifiedTextEditingValue?.selection;
bool isRepeatComposing = value?.composing == _lastFormattedUnmodifiedTextEditingValue?.composing;
if (!isRepeatText && textChanged && widget.inputFormatters != null && widget.inputFormatters.isNotEmpty()) {
foreach (TextInputFormatter formatter in widget.inputFormatters) {
value = formatter.formatEditUpdate(_value, value);
}
//value = _whitespaceFormatter.formatEditUpdate(_value, value);
_lastFormattedValue = value;
}
_value = value;
if (isRepeatText && isRepeatSelection && isRepeatComposing && textChanged && _lastFormattedValue != null) {
_value = _lastFormattedValue;
}
_updateRemoteEditingValueIfNeeded();
if (textChanged && widget.onChanged != null)
widget.onChanged(value.text);
_lastFormattedUnmodifiedTextEditingValue = _receivedRemoteTextEditingValue;
/*
var textChanged = _value?.text != value?.text || isIMEInput;
if (textChanged && widget.inputFormatters != null && widget.inputFormatters.isNotEmpty()) {
foreach (var formatter in widget.inputFormatters) {

if (textChanged && widget.onChanged != null) {
widget.onChanged(value.text);
}
}*/
}
void _onCursorColorTick() {

);
}
// unity keyboard has a preview view with editing function, text selection & cursor function of this widget is disable
// in the case
/*Offset _getImePos() {
if (_hasInputConnection && _textInputConnection.imeRequired()) {
var localPos = renderEditable.getLocalRectForCaret(_value.selection.basePos).bottomLeft;
return renderEditable.localToGlobal(localPos);
}
return null;
}*/
/*void _updateImePosIfNeed() {
if (!_hasInputConnection || !_textInputConnection.imeRequired()) {
return;
}
if (_imePosUpdateScheduled) {
return;
}
_imePosUpdateScheduled = true;
SchedulerBinding.instance.addPostFrameCallback(_ => {
_imePosUpdateScheduled = false;
if (!_hasInputConnection) {
return;
}
_textInputConnection.setIMEPos(_getImePos());
});
}*/
class _Editable : LeafRenderObjectWidget {
public readonly TextSpan textSpan;

17
com.unity.uiwidgets/Runtime/widgets/fade_in_image.cs


Curve fadeInCurve,
Key key = null
) : base(key: key, duration: fadeInDuration + fadeOutDuration) {
this.target = target;
this.placeholder = placeholder;
this.isTargetLoaded = isTargetLoaded;

FloatTween _placeholderOpacity;
Animation<float> _targetOpacityAnimation;
Animation<float> _placeholderOpacityAnimation;
/*@override
void forEachTween(TweenVisitor<dynamic> visitor) {
_targetOpacity = visitor(
_targetOpacity,
widget.isTargetLoaded ? 1.0 : 0.0,
(dynamic value) => Tween<double>(begin: value as double),
) as Tween<double>;
_placeholderOpacity = visitor(
_placeholderOpacity,
widget.isTargetLoaded ? 0.0 : 1.0,
(dynamic value) => Tween<double>(begin: value as double),
) as Tween<double>;
}*/
protected override void forEachTween(TweenVisitor visitor) {
_targetOpacity = (FloatTween) visitor.visit(

2
com.unity.uiwidgets/Runtime/widgets/focus_manager.cs


public class FocusManager : DiagnosticableTreeMixinChangeNotifier{
public FocusManager()
{
{
rootScope._manager = this;
RawKeyboard.instance.addListener(_handleRawKeyEvent);
GestureBinding.instance.pointerRouter.addGlobalRoute(_handlePointerEvent);

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


FocusTraversalPolicy policy = null,
Widget child = null
) : base(key: key) {
policy = policy ?? new ReadingOrderTraversalPolicy();
this.policy = policy ?? new ReadingOrderTraversalPolicy();
this.child = child;
}

) {
groupNode = marker?.focusNode;
policy = marker?.policy ?? defaultPolicy ?? new ReadingOrderTraversalPolicy();
members = members ?? new List<FocusNode>();
this.members = members ?? new List<FocusNode>();
}
public readonly FocusNode groupNode;
public readonly FocusTraversalPolicy policy;

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


Key key = null,
ImageFilter imageFilter = null,
Widget child = null
) :
base(key: key, child: child) {
) : base(key: key, child: child) {
D.assert(imageFilter != null);
this.imageFilter = imageFilter;
}

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


return other.GetType() == GetType() &&
other.key == key;
}
//public abstract Route createRoute(BuildContext context);
public override string ToString() {
return $"{GetType()}(\"{name}\",{key},{arguments})";
}

public _RouteEntry(
Route route,
_RouteLifecycle initialState
) {
D.assert(
initialState == _RouteLifecycle.staging ||

6
com.unity.uiwidgets/Runtime/widgets/scroll_notification.cs


public ScrollEndNotification(
ScrollMetrics metrics = null,
BuildContext context = null,
DragEndDetails dragDetails = null,
float overscroll = 0,
float velocity = 0
) : base(metrics: metrics, context: context) {
DragEndDetails dragDetails = null
) : base(metrics: metrics, context: context) {
this.dragDetails = dragDetails;
}

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


float friction = 0.015f,
Tolerance tolerance = null
) : base(tolerance: tolerance) {
D.assert(_flingVelocityPenetration(0.0f) ==
_initialVelocityPenetration);
D.assert(_flingVelocityPenetration(0.0f) == _initialVelocityPenetration);
this.position = position;
this.velocity = velocity;
this.friction = friction;

2
com.unity.uiwidgets/Runtime/widgets/transitions.cs


public class SliverFadeTransition : SingleChildRenderObjectWidget {
public SliverFadeTransition(
Animation<float> opacity = default,
Animation<float> opacity = null,
Key key = null,
Widget sliver = null
) : base(key: key, child: sliver) {

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


AxisDirection? crossAxisDirection = null,
ViewportOffset offset = null,
List<Widget> slivers = null
) : base(key: key, children: slivers) {
slivers = slivers ?? new List<Widget>();
) : base(key: key, children: slivers ?? new List<Widget>()) {
D.assert(offset != null);
this.axisDirection = axisDirection;
this.crossAxisDirection = crossAxisDirection;

12
com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs


RenderObject target
) {
D.assert(target != null);
this.target = target;
containerLayer = new _ScreenshotContainerLayer();
}

ContainerLayer containerLayer = null,
Rect estimatedBounds = null,
_ScreenshotData screenshotData = null
) :
base(containerLayer, estimatedBounds) {
) : base(containerLayer, estimatedBounds) {
_data = screenshotData;
}

public readonly string tooltip;
public readonly TextDirection textDirection;
public _InspectorOverlayRenderState(Rect overlayRect, _TransformedRect selected,
List<_TransformedRect> candidates, string tooltip, TextDirection textDirection) {
public _InspectorOverlayRenderState(
Rect overlayRect,
_TransformedRect selected,
List<_TransformedRect> candidates,
string tooltip,
TextDirection textDirection) {
this.overlayRect = overlayRect;
this.selected = selected;
this.candidates = candidates;

正在加载...
取消
保存