Skip to content

Commit

Permalink
sail_ui/containers: wrap all pages in SelectionArea
Browse files Browse the repository at this point in the history
Point is to make all text selectable, across entire app. This is a
desktop app, not a mobile app... All text should be selectable, we don't
know what the user wants ahead of time!
  • Loading branch information
octobocto committed Nov 2, 2023
1 parent 612c76a commit 3614905
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/sail_ui/lib/widgets/containers/sail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ class SailPage extends StatelessWidget {
Widget build(BuildContext context) {
final theme = SailTheme.of(context);
final backgroundColor = theme.colors.background;
final scaffold = Scaffold(
backgroundColor: backgroundColor,
appBar: SailAppBar.build(
context,
title: widgetTitle != null
? widgetTitle!
: SailText.mediumPrimary20(
title,
),
final scaffold = SelectionArea(
child: Scaffold(
backgroundColor: backgroundColor,
appBar: SailAppBar.build(
context,
title: widgetTitle != null
? widgetTitle!
: SailText.mediumPrimary20(
title,
),
),
body: buildBody(context),
),
body: buildBody(context),
);
return scaffold;
}
Expand Down

0 comments on commit 3614905

Please sign in to comment.