style: apply dart format across project

This commit is contained in:
JiWoong Sul
2025-09-07 19:33:11 +09:00
parent f812d4b9fd
commit d1a6cb9fe3
101 changed files with 3123 additions and 2574 deletions

View File

@@ -8,7 +8,7 @@ class SpringAnimationWidget extends StatefulWidget {
final Offset? initialOffset;
final double? initialScale;
final double? initialRotation;
const SpringAnimationWidget({
super.key,
required this.child,
@@ -41,7 +41,7 @@ class _SpringAnimationWidgetState extends State<SpringAnimationWidget>
vsync: this,
duration: const Duration(seconds: 2),
);
// 오프셋 애니메이션
_offsetAnimation = Tween<Offset>(
begin: widget.initialOffset ?? const Offset(0, 50),
@@ -50,7 +50,7 @@ class _SpringAnimationWidgetState extends State<SpringAnimationWidget>
parent: _controller,
curve: Curves.elasticOut,
));
// 스케일 애니메이션
_scaleAnimation = Tween<double>(
begin: widget.initialScale ?? 0.5,
@@ -59,7 +59,7 @@ class _SpringAnimationWidgetState extends State<SpringAnimationWidget>
parent: _controller,
curve: Curves.elasticOut,
));
// 회전 애니메이션
_rotationAnimation = Tween<double>(
begin: widget.initialRotation ?? 0.0,
@@ -68,7 +68,7 @@ class _SpringAnimationWidgetState extends State<SpringAnimationWidget>
parent: _controller,
curve: Curves.elasticOut,
));
// 지연 후 애니메이션 시작
Future.delayed(widget.delay, () {
if (mounted) {
@@ -110,7 +110,7 @@ class BouncyButton extends StatefulWidget {
final VoidCallback? onPressed;
final EdgeInsetsGeometry? padding;
final BoxDecoration? decoration;
const BouncyButton({
super.key,
required this.child,
@@ -127,7 +127,7 @@ class _BouncyButtonState extends State<BouncyButton>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnimation;
@override
void initState() {
super.initState();
@@ -135,7 +135,7 @@ class _BouncyButtonState extends State<BouncyButton>
duration: const Duration(milliseconds: 200),
vsync: this,
);
_scaleAnimation = Tween<double>(
begin: 1.0,
end: 0.95,
@@ -144,26 +144,26 @@ class _BouncyButtonState extends State<BouncyButton>
curve: Curves.easeInOut,
));
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
void _handleTapDown(TapDownDetails details) {
_controller.forward();
}
void _handleTapUp(TapUpDetails details) {
_controller.reverse();
widget.onPressed?.call();
}
void _handleTapCancel() {
_controller.reverse();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
@@ -193,7 +193,7 @@ class GravityAnimation extends StatefulWidget {
final double gravity;
final double bounceFactor;
final double initialVelocity;
const GravityAnimation({
super.key,
required this.child,
@@ -221,7 +221,7 @@ class _GravityAnimationState extends State<GravityAnimation>
vsync: this,
duration: const Duration(seconds: 10),
)..addListener(_updatePhysics);
_controller.repeat();
}
@@ -229,15 +229,15 @@ class _GravityAnimationState extends State<GravityAnimation>
setState(() {
// 속도 업데이트 (중력 적용)
_velocity += widget.gravity * 0.016; // 60fps 가정
// 위치 업데이트
_position += _velocity;
// 바닥 충돌 감지
if (_position >= _floor) {
_position = _floor;
_velocity = -_velocity * widget.bounceFactor;
// 너무 작은 바운스는 멈춤
if (_velocity.abs() < 1) {
_velocity = 0;
@@ -266,7 +266,7 @@ class RippleAnimation extends StatefulWidget {
final Widget child;
final Color rippleColor;
final Duration duration;
const RippleAnimation({
super.key,
required this.child,
@@ -290,7 +290,7 @@ class _RippleAnimationState extends State<RippleAnimation>
duration: widget.duration,
vsync: this,
);
_animation = Tween<double>(
begin: 0.0,
end: 1.0,
@@ -325,8 +325,8 @@ class _RippleAnimationState extends State<RippleAnimation>
height: 100 + 200 * _animation.value,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: widget.rippleColor.withValues(alpha:
(1 - _animation.value) * 0.3,
color: widget.rippleColor.withValues(
alpha: (1 - _animation.value) * 0.3,
),
),
);
@@ -337,4 +337,4 @@ class _RippleAnimationState extends State<RippleAnimation>
),
);
}
}
}