Created
October 18, 2025 15:25
-
-
Save fredgrott/d6cd623783b67778eb0f360ce5762e6a to your computer and use it in GitHub Desktop.
motor, more complex builder material
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: MaterialSpringMotion.expressiveSpatialDefault, | |
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.green, | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment