TF-518 Apply new UI for login in mobile
This commit is contained in:
committed by
Dat H. Pham
parent
0932cf0185
commit
cc66d141d4
@@ -10,9 +10,15 @@ extension AppColor on Color {
|
||||
static const textFieldTextColor = Color(0xFF7E869B);
|
||||
static const textFieldLabelColor = Color(0xFF7E869B);
|
||||
static const textFieldHintColor = Color(0xFF757575);
|
||||
static const textFieldBorderColor = Color(0xfff2f1fd);
|
||||
static const textFieldFocusedBorderColor = Color(0xFF837DFF);
|
||||
static const textFieldErrorBorderColor = Color(0xffFF5858);
|
||||
static const textFieldBorderColor = Color(0xfff2f3f5);
|
||||
static const textFieldFocusedBorderColor = Color(0xFF007AFF);
|
||||
static const loginTextFieldBorderColor = Color(0xFFF2F3F5);
|
||||
static const textFieldErrorBorderColor = Color(0xffE64646);
|
||||
static const loginTextFieldErrorBorder = Color(0xffE64646);
|
||||
static const loginTextFieldFocusedBorder = Color(0xFF007AFF);
|
||||
static const loginTextFieldHintColor = Color(0xff818C99);
|
||||
static const loginTextFieldBackgroundColor = Color(0xFFF2F3F5);
|
||||
static const loginTextFieldBackgroundErrorColor = Color(0xFFFAEBEB);
|
||||
static const buttonColor = Color(0xFF837DFF);
|
||||
static const appColor = Color(0xFF3840F7);
|
||||
static const nameUserColor = Color(0xFF182952);
|
||||
|
||||
@@ -104,6 +104,8 @@ class ImagePaths {
|
||||
String get icDeleteDialogIdentity => _getImagePath('ic_delete_dialog_identity.svg');
|
||||
String get icDeleteDialogFailed => _getImagePath('ic_delete_dialog_failed.svg');
|
||||
String get icEdit => _getImagePath('ic_edit.svg');
|
||||
String get icEye => _getImagePath('ic_eye.svg');
|
||||
String get icEyeOff => _getImagePath('ic_eye_off.svg');
|
||||
|
||||
String _getImagePath(String imageName) {
|
||||
return AssetsPaths.images + imageName;
|
||||
|
||||
@@ -3,6 +3,8 @@ import 'package:get/get.dart';
|
||||
|
||||
class ResponsiveUtils {
|
||||
|
||||
final int heightShortest = 600;
|
||||
|
||||
final int minDesktopWidth = 1200;
|
||||
final int minTabletWidth = 600;
|
||||
final int minTabletLargeWidth = 900;
|
||||
@@ -51,4 +53,8 @@ class ResponsiveUtils {
|
||||
isMobile(context) ? _loginTextFieldWidthSmallScreen : _loginTextFieldWidthLargeScreen;
|
||||
|
||||
double getWidthLoginButton() => _loginButtonWidth;
|
||||
|
||||
bool isHeightShortest(BuildContext context) {
|
||||
return MediaQuery.of(context).size.shortestSide < 600;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
abstract class InputDecorationBuilder {
|
||||
String? prefixText;
|
||||
TextStyle? prefixStyle;
|
||||
String? labelText;
|
||||
TextStyle? labelStyle;
|
||||
String? hintText;
|
||||
@@ -9,38 +10,43 @@ abstract class InputDecorationBuilder {
|
||||
EdgeInsets? contentPadding;
|
||||
OutlineInputBorder? enabledBorder;
|
||||
OutlineInputBorder? errorBorder;
|
||||
OutlineInputBorder? focusBorder;
|
||||
String? errorText;
|
||||
TextStyle? errorTextStyle;
|
||||
|
||||
void setPrefixText(String newPrefixText) {
|
||||
void setPrefixText(String? newPrefixText) {
|
||||
prefixText = newPrefixText;
|
||||
}
|
||||
|
||||
void setLabelText(String newLabelText) {
|
||||
void setPrefixStyle(TextStyle? newPrefixStyle) {
|
||||
prefixStyle = newPrefixStyle;
|
||||
}
|
||||
|
||||
void setLabelText(String? newLabelText) {
|
||||
labelText = newLabelText;
|
||||
}
|
||||
|
||||
void setLabelStyle(TextStyle newLabelStyle) {
|
||||
void setLabelStyle(TextStyle? newLabelStyle) {
|
||||
labelStyle = newLabelStyle;
|
||||
}
|
||||
|
||||
void setHintText(String newHintText) {
|
||||
void setHintText(String? newHintText) {
|
||||
hintText = newHintText;
|
||||
}
|
||||
|
||||
void setHintStyle(TextStyle newHintStyle) {
|
||||
void setHintStyle(TextStyle? newHintStyle) {
|
||||
hintStyle = newHintStyle;
|
||||
}
|
||||
|
||||
void setContentPadding(EdgeInsets newContentPadding) {
|
||||
void setContentPadding(EdgeInsets? newContentPadding) {
|
||||
contentPadding = newContentPadding;
|
||||
}
|
||||
|
||||
void setEnabledBorder(OutlineInputBorder newEnabledBorder) {
|
||||
void setEnabledBorder(OutlineInputBorder? newEnabledBorder) {
|
||||
enabledBorder = newEnabledBorder;
|
||||
}
|
||||
|
||||
void setErrorBorder(OutlineInputBorder newErrorBorder) {
|
||||
void setErrorBorder(OutlineInputBorder? newErrorBorder) {
|
||||
errorBorder = newErrorBorder;
|
||||
}
|
||||
|
||||
@@ -48,10 +54,14 @@ abstract class InputDecorationBuilder {
|
||||
errorText = newText;
|
||||
}
|
||||
|
||||
void setErrorTextStyle(TextStyle newStyle) {
|
||||
void setErrorTextStyle(TextStyle? newStyle) {
|
||||
errorTextStyle = newStyle;
|
||||
}
|
||||
|
||||
void setFocusBorder(OutlineInputBorder focusBorder) {
|
||||
focusBorder = focusBorder;
|
||||
}
|
||||
|
||||
InputDecoration build() {
|
||||
return InputDecoration(
|
||||
prefixText: prefixText,
|
||||
@@ -63,6 +73,8 @@ abstract class InputDecorationBuilder {
|
||||
errorBorder: errorBorder,
|
||||
errorText: errorText,
|
||||
errorStyle: errorTextStyle,
|
||||
enabledBorder: enabledBorder);
|
||||
enabledBorder: enabledBorder,
|
||||
focusedBorder: focusBorder
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user