Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created October 18, 2025 15:12
Show Gist options
  • Save fredgrott/7360bff021b8932cd0506ef963a30b79 to your computer and use it in GitHub Desktop.
Save fredgrott/7360bff021b8932cd0506ef963a30b79 to your computer and use it in GitHub Desktop.
motor, building motion in one dimension
import 'package:motor/motor.dart';
SingleMotionBuilder(
motion: CupertinoMotion.bouncy(),
value: targetValue, // Changes trigger smooth spring animation
builder: (context, value, child) {
return Container(
width: value,
height: value,
color: Colors.blue,
);
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment