profile pages

profile
Othmane BENJELLOUN 1 year ago
parent 2c8814543a
commit edea6539aa

@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
import 'package:responsive_builder/responsive_builder.dart';
import 'package:smartfit_app_mobile/view/profile/mobile/mobile_change_email.dart';
import 'package:smartfit_app_mobile/view/profile/mobile/mobile_change_username.dart';
import 'package:smartfit_app_mobile/view/profile/web/web_change_email.dart';
import 'package:smartfit_app_mobile/view/profile/web/web_change_username.dart';
class ChangeEmailView extends StatefulWidget {
const ChangeEmailView({super.key});
@override
State<ChangeEmailView> createState() => _ChangeEmailViewState();
}
class _ChangeEmailViewState extends State<ChangeEmailView> {
@override
Widget build(BuildContext context) {
return ScreenTypeLayout.builder(
mobile: (_) => const MobileChangeEmailView(),
desktop: (_) => const WebChangeEmailView(),
);
}
}

@ -1,6 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:responsive_builder/responsive_builder.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
import 'package:smartfit_app_mobile/view/profile/mobile/mobile_change_password.dart';
import 'package:smartfit_app_mobile/view/profile/web/web_change_password.dart';
import '../../common/colo_extension.dart';
@ -8,103 +12,15 @@ class ChangePasswordView extends StatefulWidget {
const ChangePasswordView({super.key});
@override
State<ChangePasswordView> createState() => _ChangeUsernameViewState();
State<ChangePasswordView> createState() => _ChangePasswordViewState();
}
class _ChangeUsernameViewState extends State<ChangePasswordView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
@override
class _ChangePasswordViewState extends State<ChangePasswordView> {
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son Mot de passe",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 200.0),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Ancien mot de passe",
icon: "assets/img/lock.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.04),
RoundTextField(
controller: controllerTextPassword,
hitText: "Nouveau mot de passe",
icon: "assets/img/lock.svg",
obscureText: true,
rigtIcon: TextButton(
onPressed: () {},
child: Container(
alignment: Alignment.center,
width: 20,
height: 20,
child: SvgPicture.asset(
"assets/img/show_password.svg",
width: 20,
height: 20,
fit: BoxFit.contain,
),
),
),
),
],
),
),
],
),
),
],
),
return ScreenTypeLayout.builder(
mobile: (_) => const MobileChangePasswordView(),
desktop: (_) => const WebChangePasswordView(),
);
}
}
}

@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:responsive_builder/responsive_builder.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
import 'package:smartfit_app_mobile/view/profile/mobile/mobile_change_username.dart';
import 'package:smartfit_app_mobile/view/profile/web/web_change_username.dart';
import '../../common/colo_extension.dart';
@ -13,82 +16,11 @@ class ChangeUsernameView extends StatefulWidget {
}
class _ChangeUsernameViewState extends State<ChangeUsernameView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
@override
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son pseudo",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 200.0),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Nouveau pseudo",
icon: "assets/img/email.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.04),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
return ScreenTypeLayout.builder(
mobile: (_) => const MobileChangeUsernameView(),
desktop: (_) => const WebChangeUsernameView(),
);
}
}
}

@ -0,0 +1,123 @@
import 'package:flutter/material.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
class ContactUsView extends StatelessWidget {
const ContactUsView({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10),
),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Nous Contacter",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.w700,
),
),
),
backgroundColor: TColor.white,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(height: media.width * 0.02),
const Text(
"Vous pouvez nous contacter pour toute question, suggestion ou problème concernant notre application SmartFit.",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.05),
const Text(
"Adresse e-mail",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"contact@smartfitapp.com",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Téléphone",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"+1234567890",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Adresse",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"123 Rue SmartFit, Ville, Pays",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Heures de bureau",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"Lundi - Vendredi : 9h00 - 18h00",
style: TextStyle(
fontSize: 16,
),
),
],
),
),
),
);
}
}

