Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit e9339a5

Browse files
author
Yuncong Zhang
committed
[1.5.4] Fix some issues.
1 parent ebf8f3b commit e9339a5

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

Runtime/gestures/binding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void _handlePointerEvent(PointerEvent evt) {
6363
}
6464

6565
HitTestResult hitTestResult = null;
66-
if (evt is PointerDownEvent || evt is PointerSignalResolver) {
66+
if (evt is PointerDownEvent || evt is PointerSignalEvent) {
6767
D.assert(!this._hitTests.ContainsKey(evt.pointer));
6868
hitTestResult = new HitTestResult();
6969
this.hitTest(hitTestResult, evt.position);

Runtime/painting/continuous_rectangle_border.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public override ShapeBorder scale(float t) {
3333
}
3434

3535
public override ShapeBorder lerpFrom(ShapeBorder a, float t) {
36-
D.assert(t != null);
3736
if (a is ContinuousRectangleBorder) {
3837
return new ContinuousRectangleBorder(
3938
side: BorderSide.lerp((a as ContinuousRectangleBorder).side, this.side, t),
@@ -45,7 +44,6 @@ public override ShapeBorder lerpFrom(ShapeBorder a, float t) {
4544
}
4645

4746
public override ShapeBorder lerpTo(ShapeBorder b, float t) {
48-
D.assert(t != null);
4947
if (b is ContinuousRectangleBorder) {
5048
return new ContinuousRectangleBorder(
5149
side: BorderSide.lerp(this.side, (b as ContinuousRectangleBorder).side, t),

Runtime/painting/text_painter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ public Offset getOffsetForCaret(TextPosition position, Rect caretPrototype) {
239239
return this._caretMetrics.offset;
240240
}
241241

242-
public float getFullHeightForCaret(TextPosition position, Rect caretPrototype) {
242+
public float? getFullHeightForCaret(TextPosition position, Rect caretPrototype) {
243243
this._computeCaretMetrics(position, caretPrototype);
244-
return this._caretMetrics.fullHeight ?? 0;
244+
return this._caretMetrics.fullHeight;
245245
}
246246

247247
_CaretMetrics _caretMetrics;

Runtime/rendering/editable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ void _paintCaret(Canvas canvas, Offset effectiveOffset, TextPosition textPositio
12561256
caretRect.left,
12571257
caretRect.top - _kCaretHeightOffset,
12581258
caretRect.width,
1259-
this._textPainter.getFullHeightForCaret(textPosition, this._caretPrototype)
1259+
this._textPainter.getFullHeightForCaret(textPosition, this._caretPrototype).Value
12601260
);
12611261
}
12621262
#endif

0 commit comments

Comments
 (0)