Skip to content

Commit

Permalink
Enable Selectable Text
Browse files Browse the repository at this point in the history
  • Loading branch information
rayliverified committed Sep 5, 2024
1 parent b887619 commit 689bd7c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,21 @@ class MyApp extends StatelessWidget {
pageBuilder: (context, animation, secondaryAnimation) {
String pathName =
path != '/' && path.startsWith('/') ? path.substring(1) : path;
return switch (pathName) {
'/' || ListPage.name => const ListPage(),
PostPage.name =>
// Breakpoints can be nested.
// Here's an example of custom "per-page" breakpoints.
const ResponsiveBreakpoints(breakpoints: [
Breakpoint(start: 0, end: 480, name: MOBILE),
Breakpoint(start: 481, end: 1200, name: TABLET),
Breakpoint(start: 1201, end: double.infinity, name: DESKTOP),
], child: PostPage()),
TypographyPage.name => const TypographyPage(),
_ => const SizedBox.shrink(),
};
return SelectionArea(
child: switch (pathName) {
'/' || ListPage.name => const ListPage(),
PostPage.name =>
// Breakpoints can be nested.
// Here's an example of custom "per-page" breakpoints.
const ResponsiveBreakpoints(breakpoints: [
Breakpoint(start: 0, end: 480, name: MOBILE),
Breakpoint(start: 481, end: 1200, name: TABLET),
Breakpoint(start: 1201, end: double.infinity, name: DESKTOP),
], child: PostPage()),
TypographyPage.name => const TypographyPage(),
_ => const SizedBox.shrink(),
},
);
},
);
}
Expand Down

0 comments on commit 689bd7c

Please sign in to comment.