@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class MobileChangeEmailView extends StatefulWidget {
const MobileChangeEmailView({super.key});
@override
State<MobileChangeEmailView> createState() => _MobileChangeEmailViewState();
}
class _MobileChangeEmailViewState extends State<MobileChangeEmailView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
String oldUsername = "Ancien e-mail";
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son e-mail",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.07,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Column(
children: [
Row(
children: [
Text(
"Ancien e-mail : ",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Text(
oldUsername, // Utilisez votre ancien pseudo ici
style: TextStyle(
color: TColor.black,
fontSize: 16,
),
),
],
),
SizedBox(height: media.width * 0.07),
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Nouveau e-mail",
icon: "assets/img/user_text.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.07),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -0,0 +1,113 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class MobileChangePasswordView extends StatefulWidget {
const MobileChangePasswordView({super.key});
@override
State<MobileChangePasswordView> createState() => _MobileChangePasswordViewState();
}
class _MobileChangePasswordViewState extends State<MobileChangePasswordView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son Mot de passe",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
SizedBox(height: media.width * 0.05),
RoundTextField(
hitText: "Ancien mot de passe",
obscureText: true,
icon: "assets/img/lock.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.07),
RoundTextField(
controller: controllerTextPassword,
hitText: "Nouveau mot de passe",
icon: "assets/img/lock.svg",
obscureText: true,
),
SizedBox(height: media.width * 0.07),
RoundTextField(
controller: controllerTextPassword,
hitText: "Confirmer nouveau mot de passe",
icon: "assets/img/lock.svg",
obscureText: true,
),
SizedBox(height: media.width * 0.07),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class MobileChangeUsernameView extends StatefulWidget {
const MobileChangeUsernameView({super.key});
@override
State<MobileChangeUsernameView> createState() => _MobileChangeUsernameViewState();
}
class _MobileChangeUsernameViewState extends State<MobileChangeUsernameView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
String oldUsername = "Ancien pseudo";
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son pseudo",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.07,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Column(
children: [
Row(
children: [
Text(
"Ancien pseudo : ",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Text(
oldUsername, // Utilisez votre ancien pseudo ici
style: TextStyle(
color: TColor.black,
fontSize: 16,
),
),
],
),
SizedBox(height: media.width * 0.07),
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Nouveau pseudo",
icon: "assets/img/user_text.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.07),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -4,6 +4,11 @@ import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/setting_row.dart';
import 'package:smartfit_app_mobile/common_widget/title_subtitle_cell.dart';
import 'package:smartfit_app_mobile/view/profile/change_password.dart';
import 'package:smartfit_app_mobile/view/profile/change_email.dart';
import 'package:smartfit_app_mobile/view/profile/change_username.dart';
import 'package:smartfit_app_mobile/view/profile/contact_us_view.dart';
import 'package:smartfit_app_mobile/view/profile/policy_view.dart';
class MobileProfileView extends StatefulWidget {
const MobileProfileView({super.key});
@ -18,9 +23,19 @@ class _MobileProfileView extends State<MobileProfileView> {
List accountArr = [
{
"image": "assets/img/p_personal.png",
"name": "Données personnelles",
"name": "Changer son pseudo",
"tag": "1"
},
{
"image": "assets/img/p_personal.png",
"name": "Changer son email",
"tag": "3"
},
{
"image": "assets/img/p_personal.png",
"name": "Changer son mot de passe",
"tag": "2"
},
];
List otherArr = [
@ -190,14 +205,37 @@ class _MobileProfileView extends State<MobileProfileView> {
shrinkWrap: true,
itemCount: accountArr.length,
itemBuilder: (context, index) {
var iObj = accountArr[index] as Map? ?? {};
var iObj = accountArr[index];
return SettingRow(
icon: iObj["image"].toString(),
title: iObj["name"].toString(),
onPressed: () {},
icon: iObj["image"]!,
title: iObj["name"]!,
onPressed: () {
if (iObj["tag"] == "1") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeUsernameView(),
),
);
} else if (iObj["tag"] == "2") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangePasswordView(),
),
);
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeEmailView(),
),
);
}
},
);
},
)
),
],
),
),
@ -345,7 +383,25 @@ class _MobileProfileView extends State<MobileProfileView> {
return SettingRow(
icon: iObj["image"].toString(),
title: iObj["name"].toString(),
onPressed: () {},
onPressed: () {
if (iObj["tag"] == "6") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PrivacyPolicyView(),
),
);
} else if (iObj["tag"] == "5") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ContactUsView(),
),
);
} else {
// Autre logique si nécessaire pour d'autres éléments de la liste
}
},
);
},
)

