contacts ui bug solved
This commit is contained in:
parent
2678e04975
commit
66da382029
|
|
@ -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">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine 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>
|
||||
</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.
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -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,219 +76,238 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
|||
vertical: GlobalVariables.verticalPadding(context),
|
||||
horizontal: GlobalVariables.horizontalPadding(context),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CustomTextField(
|
||||
labelText: 'first_name'.translation,
|
||||
hintText: 'first_name'.translation,
|
||||
controller: firstNameController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.text,
|
||||
isPassword: false,
|
||||
contentPadding: 0,
|
||||
),
|
||||
CustomTextField(
|
||||
labelText: 'email'.translation,
|
||||
hintText: 'email'.translation,
|
||||
controller: emailController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.emailAddress,
|
||||
isPassword: false,
|
||||
contentPadding: 0,
|
||||
),
|
||||
CustomTextField(
|
||||
labelText: 'subject'.translation,
|
||||
hintText: 'subject'.translation,
|
||||
controller: subjectController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.text,
|
||||
isPassword: false,
|
||||
contentPadding: 0,
|
||||
),
|
||||
SizedBox(
|
||||
height: GlobalVariables.deviceHeight(context) / 6,
|
||||
child: CustomTextField(
|
||||
labelText: 'message'.translation,
|
||||
hintText: 'message'.translation,
|
||||
controller: messageController,
|
||||
child: ScrollConfiguration(
|
||||
behavior: CustomScrollBehavior(),
|
||||
child: ListView(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CustomTextField(
|
||||
labelText: 'first_name'.translation,
|
||||
hintText: 'first_name'.translation,
|
||||
controller: firstNameController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.text,
|
||||
isPassword: false,
|
||||
contentPadding: 100.adaptedPx(),
|
||||
contentPadding: 0,
|
||||
),
|
||||
),
|
||||
CustomButton(
|
||||
name: 'send_message'.translation,
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => me.user.token.isEmpty
|
||||
? const UnAuthenticated()
|
||||
: const HomeScreen(),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: GlobalVariables.verticalPadding(context),
|
||||
),
|
||||
child: CustomTextField(
|
||||
labelText: 'email'.translation,
|
||||
hintText: 'email'.translation,
|
||||
controller: emailController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.emailAddress,
|
||||
isPassword: false,
|
||||
contentPadding: 0,
|
||||
),
|
||||
),
|
||||
CustomTextField(
|
||||
labelText: 'subject'.translation,
|
||||
hintText: 'subject'.translation,
|
||||
controller: subjectController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.text,
|
||||
isPassword: false,
|
||||
contentPadding: 0,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: GlobalVariables.verticalPadding(context),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: GlobalVariables.deviceHeight(context) / 6,
|
||||
child: CustomTextField(
|
||||
labelText: 'message'.translation,
|
||||
hintText: 'message'.translation,
|
||||
controller: messageController,
|
||||
obscureText: false,
|
||||
inputType: TextInputType.text,
|
||||
isPassword: false,
|
||||
contentPadding: 100.adaptedPx(),
|
||||
),
|
||||
);
|
||||
},
|
||||
backgroundColor: AppTheme.lightPrimaryColor,
|
||||
isMain: true,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.location_on_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
'our_location'.translation,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
CustomButton(
|
||||
name: 'send_message'.translation,
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => me.user.token.isEmpty
|
||||
? const UnAuthenticated()
|
||||
: const HomeScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
backgroundColor: AppTheme.lightPrimaryColor,
|
||||
isMain: true,
|
||||
),
|
||||
subtitle: Text(
|
||||
'Turkmenistan, Ashgabat city, Galkynysh, street 66(old printing house)',
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.location_on_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'our_location'.translation,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'Turkmenistan, Ashgabat city, Galkynysh, street 66(old printing house)',
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.email_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'email'.translation,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'enquery@gmail.com help@yourdomain.com',
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (await canLaunchUrlString("mailto:$mail1")) {
|
||||
await launchUrlString("mailto:$mail1");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
mail1,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.email_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'email'.translation,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'enquery@gmail.com help@yourdomain.com',
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (await canLaunchUrlString("mailto:$mail1")) {
|
||||
await launchUrlString("mailto:$mail1");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
mail1,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (await canLaunchUrlString("mailto:$mail2")) {
|
||||
await launchUrlString("mailto:$mail2");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
mail2,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (await canLaunchUrlString("mailto:$mail2")) {
|
||||
await launchUrlString("mailto:$mail2");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
mail2,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.phone_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'contacts'.translation,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
subtitle: Text(
|
||||
'$number1 $number2',
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.phone_outlined,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'contacts'.translation,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'$number1 $number2',
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
launchUrlString('tel://$number1');
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
number1,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
launchUrlString('tel://$number2');
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
number2,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
launchUrlString('tel://$number1');
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
number1,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
launchUrlString('tel://$number2');
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
number2,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontSize: 20.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -156,34 +156,55 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SapalyIcon(
|
||||
onTap: () async {
|
||||
var lang =
|
||||
await languagePicker(context, settings.currentLanguage);
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 15.adaptedPx(),
|
||||
horizontal: 5.adaptedPx(),
|
||||
),
|
||||
child: GestureDetector(
|
||||
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,
|
||||
child: SvgPicture.asset('assets/icons/lang.svg'),
|
||||
),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
'currentLang'.translation,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
if (lang != null) {
|
||||
await settings.setLanguage(lang);
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.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,
|
||||
child: SvgPicture.asset('assets/icons/lang.svg'),
|
||||
),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
'currentLang'.translation,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium
|
||||
?.copyWith(
|
||||
color: AppTheme.blackColor,
|
||||
fontSize: 15.adaptedPx(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"first_name":"Ваше имя",
|
||||
"subject":"Тема сообщения",
|
||||
"message":"Ваше сообщение...",
|
||||
"needToEnter":"Чтобы воспользоваться услугой авторизуйтесь",
|
||||
"needToEnter":"Чтобы воспользоваться\nуслугой авторизуйтесь",
|
||||
"error_occured":"Произошла ошибка",
|
||||
"info_about_user":"Информация о пользователе",
|
||||
"edit":"Редактировать"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue