diff --git a/lib/features/screens/settings/settings_screen.dart b/lib/features/screens/settings/settings_screen.dart index bc96802..f66586f 100644 --- a/lib/features/screens/settings/settings_screen.dart +++ b/lib/features/screens/settings/settings_screen.dart @@ -8,6 +8,7 @@ import 'package:sapaly_shop/features/screens/drawer/sapaly_drawer.dart'; import 'package:sapaly_shop/features/widgets/sapaly_app_bar.dart'; import 'package:sapaly_shop/models/settings_model.dart'; import 'package:sapaly_shop/providers/user_provider.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher_string.dart'; import '../../../themes/app_theme.dart'; @@ -24,6 +25,7 @@ class _ProfileScreenState extends State { Widget build(BuildContext context) { var me = Provider.of(context, listen: false); final GlobalKey _key = GlobalKey(); + String email = 'demir.at@gmail.com'; return Scaffold( drawer: SapalyDrawer(), backgroundColor: AppTheme.lightBackgroundColor, @@ -185,54 +187,54 @@ class _ProfileScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - children: [ - GestureDetector( - onTap: () { - launchUrlString('tel://+99361445445'); - Navigator.of(context).pop(); - }, - child: const Icon(Icons.phone_outlined, + GestureDetector( + onTap: () { + launchUrlString('tel://+99361445445'); + }, + child: Row( + children: [ + const Icon(Icons.phone_outlined, color: AppTheme.lightPrimaryColor), - ), - SizedBox(width: 10.adaptedPx()), - Text( - '+993 61 445445', - style: Theme.of(context) - .primaryTextTheme - .bodyMedium - ?.copyWith( - fontSize: 15.adaptedPx(), - fontWeight: FontWeight.w600, - color: AppTheme.blackColor, - ), - ), - ], + SizedBox(width: 10.adaptedPx()), + Text( + '+993 61 445445', + style: Theme.of(context) + .primaryTextTheme + .bodyMedium + ?.copyWith( + fontSize: 15.adaptedPx(), + fontWeight: FontWeight.w600, + color: AppTheme.blackColor, + ), + ), + ], + ), ), SizedBox(height: 15.adaptedPx()), - Row( - children: [ - GestureDetector( - onTap: () { - launchUrlString('mailto://demir.at@gmail.com'); - Navigator.of(context).pop(); - }, - child: const Icon(Icons.mail_outline, + GestureDetector( + onTap: () async { + if (await canLaunchUrlString("mailto:$email")) { + await launchUrlString("mailto:$email"); + } + }, + child: Row( + children: [ + const Icon(Icons.mail_outline, color: AppTheme.lightPrimaryColor), - ), - SizedBox(width: 10.adaptedPx()), - Text( - 'demir.at@gmail.com', - style: Theme.of(context) - .primaryTextTheme - .bodyMedium - ?.copyWith( - fontSize: 15.adaptedPx(), - fontWeight: FontWeight.w600, - color: AppTheme.blackColor, - ), - ), - ], + SizedBox(width: 10.adaptedPx()), + Text( + 'demir.at@gmail.com', + style: Theme.of(context) + .primaryTextTheme + .bodyMedium + ?.copyWith( + fontSize: 15.adaptedPx(), + fontWeight: FontWeight.w600, + color: AppTheme.blackColor, + ), + ), + ], + ), ), SizedBox(height: 15.adaptedPx()), Row( diff --git a/lib/main.dart b/lib/main.dart index e9ef2c0..c037bd1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,7 +20,7 @@ import 'models/settings_model.dart'; Future main() async { WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); - Future.delayed(const Duration(seconds: 3)); + Future.delayed(const Duration(seconds: 5)); SharedPreferences prefs = await SharedPreferences.getInstance(); await SettingsModel.initLocalization( prefs.getString('language') ?? kDefaultLanguage); diff --git a/pubspec.yaml b/pubspec.yaml index 93e5a55..2e8e648 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,7 @@ dependencies: photo_view: ^0.14.0 flutter_native_splash: - color: "#5677fc" + color: "#728efd" image: "assets/images/logoBig.png" # android_gravity: center fullscreen: true