-
Couldn't load subscription status.
- Fork 803
Open
Description
No need to add a description too detailed, it's enough to check one file in the repo such as lib/views/auth_page/auth_page.dart
AppTheme theme = context.watch();
// This view will switch from row/col based on available width
bool useVerticalLayout = context.widthPx < 700;
// Calculate how wide or tall we want the form to be. Use golden ratio for nice aesthetics.
double formWidth = max(500, context.widthPx * .382);
double formHeight = max(500, context.heightPx * .382);
// When we don't have enough vertical height, and are in portrait mode, we need to hide the devices.
bool hideDevices = useVerticalLayout && context.heightPx < formHeight + 150;
Color formBgColor = useVerticalLayout ? theme.surface2 : theme.surface1;The one above is a widget, I kid you not, and yes the values 500, .382, + 150, etc. are hardcoded and hand written repeatedly.
Thats's it, nothing else to add.
przemyslawgrzonka
Metadata
Metadata
Assignees
Labels
No labels