浏览代码

fix some errors

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
12d53289
共有 5 个文件被更改,包括 27 次插入7 次删除
  1. 19
      com.unity.uiwidgets/Runtime/painting/text_painter.cs
  2. 1
      com.unity.uiwidgets/Runtime/rendering/animated_size.cs
  3. 4
      com.unity.uiwidgets/Runtime/rendering/custom_layout.cs
  4. 6
      com.unity.uiwidgets/Runtime/rendering/editable.cs
  5. 4
      com.unity.uiwidgets/Runtime/services/text_editing.cs

19
com.unity.uiwidgets/Runtime/painting/text_painter.cs


}
}
void setPlaceholderDimensions(List<PlaceholderDimensions> value) {
public void setPlaceholderDimensions(List<PlaceholderDimensions> value) {
if (value == null || value.isEmpty() || value.equalsList(_placeholderDimensions)) {
return;
}

bool _isUnicodeDirectionality(int? value) {
return value == 0x200F || value == 0x200E;
}
public int getOffsetAfter(int offset) {
int? nextCodeUnit = _text.codeUnitAt(offset);
if (nextCodeUnit == null)
return 0;
// TODO(goderbauer): doesn't handle extended grapheme clusters with more than one Unicode scalar value (https://github.com/flutter/flutter/issues/13404).
return _isUtf16Surrogate(nextCodeUnit.Value) ? offset + 2 : offset + 1;
}
public int getOffsetBefore(int offset) {
int? prevCodeUnit = _text.codeUnitAt(offset - 1);
if (prevCodeUnit == null)
return 0;
// TODO(goderbauer): doesn't handle extended grapheme clusters with more than one Unicode scalar value (https://github.com/flutter/flutter/issues/13404).
return _isUtf16Surrogate(prevCodeUnit.Value) ? offset - 2 : offset - 1;
}
}
}

1
com.unity.uiwidgets/Runtime/rendering/animated_size.cs


curve = curve ?? Curves.linear;
D.assert(vsync != null);
D.assert(duration != null);
D.assert(curve != null);
_vsync = vsync;
_controller = new AnimationController(
vsync: this.vsync,

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


MultiChildLayoutDelegate _delegate;
/*public void attach(PipelineOwner owner) {
public override void attach(object owner) {
base.attach(owner);
_delegate?._relayout?.addListener(markNeedsLayout);
}

base.detach();
}*/ // [!!!] ???
}
Size _getSize(BoxConstraints constraints) {
D.assert(constraints.debugAssertIsValid());

6
com.unity.uiwidgets/Runtime/rendering/editable.cs


_textLayoutLastMinWidth = null;
}
/*void _handleSetSelection(TextSelection selection) {
void _handleSetSelection(TextSelection selection) {
_handleSelectionChange(selection, SelectionChangedCause.keyboard);
}

}
}
return true;
}*/ //need?
}
public void attach(PipelineOwner owner) {
_tap = new TapGestureRecognizer(debugOwner: this);
_tap.onTapDown = _handleTapDown;

4
com.unity.uiwidgets/Runtime/services/text_editing.cs


public TextPosition endPos {
get { return new TextPosition(offset: end, affinity: affinity); }
}
public TextPosition extent {
get { return new TextPosition(offset: extentOffset, affinity: affinity); }
}
public bool Equals(TextSelection other) {
if (ReferenceEquals(null, other)) {

正在加载...
取消
保存