phase3: improve arg-bang handler (allow ! in chains, ; terminator). 574->440
This commit is contained in:
@@ -29,7 +29,7 @@ class ParabolicAnimationWidget extends AnimatedWidget {
|
||||
Widget build(BuildContext context) {
|
||||
_calPoints();
|
||||
|
||||
final Animation<double> animation = listenable;
|
||||
final Animation<double> animation = listenable!;
|
||||
final double time = animation.value;
|
||||
|
||||
// 设time=1 已知两点坐标 和 初速度 可求出 加速度 a
|
||||
@@ -66,17 +66,17 @@ class ParabolicAnimationWidget extends AnimatedWidget {
|
||||
|
||||
void _calPoints() {
|
||||
if (_startOffset == null) {
|
||||
RenderBox stackBox = stackKey.currentContext!.findRenderObject();
|
||||
RenderBox stackBox = stackKey.currentContext!.findRenderObject()!;
|
||||
Offset stackBoxOffset = stackBox.globalToLocal(Offset.zero);
|
||||
|
||||
EdgeInsets startMargin = _margin(startKey);
|
||||
RenderBox startBox = startKey.currentContext!.findRenderObject();
|
||||
RenderBox startBox = startKey.currentContext!.findRenderObject()!;
|
||||
_startOffset = startBox.localToGlobal(Offset(
|
||||
startMargin.left + startAdjustOffset.dx,
|
||||
stackBoxOffset.dy + startMargin.top + startAdjustOffset.dy));
|
||||
|
||||
EdgeInsets endMargin = _margin(endKey);
|
||||
RenderBox endBox = endKey.currentContext!.findRenderObject();
|
||||
RenderBox endBox = endKey.currentContext!.findRenderObject()!;
|
||||
_endOffset = endBox.localToGlobal(Offset(
|
||||
endMargin.left + endAdjustOffset.dx,
|
||||
stackBoxOffset.dy + endMargin.top + endAdjustOffset.dy));
|
||||
|
||||
Reference in New Issue
Block a user