TF-233 Add presentation for create new mailbox
This commit is contained in:
@@ -74,6 +74,12 @@ extension AppColor on Color {
|
||||
static const colorFilterMessageDisabled = Color(0xFF99A2AD);
|
||||
static const colorFilterMessageEnabled = Color(0xFF007AFF);
|
||||
static const colorDefaultCupertinoActionSheet = Color(0x66000000);
|
||||
static const colorDisableMailboxCreateButton = Color(0x2E3C3C43);
|
||||
static const colorInputBorderErrorVerifyName = Color(0xFFE64646);
|
||||
static const colorInputBorderCreateMailbox = Color(0x1F000000);
|
||||
static const colorInputBackgroundErrorVerifyName = Color(0xFFFAEBEB);
|
||||
static const colorInputBackgroundCreateMailbox = Color(0xFFF2F3F5);
|
||||
static const colorHintInputCreateMailbox= Color(0xFFA9B4C2);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -10,10 +10,10 @@ class ResponsiveUtils {
|
||||
static const double _loginTextFieldWidthLargeScreen = 320.0;
|
||||
static const double _loginButtonWidth = 240.0;
|
||||
|
||||
static const double _tabletHorizontalMargin = 120.0;
|
||||
static const double _tabletVerticalMargin = 200.0;
|
||||
static const double _desktopVerticalMargin = 120.0;
|
||||
static const double _desktopHorizontalMargin = 200.0;
|
||||
final double tabletHorizontalMargin = 120.0;
|
||||
final double tabletVerticalMargin = 200.0;
|
||||
final double desktopVerticalMargin = 120.0;
|
||||
final double desktopHorizontalMargin = 200.0;
|
||||
|
||||
bool isMobileDevice(BuildContext context) => MediaQuery.of(context).size.shortestSide < 600;
|
||||
|
||||
@@ -38,47 +38,4 @@ class ResponsiveUtils {
|
||||
double getWidthLoginTextField(BuildContext context) => isMobile(context) ? _loginTextFieldWidthSmallScreen : _loginTextFieldWidthLargeScreen;
|
||||
|
||||
double getWidthLoginButton() => _loginButtonWidth;
|
||||
|
||||
EdgeInsets getMarginDestinationPicker(BuildContext context) {
|
||||
if (isMobileDevice(context) && isLandscape(context)) {
|
||||
return EdgeInsets.only(
|
||||
left: _tabletHorizontalMargin,
|
||||
right: _tabletHorizontalMargin,
|
||||
top: 50.0);
|
||||
} else 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) || isTabletLarge(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 (isMobileDevice(context) && isLandscape(context)) {
|
||||
return BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius));
|
||||
} else 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) || isTabletLarge(context)) {
|
||||
return getSizeHeightScreen(context) <= _desktopVerticalMargin * 2
|
||||
? BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius))
|
||||
: BorderRadius.circular(radius);
|
||||
} else {
|
||||
return BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,40 +8,48 @@ abstract class InputDecorationBuilder {
|
||||
TextStyle? hintStyle;
|
||||
EdgeInsets? contentPadding;
|
||||
OutlineInputBorder? enabledBorder;
|
||||
OutlineInputBorder? errorBorder;
|
||||
String? errorText;
|
||||
TextStyle? errorTextStyle;
|
||||
|
||||
InputDecorationBuilder setPrefixText(String newPrefixText) {
|
||||
void setPrefixText(String newPrefixText) {
|
||||
prefixText = newPrefixText;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setLabelText(String newLabelText) {
|
||||
void setLabelText(String newLabelText) {
|
||||
labelText = newLabelText;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setLabelStyle(TextStyle newLabelStyle) {
|
||||
void setLabelStyle(TextStyle newLabelStyle) {
|
||||
labelStyle = newLabelStyle;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setHintText(String newHintText) {
|
||||
void setHintText(String newHintText) {
|
||||
hintText = newHintText;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setHintStyle(TextStyle newHintStyle) {
|
||||
void setHintStyle(TextStyle newHintStyle) {
|
||||
hintStyle = newHintStyle;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setContentPadding(EdgeInsets newContentPadding) {
|
||||
void setContentPadding(EdgeInsets newContentPadding) {
|
||||
contentPadding = newContentPadding;
|
||||
return this;
|
||||
}
|
||||
|
||||
InputDecorationBuilder setEnabledBorder(OutlineInputBorder newEnabledBorder) {
|
||||
void setEnabledBorder(OutlineInputBorder newEnabledBorder) {
|
||||
enabledBorder = newEnabledBorder;
|
||||
return this;
|
||||
}
|
||||
|
||||
void setErrorBorder(OutlineInputBorder newErrorBorder) {
|
||||
errorBorder = newErrorBorder;
|
||||
}
|
||||
|
||||
void setErrorText(String newText) {
|
||||
errorText = newText;
|
||||
}
|
||||
|
||||
void setErrorTextStyle(TextStyle newStyle) {
|
||||
errorTextStyle = newStyle;
|
||||
}
|
||||
|
||||
InputDecoration build() {
|
||||
@@ -52,6 +60,9 @@ abstract class InputDecorationBuilder {
|
||||
hintText: hintText,
|
||||
hintStyle: hintStyle,
|
||||
contentPadding: contentPadding,
|
||||
errorBorder: errorBorder,
|
||||
errorText: errorText,
|
||||
errorStyle: errorTextStyle,
|
||||
enabledBorder: enabledBorder);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user