Skip to content

Commit

Permalink
Merge branch 'make-animations-maintainable' of https://github.com/d…
Browse files Browse the repository at this point in the history
…omesticmouse/codelabs into make-`animations`-maintainable
  • Loading branch information
domesticmouse committed Nov 22, 2024
2 parents 0c1fe46 + e92c015 commit 505d8eb
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 14 deletions.
11 changes: 5 additions & 6 deletions animations/codelab_rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ steps:
import 'scoreboard.dart';
import 'view_model.dart';
@@ -148,21 +149,25 @@ class AnswerCards extends StatelessWidget {
@@ -148,21 +149,24 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}
Expand All @@ -859,7 +859,6 @@ steps:
- answers.length > index ? answers[index] : '',
- style: Theme.of(context).textTheme.titleMedium,
- overflow: TextOverflow.clip,
+
+ return CardFlipEffect(
+ duration: const Duration(milliseconds: 300),
+ child: Card.filled(
Expand Down Expand Up @@ -912,11 +911,11 @@ steps:
- name: Patch lib/question_screen.dart
path: quiz/lib/question_screen.dart
patch-u: |
--- a/animations/step_04/lib/question_screen.dart
+++ b/animations/step_04/lib/question_screen.dart
@@ -151,6 +151,7 @@ class AnswerCards extends StatelessWidget {
--- b/animations/step_04_b/lib/question_screen.dart
+++ a/animations/step_04_b/lib/question_screen.dart
@@ -150,6 +150,7 @@ class AnswerCards extends StatelessWidget {
color = Theme.of(context).colorScheme.tertiaryContainer;
}
return CardFlipEffect(
+ delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_04_a/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
duration: const Duration(milliseconds: 300),
child: Card.filled(
Expand Down
1 change: 0 additions & 1 deletion animations/step_04_b/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_04_c/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_04_d/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_05_a/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_05_b/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_05_c/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down
1 change: 0 additions & 1 deletion animations/step_05_d/lib/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class AnswerCards extends StatelessWidget {
if (correctAnswer == index) {
color = Theme.of(context).colorScheme.tertiaryContainer;
}

return CardFlipEffect(
delayAmount: index.toDouble() / 2,
duration: const Duration(milliseconds: 300),
Expand Down

0 comments on commit 505d8eb

Please sign in to comment.