Skip to content

Commit

Permalink
Merge branch 'breaking-up-step-5' of https://github.com/domesticmouse…
Browse files Browse the repository at this point in the history
…/codelabs into Flutter-3.27-beta
  • Loading branch information
domesticmouse committed Nov 14, 2024
2 parents 3cb135b + 54f171a commit fa4deba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
33 changes: 16 additions & 17 deletions animations/codelab_rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,8 @@ steps:
- name: Use PageRouteBuilder
path: quiz/lib/home_screen.dart
patch-u: |
--- a/animations/step_05/lib/home_screen.dart
+++ b/animations/step_05/lib/home_screen.dart
--- b/animations/step_05_a/lib/home_screen.dart
+++ a/animations/step_05_a/lib/home_screen.dart
@@ -26,14 +26,19 @@ class HomeScreen extends StatelessWidget {
// Show the question screen to start the game
Navigator.push(
Expand All @@ -1015,9 +1015,9 @@ steps:
- ),
+ PageRouteBuilder(
+ pageBuilder: (context, animation, secondaryAnimation) {
+ return const QuestionScreen();
+ }, transitionsBuilder:
+ (context, animation, secondaryAnimation, child) {
+ return const QuestionScreen();
+ }, transitionsBuilder:
+ (context, animation, secondaryAnimation, child) {
+ return FadeTransition(
+ opacity: animation,
+ child: child,
Expand All @@ -1039,17 +1039,17 @@ steps:
- name: Use package:animations FadeThroughTransition
path: quiz/lib/home_screen.dart
patch-u: |
--- a/animations/step_05/lib/home_screen.dart
+++ b/animations/step_05/lib/home_screen.dart
--- b/animations/step_05_b/lib/home_screen.dart
+++ a/animations/step_05_b/lib/home_screen.dart
@@ -1,3 +1,4 @@
+import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
import 'question_screen.dart';
@@ -31,8 +32,9 @@ class HomeScreen extends StatelessWidget {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
- return FadeTransition(
- opacity: animation,
+ return FadeThroughTransition(
Expand Down Expand Up @@ -1093,8 +1093,8 @@ steps:
- name: Change back to MaterialPageRoute
path: quiz/lib/home_screen.dart
patch-u: |
--- a/animations/step_05/lib/home_screen.dart
+++ b/animations/step_05/lib/home_screen.dart
--- b/animations/step_05_c/lib/home_screen.dart
+++ a/animations/step_05_c/lib/home_screen.dart
@@ -1,4 +1,3 @@
-import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
Expand All @@ -1106,16 +1106,15 @@ steps:
context,
- PageRouteBuilder(
- pageBuilder: (context, animation, secondaryAnimation) {
- return const QuestionScreen();
- }, transitionsBuilder:
- (context, animation, secondaryAnimation, child) {
+ MaterialPageRoute(builder: (context) {
return const QuestionScreen();
- }, transitionsBuilder:
- (context, animation, secondaryAnimation, child) {
- return FadeThroughTransition(
- animation: animation,
- secondaryAnimation: secondaryAnimation,
- child: child,
- );
+ MaterialPageRoute(builder: (context) {
+ return const QuestionScreen();
}),
);
},
Expand Down
6 changes: 3 additions & 3 deletions animations/step_05_a/lib/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class HomeScreen extends StatelessWidget {
context,
PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return FadeTransition(
opacity: animation,
child: child,
Expand Down
6 changes: 3 additions & 3 deletions animations/step_05_b/lib/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class HomeScreen extends StatelessWidget {
context,
PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return const QuestionScreen();
}, transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return FadeThroughTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
Expand Down

0 comments on commit fa4deba

Please sign in to comment.