alexeyinkin commented on code in PR #22794:
URL: https://github.com/apache/beam/pull/22794#discussion_r957088713
##########
learning/tour-of-beam/frontend/lib/pages/welcome/screen.dart:
##########
@@ -31,45 +31,30 @@ import '../../constants/sizes.dart';
class WelcomeScreen extends StatelessWidget {
const WelcomeScreen();
- static const horizontalHalves = [
- TableRow(
- children: [
- TableCell(
- verticalAlignment: TableCellVerticalAlignment.fill,
- child: _SdkSelection(),
- ),
- _TourSummary(),
- ],
- ),
- ];
-
- static const verticalHalves = [
- TableRow(
- children: [
- TableCell(
- child: _SdkSelection(),
- ),
- ],
- ),
- TableRow(
- children: [
- _TourSummary(),
- ],
- ),
- ];
-
@override
Widget build(BuildContext context) {
return PageContainer(
child: SingleChildScrollView(
- child: Table(
- border: TableBorder.symmetric(
- inside: BorderSide(color: ThemeColors.of(context).divider),
- ),
- children: MediaQuery.of(context).size.width > ScreenSizes.medium
- ? horizontalHalves
- : verticalHalves,
- ),
+ child: MediaQuery.of(context).size.width > ScreenSizes.medium
Review Comment:
This should be a separate constant so that we do not guess which of
`ScreenSizes` breaks the halves. Something like this:
```dart
class ScreenBreakpoints {
static const twoColumns = ScreenSizes.medium;
}
```
But this is not final. I am struggling to come up with the name that will
indicate that two columns are *at or wider* screen, and this is not clear yet.
The same problem is also with `ScreenSizes.medium`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]