Skip to content

Commit 689bd7c

Browse files
committed
Enable Selectable Text
1 parent b887619 commit 689bd7c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

lib/main.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,21 @@ class MyApp extends StatelessWidget {
6868
pageBuilder: (context, animation, secondaryAnimation) {
6969
String pathName =
7070
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+
);
8486
},
8587
);
8688
}

0 commit comments

Comments
 (0)