@ -0,0 +1,197 @@
import 'package:flutter/material.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
class PrivacyPolicyView extends StatelessWidget {
const PrivacyPolicyView({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10),
),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Politique de confidentialité",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.w700,
),
),
),
backgroundColor: TColor.white,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Text(
"Politique de confidentialité de SmartFit",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Cette Politique de confidentialité explique comment SmartFit collecte, utilise, protège et partage vos informations lorsque vous utilisez notre application mobile SmartFit.",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.05),
const Text(
"Collecte et Utilisation des Informations",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: media.width * 0.02),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"SmartFit recueille des données uniquement dans le but d'analyser et d'afficher des informations relatives à vos activités physiques à partir des données collectées par votre montre connectée. Ces informations peuvent inclure, sans toutefois s'y limiter :",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"• Données d'activité physique (comme la fréquence cardiaque, le nombre de pas, la distance parcourue, etc.)",
style: TextStyle(
fontSize: 16,
),
),
Text(
"• Données sur les habitudes de sommeil",
style: TextStyle(
fontSize: 16,
),
),
Text(
"• Informations de localisation (si l'option est activée par l'utilisateur)",
style: TextStyle(
fontSize: 16,
),
),
Text(
"• Préférences de l'utilisateur concernant les paramètres de l'application",
style: TextStyle(
fontSize: 16,
),
),
Text(
"Ces informations sont utilisées pour générer des graphiques, des statistiques et des recommandations personnalisées afin de vous aider dans vos objectifs de remise en forme.",
style: TextStyle(
fontSize: 16,
),
),
],
),
],
),
SizedBox(height: media.width * 0.05),
const Text(
"Protection des Informations",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"SmartFit attache une grande importance à la sécurité de vos données. Nous mettons en place des mesures techniques et organisationnelles appropriées pour protéger vos informations contre tout accès non autorisé, altération, divulgation ou destruction.",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Partage des Informations",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"Les données collectées par SmartFit ne seront pas partagées, vendues ou louées à des tiers à des fins de marketing ou de publicité sans votre consentement explicite.",
style: TextStyle(
fontSize: 16,
),
),
const Text(
"Cependant, il est possible que nous partagions des informations avec des prestataires de services tiers qui nous aident à fournir et à améliorer notre application. Ces tiers sont tenus de protéger vos informations conformément à cette Politique de confidentialité.",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Modifications de la Politique de Confidentialité",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"SmartFit se réserve le droit de mettre à jour cette Politique de confidentialité de temps à autre. Les modifications seront publiées sur cette page et entreront en vigueur dès leur publication.",
style: TextStyle(
fontSize: 16,
),
),
SizedBox(height: media.width * 0.02),
const Text(
"Consentement",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const Text(
"En utilisant l'application SmartFit, vous consentez à la collecte et à l'utilisation de vos informations telles que décrites dans cette Politique de confidentialité.",
style: TextStyle(
fontSize: 16,
),
),
const Text(
"Pour toute question concernant cette Politique de confidentialité, veuillez nous contacter à l'adresse suivante : smartfit.contact@gmail.com",
style: TextStyle(
fontSize: 16,
),
),
],
),
),
),
);
}
}

