duplication profil
continuous-integration/drone/push Build is passing Details

pull/4/head
Enzo 1 year ago
parent 624993f516
commit 9ac8265008

@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_compte.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_entete.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_info_user.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_notification.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_other.dart';
import 'package:smartfit_app_mobile/modele/user.dart';
class ProfileViewAllPlatforme extends StatefulWidget {
const ProfileViewAllPlatforme(this.positive, this.accountArr, this.otherArr,
{super.key});
final bool positive;
final List accountArr;
final List otherArr;
@override
State<ProfileViewAllPlatforme> createState() => _ProfileViewAllPlatforme();
}
class _ProfileViewAllPlatforme extends State<ProfileViewAllPlatforme> {
@override
Widget build(BuildContext context) {
String username = context.watch<User>().username;
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leadingWidth: 0,
title: Text(
"Profile",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
actions: [
InkWell(
onTap: () {},
child: Container(
margin: const EdgeInsets.all(8),
height: 20,
width: 20,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/more_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
)
],
),
backgroundColor: TColor.white,
body: SingleChildScrollView(
child: Container(
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ProfileEntete(username),
const SizedBox(
height: 15,
),
const ProfileInfoUser(),
const SizedBox(
height: 25,
),
ProfileCompte(widget.accountArr),
const SizedBox(
height: 25,
),
ProfileNotification(widget.positive),
const SizedBox(
height: 25,
),
ProfileOther(widget.otherArr)
],
),
),
),
);
}
}

@ -1,12 +1,5 @@
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_compte.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_entete.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_info_user.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_notification.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_other.dart';
import 'package:smartfit_app_mobile/modele/user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:smartfit_app_mobile/view/profile/all_platforme/profile_view_allplatforme.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
class MobileProfileView extends StatefulWidget { class MobileProfileView extends StatefulWidget {
const MobileProfileView({super.key}); const MobileProfileView({super.key});
@ -46,68 +39,6 @@ class _MobileProfileView extends State<MobileProfileView> {
]; ];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String username = context.watch<User>().username; return ProfileViewAllPlatforme(positive, accountArr, otherArr);
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leadingWidth: 0,
title: Text(
"Profile",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
actions: [
InkWell(
onTap: () {},
child: Container(
margin: const EdgeInsets.all(8),
height: 20,
width: 20,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/more_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
)
],
),
backgroundColor: TColor.white,
body: SingleChildScrollView(
child: Container(
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ProfileEntete(username),
const SizedBox(
height: 15,
),
const ProfileInfoUser(),
const SizedBox(
height: 25,
),
ProfileCompte(accountArr),
const SizedBox(
height: 25,
),
ProfileNotification(positive),
const SizedBox(
height: 25,
),
ProfileOther(otherArr)
],
),
),
),
);
} }
} }

@ -1,12 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:smartfit_app_mobile/view/profile/all_platforme/profile_view_allplatforme.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_compte.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_entete.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_info_user.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_notification.dart';
import 'package:smartfit_app_mobile/common_widget/container/profile/profile_other.dart';
import 'package:smartfit_app_mobile/modele/user.dart';
import 'package:smartfit_app_mobile/common/colo_extension.dart';
class WebProfileView extends StatefulWidget { class WebProfileView extends StatefulWidget {
const WebProfileView({super.key}); const WebProfileView({super.key});
@ -21,23 +14,27 @@ class _WebProfileView extends State<WebProfileView> {
List accountArr = [ List accountArr = [
{ {
"image": "assets/img/p_personal.png", "image": "assets/img/p_personal.png",
"name": "Changer son pseudo", "name": "Changer son pseudo ",
"tag": "1" "tag": "1"
}, },
{ {
"image": "assets/img/p_personal.png", "image": "assets/img/p_personal.png",
"name": "Changer son email", "name": "Changer son email ",
"tag": "3" "tag": "3"
}, },
{ {
"image": "assets/img/p_personal.png", "image": "assets/img/p_personal.png",
"name": "Changer son mot de passe", "name": "Changer son mot de passe ",
"tag": "2" "tag": "2"
}, },
]; ];
List otherArr = [ List otherArr = [
{"image": "assets/img/p_contact.png", "name": "Nous contacter", "tag": "5"}, {
"image": "assets/img/p_contact.png",
"name": "Nous contacter !!",
"tag": "5"
},
{ {
"image": "assets/img/p_privacy.png", "image": "assets/img/p_privacy.png",
"name": "Politique de confidentialité", "name": "Politique de confidentialité",
@ -46,68 +43,6 @@ class _WebProfileView extends State<WebProfileView> {
]; ];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String username = context.watch<User>().username; return ProfileViewAllPlatforme(positive, accountArr, otherArr);
return Scaffold(
appBar: AppBar(
backgroundColor: TColor.white,
centerTitle: true,
elevation: 0,
leadingWidth: 0,
title: Text(
"Profile",
style: TextStyle(
color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700),
),
actions: [
InkWell(
onTap: () {},
child: Container(
margin: const EdgeInsets.all(8),
height: 20,
width: 20,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TColor.lightGray,
borderRadius: BorderRadius.circular(10)),
child: Image.asset(
"assets/img/more_btn.png",
width: 15,
height: 15,
fit: BoxFit.contain,
),
),
)
],
),
backgroundColor: TColor.white,
body: SingleChildScrollView(
child: Container(
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ProfileEntete(username),
const SizedBox(
height: 15,
),
const ProfileInfoUser(),
const SizedBox(
height: 25,
),
ProfileCompte(accountArr),
const SizedBox(
height: 25,
),
ProfileNotification(positive),
const SizedBox(
height: 25,
),
ProfileOther(otherArr)
],
),
),
),
);
} }
} }

Loading…
Cancel
Save