@@ -68,19 +68,21 @@ class MyApp extends StatelessWidget {
68
68
pageBuilder: (context, animation, secondaryAnimation) {
69
69
String pathName =
70
70
path != '/' && path.startsWith ('/' ) ? path.substring (1 ) : path;
71
- return switch (pathName) {
72
- '/' || ListPage .name => const ListPage (),
73
- PostPage .name =>
74
- // Breakpoints can be nested.
75
- // Here's an example of custom "per-page" breakpoints.
76
- const ResponsiveBreakpoints (breakpoints: [
77
- Breakpoint (start: 0 , end: 480 , name: MOBILE ),
78
- Breakpoint (start: 481 , end: 1200 , name: TABLET ),
79
- Breakpoint (start: 1201 , end: double .infinity, name: DESKTOP ),
80
- ], child: PostPage ()),
81
- TypographyPage .name => const TypographyPage (),
82
- _ => const SizedBox .shrink (),
83
- };
71
+ return SelectionArea (
72
+ child: switch (pathName) {
73
+ '/' || ListPage .name => const ListPage (),
74
+ PostPage .name =>
75
+ // Breakpoints can be nested.
76
+ // Here's an example of custom "per-page" breakpoints.
77
+ const ResponsiveBreakpoints (breakpoints: [
78
+ Breakpoint (start: 0 , end: 480 , name: MOBILE ),
79
+ Breakpoint (start: 481 , end: 1200 , name: TABLET ),
80
+ Breakpoint (start: 1201 , end: double .infinity, name: DESKTOP ),
81
+ ], child: PostPage ()),
82
+ TypographyPage .name => const TypographyPage (),
83
+ _ => const SizedBox .shrink (),
84
+ },
85
+ );
84
86
},
85
87
);
86
88
}
0 commit comments