Item View
This commit is contained in:
+99
-13
@@ -1,5 +1,8 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_large.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/custom/profile_picture.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/edit_profil.dart';
|
||||
|
||||
class ProfileView extends StatefulWidget {
|
||||
@override
|
||||
@@ -10,19 +13,102 @@ class _ProfileViewState extends State<ProfileView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
"Mon Profil",
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
leading: Builder(builder: (BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
child: Image.asset("assets/images/kiosque_logo.png"),
|
||||
);
|
||||
}),
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
_buildProfileHeader(),
|
||||
SizedBox(height: 48),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 16,
|
||||
top: 34,
|
||||
right: 16,
|
||||
bottom: 16,
|
||||
),
|
||||
child: Text(
|
||||
"A lire plus tard",
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Text("ssdsfdss")
|
||||
)
|
||||
],
|
||||
),
|
||||
body: Container(),
|
||||
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||
floatingActionButton: Visibility(
|
||||
child: FloatingActionButton.extended(
|
||||
onPressed: () => _showEditProfileView(context),
|
||||
label: const Text('Editer', style: TextStyle(color: Color(0XFFFF567E))),
|
||||
icon: const Icon(Icons.edit, color: Color(0XFFFF567E)),
|
||||
backgroundColor: Colors.white,
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildProfileBody() {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF8F8F8),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(30),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildProfileHeader() {
|
||||
final imageUrl = FirebaseAuth.instance.currentUser.photoURL;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: ProfilePicture(imageUrl: imageUrl),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Eric Ampire",
|
||||
style: TextStyle(
|
||||
fontSize: 26,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
Icons.location_on,
|
||||
color: Color(0xFFA5A5A5),
|
||||
size: 17,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Lubumbashi",
|
||||
style: TextStyle(color: Colors.grey),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_showEditProfileView(BuildContext context) {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (BuildContext context) => EditProfileView(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user