TF-80 Create pick destination screen
This commit is contained in:
@@ -9,6 +9,11 @@ class ResponsiveUtils {
|
||||
static const double _loginTextFieldWidthLargeScreen = 320.0;
|
||||
static const double _loginButtonWidth = 240.0;
|
||||
|
||||
static const double _tabletHorizontalMargin = 144.0;
|
||||
static const double _tabletVerticalMargin = 234.0;
|
||||
static const double _desktopVerticalMargin = 144.0;
|
||||
static const double _desktopHorizontalMargin = 234.0;
|
||||
|
||||
double getSizeWidthScreen(BuildContext context) => MediaQuery.of(context).size.width;
|
||||
|
||||
double getSizeHeightScreen(BuildContext context) => MediaQuery.of(context).size.height;
|
||||
@@ -22,4 +27,40 @@ class ResponsiveUtils {
|
||||
double getWidthLoginTextField(BuildContext context) => isMobile(context) ? _loginTextFieldWidthSmallScreen : _loginTextFieldWidthLargeScreen;
|
||||
|
||||
double getWidthLoginButton() => _loginButtonWidth;
|
||||
|
||||
EdgeInsets getMarginDestinationPicker(BuildContext context) {
|
||||
if (isTablet(context)) {
|
||||
return getSizeHeightScreen(context) <= _tabletVerticalMargin * 2
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: _tabletHorizontalMargin,
|
||||
vertical: 0.0)
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: _tabletHorizontalMargin,
|
||||
vertical: _tabletVerticalMargin);
|
||||
} else if (isDesktop(context)) {
|
||||
return getSizeHeightScreen(context) <= _desktopVerticalMargin * 2
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: _desktopHorizontalMargin,
|
||||
vertical: 0.0)
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: _desktopHorizontalMargin,
|
||||
vertical: _desktopVerticalMargin);
|
||||
} else {
|
||||
return EdgeInsets.zero;
|
||||
}
|
||||
}
|
||||
|
||||
BorderRadius radiusDestinationPicker(BuildContext context, double radius) {
|
||||
if (isTablet(context)) {
|
||||
return getSizeHeightScreen(context) <= _tabletVerticalMargin * 2
|
||||
? BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius))
|
||||
: BorderRadius.circular(radius);
|
||||
} else if (isDesktop(context)) {
|
||||
return getSizeHeightScreen(context) <= _desktopVerticalMargin * 2
|
||||
? BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius))
|
||||
: BorderRadius.circular(radius);
|
||||
} else {
|
||||
return BorderRadius.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user