contacts ui bug solved

This commit is contained in:
meylis98 2023-03-13 18:06:30 +05:00
parent 2678e04975
commit 66da382029
6 changed files with 272 additions and 242 deletions

View File

@ -1,21 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowFullscreen">true</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
</resources>
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -7,6 +7,7 @@ import 'package:provider/provider.dart';
import 'package:sapaly_shop/common/custom_button.dart';
import 'package:sapaly_shop/common/widgets/custom_text_field.dart';
import 'package:sapaly_shop/constants/global_variables.dart';
import 'package:sapaly_shop/constants/utils.dart';
import 'package:sapaly_shop/features/screens/drawer/sapaly_drawer.dart';
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
import 'package:sapaly_shop/features/services/auth_service.dart';
@ -75,8 +76,10 @@ class _ContactsScreenState extends State<ContactsScreen> {
vertical: GlobalVariables.verticalPadding(context),
horizontal: GlobalVariables.horizontalPadding(context),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: ScrollConfiguration(
behavior: CustomScrollBehavior(),
child: ListView(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomTextField(
labelText: 'first_name'.translation,
@ -87,7 +90,11 @@ class _ContactsScreenState extends State<ContactsScreen> {
isPassword: false,
contentPadding: 0,
),
CustomTextField(
Padding(
padding: EdgeInsets.symmetric(
vertical: GlobalVariables.verticalPadding(context),
),
child: CustomTextField(
labelText: 'email'.translation,
hintText: 'email'.translation,
controller: emailController,
@ -96,6 +103,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
isPassword: false,
contentPadding: 0,
),
),
CustomTextField(
labelText: 'subject'.translation,
hintText: 'subject'.translation,
@ -105,7 +113,11 @@ class _ContactsScreenState extends State<ContactsScreen> {
isPassword: false,
contentPadding: 0,
),
SizedBox(
Padding(
padding: EdgeInsets.symmetric(
vertical: GlobalVariables.verticalPadding(context),
),
child: SizedBox(
height: GlobalVariables.deviceHeight(context) / 6,
child: CustomTextField(
labelText: 'message'.translation,
@ -117,6 +129,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
contentPadding: 100.adaptedPx(),
),
),
),
CustomButton(
name: 'send_message'.translation,
onTap: () {
@ -138,7 +151,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
title: Text(
'our_location'.translation,
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 15.adaptedPx(),
fontWeight: FontWeight.w600,
color: AppTheme.blackColor,
@ -146,7 +160,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
subtitle: Text(
'Turkmenistan, Ashgabat city, Galkynysh, street 66(old printing house)',
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 13.adaptedPx(),
color: AppTheme.blackColor,
),
@ -159,7 +174,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
title: Text(
'email'.translation,
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 15.adaptedPx(),
fontWeight: FontWeight.w600,
color: AppTheme.blackColor,
@ -167,7 +183,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
subtitle: Text(
'enquery@gmail.com help@yourdomain.com',
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 13.adaptedPx(),
color: AppTheme.blackColor,
),
@ -229,7 +246,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
title: Text(
'contacts'.translation,
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 15.adaptedPx(),
fontWeight: FontWeight.w600,
color: AppTheme.blackColor,
@ -237,7 +255,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
subtitle: Text(
'$number1 $number2',
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
fontSize: 13.adaptedPx(),
color: AppTheme.blackColor,
),
@ -290,6 +309,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
],
),
),
),
);
}
}

View File

@ -156,9 +156,12 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
],
),
),
Row(
children: [
SapalyIcon(
Padding(
padding: EdgeInsets.symmetric(
vertical: 15.adaptedPx(),
horizontal: 5.adaptedPx(),
),
child: GestureDetector(
onTap: () async {
var lang =
await languagePicker(context, settings.currentLanguage);
@ -169,6 +172,20 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
.pushNamedAndRemoveUntil('/home', (route) => false);
}
},
child: Row(
children: [
SapalyIcon(
onTap: () async {
var lang = await languagePicker(
context, settings.currentLanguage);
if (lang != null) {
await settings.setLanguage(lang);
Navigator.of(context, rootNavigator: true)
.pushNamedAndRemoveUntil(
'/home', (route) => false);
}
},
width: 25.adaptedPx(),
height: 25.adaptedPx(),
hasBadge: false,
@ -177,14 +194,18 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
SizedBox(width: 10.adaptedPx()),
Text(
'currentLang'.translation,
style:
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
style: Theme.of(context)
.primaryTextTheme
.bodyMedium
?.copyWith(
color: AppTheme.blackColor,
fontSize: 15.adaptedPx(),
),
),
],
),
),
),
ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),

View File

@ -28,7 +28,7 @@
"first_name":"First name",
"subject":"Subject of message",
"message":"Your message...",
"needToEnter":"Log in to use the service",
"needToEnter":"Log in to use\nthe service",
"error_occured":"Error occured",
"info_about_user":"Information about user",
"edit":"Edit"

View File

@ -28,7 +28,7 @@
"first_name":"Ваше имя",
"subject":"Тема сообщения",
"message":"Ваше сообщение...",
"needToEnter":"Чтобы воспользоваться услугой авторизуйтесь",
"needToEnter":"Чтобы воспользоваться\nуслугой авторизуйтесь",
"error_occured":"Произошла ошибка",
"info_about_user":"Информация о пользователе",
"edit":"Редактировать"

View File

@ -28,7 +28,7 @@
"first_name":"Ady",
"subject":"Hatyň mowzugy",
"message":"Siziň hatyňyz...",
"needToEnter":"Hyzmaty ulanmak üçin ulgama giriň",
"needToEnter":"Hyzmaty ulanmak\nüçin ulgama giriň",
"error_occured":"Näsazlyk ýüze çykdy",
"info_about_user":"Ulanyjy barada maglumat",
"edit":"Üýtgetmek"