Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
chore: update dash
Browse files Browse the repository at this point in the history
  • Loading branch information
omartinma committed Nov 21, 2023
1 parent 50018a9 commit e3d6b76
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions lib/counter/view/counter_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class CounterView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
const dashSize = Size(800, 800);
final screenSize = MediaQuery.sizeOf(context);
return Scaffold(
appBar: AppBar(title: Text(l10n.counterAppBarTitle)),
Expand All @@ -26,16 +25,29 @@ class CounterView extends StatelessWidget {
alignment: Alignment.center,
height: screenSize.height / 2,
width: screenSize.height / 2,
child: const AnimatedSprite(
showLoadingIndicator: false,
sprites: Sprites(
asset: 'dash_animation.png',
size: dashSize,
frames: 34,
),
),
child: const DashAnimation(),
),
),
);
}
}

class DashAnimation extends StatelessWidget {
@visibleForTesting
const DashAnimation({super.key});

static const dashSize = Size(800, 800);

@override
Widget build(BuildContext context) {
return const AnimatedSprite(
showLoadingIndicator: false,
sprites: Sprites(
asset: 'dash_animation.png',
size: dashSize,
frames: 34,
stepTime: 0.07,
),
);
}
}

0 comments on commit e3d6b76

Please sign in to comment.