Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created October 18, 2025 15:25
Show Gist options
  • Save fredgrott/d6cd623783b67778eb0f360ce5762e6a to your computer and use it in GitHub Desktop.
Save fredgrott/d6cd623783b67778eb0f360ce5762e6a to your computer and use it in GitHub Desktop.
motor, more complex builder material
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