Skip to content

Instantly share code, notes, and snippets.

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