@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class WebChangeEmailView extends StatefulWidget {
const WebChangeEmailView({super.key});
@override
State<WebChangeEmailView> createState() => _WebChangeEmailViewState();
}
class _WebChangeEmailViewState extends State<WebChangeEmailView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
String oldUsername = "Ancien e-mail";
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son e-mail",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 200.0),
child: Column(
children: [
Row(
children: [
Text(
"Ancien e-mail : ",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Text(
oldUsername,
style: TextStyle(
color: TColor.black,
fontSize: 16,
),
),
],
),
SizedBox(height: media.width * 0.04),
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Nouveau pseudo",
icon: "assets/img/user_text.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.04),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -0,0 +1,112 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class WebChangePasswordView extends StatefulWidget {
const WebChangePasswordView({super.key});
@override
State<WebChangePasswordView> createState() => _WebChangePasswordViewState();
}
class _WebChangePasswordViewState extends State<WebChangePasswordView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son Mot de passe",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 200.0),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Ancien mot de passe",
obscureText: true,
icon: "assets/img/lock.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.02),
RoundTextField(
controller: controllerTextPassword,
hitText: "Nouveau mot de passe",
icon: "assets/img/lock.svg",
obscureText: true,
),
SizedBox(height: media.width * 0.02),
RoundTextField(
controller: controllerTextPassword,
hitText: "Confirmer nouveau mot de passe",
icon: "assets/img/lock.svg",
obscureText: true,
),
SizedBox(height: media.width * 0.04),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/button/round_button.dart';
import 'package:smartfit_app_mobile/common_widget/text_field/round_text_field.dart';
class WebChangeUsernameView extends StatefulWidget {
const WebChangeUsernameView({super.key});
@override
State<WebChangeUsernameView> createState() => _WebChangeUsernameViewState();
}
class _WebChangeUsernameViewState extends State<WebChangeUsernameView> {
final TextEditingController controllerTextEmail = TextEditingController();
final TextEditingController controllerTextPassword = TextEditingController();
String oldUsername = "Ancien pseudo";
@override
Widget build(BuildContext context) {
var media = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: const EdgeInsets.all(8),
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/black_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
),
title: Text(
"Changer son pseudo",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
),
backgroundColor: TColor.white,
body: Column(
children: [
SizedBox(
height: media.width * 0.05,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 200.0),
child: Column(
children: [
Row(
children: [
Text(
"Ancien pseudo : ",
style: TextStyle(
color: TColor.black,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Text(
oldUsername, // Utilisez votre ancien pseudo ici
style: TextStyle(
color: TColor.black,
fontSize: 16,
),
),
],
),
SizedBox(height: media.width * 0.04),
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(15),
),
child: Column(
children: [
RoundTextField(
hitText: "Nouveau pseudo",
icon: "assets/img/user_text.svg",
keyboardType: TextInputType.text,
controller: controllerTextEmail,
),
SizedBox(height: media.width * 0.04),
RoundButton(
title: "Confirmer",
onPressed: () {}),
],
),
),
],
),
),
],
),
);
}
}

@ -6,7 +6,10 @@ import 'package:smartfit_app_mobile/common_widget/setting_row.dart';
import 'package:smartfit_app_mobile/common_widget/title_subtitle_cell.dart';
import 'package:smartfit_app_mobile/view/home/notification_view.dart';
import 'package:smartfit_app_mobile/view/profile/change_password.dart';
import 'package:smartfit_app_mobile/view/profile/change_email.dart';
import 'package:smartfit_app_mobile/view/profile/change_username.dart';
import 'package:smartfit_app_mobile/view/profile/contact_us_view.dart';
import 'package:smartfit_app_mobile/view/profile/policy_view.dart';
class WebProfileView extends StatefulWidget {
const WebProfileView({super.key});
@ -24,6 +27,11 @@ class _WebProfileView extends State<WebProfileView> {
"name": "Changer son pseudo",
"tag": "1"
},
{
"image": "assets/img/p_personal.png",
"name": "Changer son email",
"tag": "3"
},
{
"image": "assets/img/p_personal.png",
"name": "Changer son mot de passe",
@ -218,7 +226,12 @@ class _WebProfileView extends State<WebProfileView> {
),
);
} else {
// Autre logique si nécessaire pour d'autres éléments de la liste
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeEmailView(),
),
);
}
},
);
@ -371,7 +384,25 @@ class _WebProfileView extends State<WebProfileView> {
return SettingRow(
icon: iObj["image"].toString(),
title: iObj["name"].toString(),
onPressed: () {},
onPressed: () {
if (iObj["tag"] == "6") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const PrivacyPolicyView(),
),
);
} else if (iObj["tag"] == "5") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ContactUsView(),
),
);
} else {
// Autre logique si nécessaire pour d'autres éléments de la liste
}
},
);
},
)

Loading…
Cancel
Save