feat: enhance profile input fields with new styling and customization options, and update calendar and location icons
This commit is contained in:
@@ -129,7 +129,6 @@ class _ChangePasswordTabState extends ConsumerState<ChangePasswordTab> {
|
||||
TextField(
|
||||
controller: controller,
|
||||
obscureText: obscure,
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
@@ -137,9 +136,8 @@ class _ChangePasswordTabState extends ConsumerState<ChangePasswordTab> {
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
contentPadding:
|
||||
const EdgeInsets.fromLTRB(12, 12, 8, 12),
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
|
||||
border: border,
|
||||
enabledBorder: border,
|
||||
focusedBorder: border,
|
||||
|
||||
@@ -134,7 +134,7 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 39),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Avatar
|
||||
Center(
|
||||
@@ -231,7 +231,7 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 49),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
ProfileFormField(label: 'Full Name', controller: _fullNameController),
|
||||
const SizedBox(height: 24),
|
||||
@@ -244,12 +244,14 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
|
||||
ProfileFormField(
|
||||
label: 'Email Address',
|
||||
controller: _emailController,
|
||||
enabled: false),
|
||||
enabled: false,
|
||||
textCapitalization: TextCapitalization.none),
|
||||
const SizedBox(height: 24),
|
||||
ProfileFormField(
|
||||
label: 'Phone Number',
|
||||
controller: _phoneController,
|
||||
keyboardType: TextInputType.phone),
|
||||
keyboardType: TextInputType.phone,
|
||||
textCapitalization: TextCapitalization.none),
|
||||
const SizedBox(height: 24),
|
||||
ProfileFormField(
|
||||
label: isAgent ? 'Service Areas' : 'Location',
|
||||
|
||||
@@ -7,6 +7,9 @@ class ProfileFormField extends StatelessWidget {
|
||||
final bool enabled;
|
||||
final TextInputType? keyboardType;
|
||||
final IconData? prefixIcon;
|
||||
final TextCapitalization textCapitalization;
|
||||
final bool obscureText;
|
||||
final Widget? suffixIcon;
|
||||
|
||||
const ProfileFormField({
|
||||
super.key,
|
||||
@@ -15,6 +18,9 @@ class ProfileFormField extends StatelessWidget {
|
||||
this.enabled = true,
|
||||
this.keyboardType,
|
||||
this.prefixIcon,
|
||||
this.textCapitalization = TextCapitalization.words,
|
||||
this.obscureText = false,
|
||||
this.suffixIcon,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -45,6 +51,9 @@ class ProfileFormField extends StatelessWidget {
|
||||
controller: controller,
|
||||
enabled: enabled,
|
||||
keyboardType: keyboardType,
|
||||
textCapitalization: textCapitalization,
|
||||
obscureText: obscureText,
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
@@ -52,8 +61,9 @@ class ProfileFormField extends StatelessWidget {
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 26, vertical: 8),
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
border: border,
|
||||
enabledBorder: border,
|
||||
focusedBorder: border,
|
||||
@@ -64,6 +74,7 @@ class ProfileFormField extends StatelessWidget {
|
||||
prefixIconConstraints: prefixIcon != null
|
||||
? const BoxConstraints(minWidth: 40)
|
||||
: null,
|
||||
suffixIcon: suffixIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user