Assert message for speed or duration needed

This commit is contained in:
Lukas Klingsbo
2020-10-30 16:17:01 +01:00
parent 407dd9e435
commit 467181ba75
4 changed files with 16 additions and 4 deletions

View File

@ -166,7 +166,10 @@ abstract class SimplePositionComponentEffect extends PositionComponentEffect {
Curve curve,
bool isRelative = false,
void Function() onComplete,
}) : assert(duration != null || speed != null),
}) : assert(
duration != null || speed != null,
"Either speed or duration necessary",
),
super(
initialIsInfinite,
initialIsAlternating,