From 689bd7cbde3f845bf5db91e176bee4f33c23eb21 Mon Sep 17 00:00:00 2001 From: Codelessly Date: Wed, 4 Sep 2024 21:52:36 -0500 Subject: [PATCH] Enable Selectable Text --- lib/main.dart | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 50c20ae..6762e94 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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(), + }, + ); }, ); }