Created
October 18, 2025 15:13
-
-
Save fredgrott/e21b9f022c7b524e7cc09a1227935bb0 to your computer and use it in GitHub Desktop.
motor, more complex builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:motor/motor.dart'; | |
MotionBuilder( | |
motion: CupertinoMotion.bouncy(), | |
value: const Offset(100, 100), | |
from: Offset.zero, | |
converter: OffsetMotionConverter(), | |
builder: (context, value, child) { | |
return Transform.translate( | |
offset: value, | |
child: child, | |
); | |
}, | |
child: Container( | |
width: 100, | |
height: 100, | |
color: Colors.blue, | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment