commit
9a2b7e4fb2
@ -0,0 +1,6 @@
|
|||||||
|
class AttributUser {
|
||||||
|
final String _email = "email";
|
||||||
|
final String _username = "username";
|
||||||
|
String get email => _email;
|
||||||
|
String get username => _username;
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
class AttributFileFit {
|
||||||
|
// Ajouter une variable privé qui contient le champs + un getter
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:smartfit_app_mobile/modele/api/i_data_strategy.dart';
|
||||||
|
import 'package:smartfit_app_mobile/modele/api/request_api.dart';
|
||||||
|
import 'package:smartfit_app_mobile/modele/manager_file.dart';
|
||||||
|
import 'package:smartfit_app_mobile/modele/user.dart';
|
||||||
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
class ListActivityUtile {
|
||||||
|
final IDataStrategy _strategy = RequestApi();
|
||||||
|
final ManagerFile _managerFile = ManagerFile();
|
||||||
|
|
||||||
|
Future<void> getContentOnTheFirstFileMobile(BuildContext context) async {
|
||||||
|
Tuple2 result = await _strategy.getFile(
|
||||||
|
Provider.of<User>(context, listen: false).token,
|
||||||
|
Provider.of<User>(context, listen: false).listActivity[0].fileUuid);
|
||||||
|
if (result.item1 == false) {
|
||||||
|
//Erreur
|
||||||
|
//print(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
File file = File(
|
||||||
|
"${await _managerFile.localPath}/${Provider.of<User>(context, listen: false).listActivity[0].nameFile}");
|
||||||
|
await file.create();
|
||||||
|
await file.writeAsBytes(result.item2);
|
||||||
|
Provider.of<User>(context, listen: false).listActivity[0].contentActivity =
|
||||||
|
await _managerFile.readFitFileWhithFile(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getContentOnTheFirstFileWeb(BuildContext context) async {
|
||||||
|
User user = Provider.of<User>(context, listen: false);
|
||||||
|
Tuple2 result =
|
||||||
|
await _strategy.getFile(user.token, user.listActivity[0].fileUuid);
|
||||||
|
if (result.item1 == false) {
|
||||||
|
//Erreur
|
||||||
|
//print(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Provider.of<User>(context, listen: false).listActivity[0].contentActivity =
|
||||||
|
await _managerFile.readFitFileWeb(result.item2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:smartfit_app_mobile/modele/api/i_data_strategy.dart';
|
||||||
|
import 'package:smartfit_app_mobile/modele/api/request_api.dart';
|
||||||
|
|
||||||
|
class ProfileUtil {
|
||||||
|
final IDataStrategy _dataStrategy = RequestApi();
|
||||||
|
|
||||||
|
void modifyDataUser(String token, String attribut, String newUsername) {
|
||||||
|
_dataStrategy.modifAttribut(token, attribut, newUsername);
|
||||||
|
}
|
||||||
|
}
|
@ -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(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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: () {}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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 email",
|
||||||
|
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: () {}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue