Item View
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
PODS:
|
PODS:
|
||||||
|
- advance_pdf_viewer (1.0.5):
|
||||||
|
- Flutter
|
||||||
- AppAuth (1.4.0):
|
- AppAuth (1.4.0):
|
||||||
- AppAuth/Core (= 1.4.0)
|
- AppAuth/Core (= 1.4.0)
|
||||||
- AppAuth/ExternalUserAgent (= 1.4.0)
|
- AppAuth/ExternalUserAgent (= 1.4.0)
|
||||||
@@ -45,6 +47,9 @@ PODS:
|
|||||||
- flutter_login_facebook (0.3.0):
|
- flutter_login_facebook (0.3.0):
|
||||||
- FBSDKLoginKit (~> 8.0)
|
- FBSDKLoginKit (~> 8.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- FMDB (2.7.5):
|
||||||
|
- FMDB/standard (= 2.7.5)
|
||||||
|
- FMDB/standard (2.7.5)
|
||||||
- google_sign_in (0.0.1):
|
- google_sign_in (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- GoogleSignIn (~> 5.0)
|
- GoogleSignIn (~> 5.0)
|
||||||
@@ -82,14 +87,22 @@ PODS:
|
|||||||
- nanopb/encode (= 1.30906.0)
|
- nanopb/encode (= 1.30906.0)
|
||||||
- nanopb/decode (1.30906.0)
|
- nanopb/decode (1.30906.0)
|
||||||
- nanopb/encode (1.30906.0)
|
- nanopb/encode (1.30906.0)
|
||||||
|
- path_provider (0.0.1):
|
||||||
|
- Flutter
|
||||||
- PromisesObjC (1.2.12)
|
- PromisesObjC (1.2.12)
|
||||||
|
- sqflite (0.0.2):
|
||||||
|
- Flutter
|
||||||
|
- FMDB (>= 2.7.5)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- advance_pdf_viewer (from `.symlinks/plugins/advance_pdf_viewer/ios`)
|
||||||
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_login_facebook (from `.symlinks/plugins/flutter_login_facebook/ios`)
|
- flutter_login_facebook (from `.symlinks/plugins/flutter_login_facebook/ios`)
|
||||||
- google_sign_in (from `.symlinks/plugins/google_sign_in/ios`)
|
- google_sign_in (from `.symlinks/plugins/google_sign_in/ios`)
|
||||||
|
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
||||||
|
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
@@ -100,6 +113,7 @@ SPEC REPOS:
|
|||||||
- FirebaseAuth
|
- FirebaseAuth
|
||||||
- FirebaseCore
|
- FirebaseCore
|
||||||
- FirebaseCoreDiagnostics
|
- FirebaseCoreDiagnostics
|
||||||
|
- FMDB
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleSignIn
|
- GoogleSignIn
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
@@ -109,6 +123,8 @@ SPEC REPOS:
|
|||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
advance_pdf_viewer:
|
||||||
|
:path: ".symlinks/plugins/advance_pdf_viewer/ios"
|
||||||
firebase_auth:
|
firebase_auth:
|
||||||
:path: ".symlinks/plugins/firebase_auth/ios"
|
:path: ".symlinks/plugins/firebase_auth/ios"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
@@ -119,8 +135,13 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/flutter_login_facebook/ios"
|
:path: ".symlinks/plugins/flutter_login_facebook/ios"
|
||||||
google_sign_in:
|
google_sign_in:
|
||||||
:path: ".symlinks/plugins/google_sign_in/ios"
|
:path: ".symlinks/plugins/google_sign_in/ios"
|
||||||
|
path_provider:
|
||||||
|
:path: ".symlinks/plugins/path_provider/ios"
|
||||||
|
sqflite:
|
||||||
|
:path: ".symlinks/plugins/sqflite/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
|
advance_pdf_viewer: 5c832f382b4ca84fe735f893b7e91aa830c27d7b
|
||||||
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
|
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
|
||||||
FBSDKCoreKit: 4afd6ff53d8133a433dbcda44451c9498f8c6ce4
|
FBSDKCoreKit: 4afd6ff53d8133a433dbcda44451c9498f8c6ce4
|
||||||
FBSDKLoginKit: 7181765f2524d7ebf82d9629066c8e6caafc99d0
|
FBSDKLoginKit: 7181765f2524d7ebf82d9629066c8e6caafc99d0
|
||||||
@@ -132,6 +153,7 @@ SPEC CHECKSUMS:
|
|||||||
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
|
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
|
||||||
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
|
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
|
||||||
flutter_login_facebook: 86e1415ecde2d59ca72c5760fd53d1d1952017fb
|
flutter_login_facebook: 86e1415ecde2d59ca72c5760fd53d1d1952017fb
|
||||||
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
google_sign_in: 6bd214b9c154f881422f5fe27b66aaa7bbd580cc
|
google_sign_in: 6bd214b9c154f881422f5fe27b66aaa7bbd580cc
|
||||||
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
|
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
|
||||||
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
|
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
|
||||||
@@ -139,7 +161,9 @@ SPEC CHECKSUMS:
|
|||||||
GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9
|
GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9
|
||||||
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
|
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
|
||||||
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
|
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
|
||||||
|
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
||||||
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
|
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
|
||||||
|
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||||
|
|
||||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
class Magazine {
|
||||||
|
final String uid;
|
||||||
|
final String title;
|
||||||
|
final String urlCover;
|
||||||
|
final DateTime publishedAt;
|
||||||
|
final DateTime createdAt;
|
||||||
|
final DateTime updatedAt;
|
||||||
|
final String summaryText;
|
||||||
|
final String summaryUrl;
|
||||||
|
final String magazineUrl;
|
||||||
|
final bool validated;
|
||||||
|
final String uidCategory;
|
||||||
|
|
||||||
|
Magazine({
|
||||||
|
this.validated,
|
||||||
|
this.uid,
|
||||||
|
this.title,
|
||||||
|
this.urlCover,
|
||||||
|
this.publishedAt,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
this.summaryText,
|
||||||
|
this.summaryUrl,
|
||||||
|
this.magazineUrl,
|
||||||
|
this.uidCategory,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
class KiosqueUser {
|
||||||
|
final String uid;
|
||||||
|
final String displayName;
|
||||||
|
final String city;
|
||||||
|
final String country;
|
||||||
|
final String phoneNumber;
|
||||||
|
final String emailAddress;
|
||||||
|
final String gender;
|
||||||
|
final String profileUrl;
|
||||||
|
|
||||||
|
KiosqueUser({
|
||||||
|
this.uid,
|
||||||
|
this.displayName,
|
||||||
|
this.city,
|
||||||
|
this.country,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.gender,
|
||||||
|
this.profileUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
|
||||||
|
class ItemMagLarge extends StatelessWidget {
|
||||||
|
const ItemMagLarge({
|
||||||
|
Key key,
|
||||||
|
this.magazine,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final Magazine magazine;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 235,
|
||||||
|
width: 168,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(5)
|
||||||
|
),
|
||||||
|
image: DecorationImage(
|
||||||
|
image: NetworkImage(
|
||||||
|
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg"),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
|
||||||
|
import 'item_mag_small.dart';
|
||||||
|
|
||||||
|
class ItemMagRow extends StatelessWidget {
|
||||||
|
const ItemMagRow({
|
||||||
|
Key key,
|
||||||
|
this.rowTitle,
|
||||||
|
this.magazines,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String rowTitle;
|
||||||
|
final List<Magazine> magazines;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SliverToBoxAdapter(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
||||||
|
child: Text(
|
||||||
|
rowTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 170,
|
||||||
|
child: ListView.builder(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: magazines.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 16),
|
||||||
|
child: ItemMagSmall(
|
||||||
|
magazine: magazines[index],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_large.dart';
|
||||||
|
|
||||||
|
import 'item_mag_small.dart';
|
||||||
|
|
||||||
|
class ItemMagRowNewest extends StatelessWidget {
|
||||||
|
const ItemMagRowNewest({
|
||||||
|
Key key,
|
||||||
|
this.magazines,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List<Magazine> magazines;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SliverToBoxAdapter(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
||||||
|
child: Text(
|
||||||
|
"Nouveautés",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 235,
|
||||||
|
child: ListView.builder(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: magazines.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 16),
|
||||||
|
child: ItemMagLarge(
|
||||||
|
magazine: magazines[index],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/pdf_reader.dart';
|
||||||
|
|
||||||
|
class ItemMagSmall extends StatelessWidget {
|
||||||
|
const ItemMagSmall({Key key, this.magazine}) : super(key: key);
|
||||||
|
|
||||||
|
final Magazine magazine;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
showPdfReader(context, magazine.magazineUrl);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 167,
|
||||||
|
width: 119,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
|
image: DecorationImage(
|
||||||
|
image: NetworkImage(
|
||||||
|
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg"),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showPdfReader(BuildContext context, String magazineUrl) {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) {
|
||||||
|
return PdfReader(
|
||||||
|
pdfUrl: "http://www.africau.edu/images/default/sample.pdf",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ProfilePicture extends StatelessWidget {
|
||||||
|
|
||||||
|
const ProfilePicture({Key key, this.imageUrl}) : super(key: key);
|
||||||
|
|
||||||
|
final String imageUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 114,
|
||||||
|
width: 114,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
image: DecorationImage(
|
||||||
|
image: NetworkImage(imageUrl),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.white,
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.grey.withOpacity(0.5),
|
||||||
|
spreadRadius: 2,
|
||||||
|
blurRadius: 2,
|
||||||
|
offset: Offset(0, 1), // changes position of shadow
|
||||||
|
)
|
||||||
|
]
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EditProfileView extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_EditProfileViewState createState() => _EditProfileViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EditProfileViewState extends State<EditProfileView> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconTheme: IconThemeData(
|
||||||
|
color: Color(0xFF545454), //change your color here
|
||||||
|
)
|
||||||
|
),
|
||||||
|
body: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-1
@@ -1,8 +1,26 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_row.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_row_newest.dart';
|
||||||
|
|
||||||
class HomeView extends StatelessWidget {
|
class HomeView extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container();
|
return Scaffold(
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
ItemMagRowNewest(magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
ItemMagRow(rowTitle: "Buzzz Magazine", magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
ItemMagRow(rowTitle: "Hamaji Magazine", magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
ItemMagRow(rowTitle: "Mining and buziness", magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
ItemMagRow(rowTitle: "Declic Car Magazine", magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
ItemMagRow(rowTitle: "Congo Airways", magazines: [Magazine(), Magazine(), Magazine(), Magazine(), Magazine(), Magazine()]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class _MainViewState extends State<MainView> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
centerTitle: false,
|
||||||
title: Text(
|
title: Text(
|
||||||
_labels[_selectedIndex],
|
_labels[_selectedIndex],
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import 'package:advance_pdf_viewer/advance_pdf_viewer.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PdfReader extends StatefulWidget {
|
||||||
|
const PdfReader({
|
||||||
|
Key key,
|
||||||
|
this.pdfUrl,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String pdfUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PdfReaderState createState() => _PdfReaderState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PdfReaderState extends State<PdfReader> {
|
||||||
|
bool isLoading = true;
|
||||||
|
PDFDocument document;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
loadDocument();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadDocument() async {
|
||||||
|
try {
|
||||||
|
document = await PDFDocument.fromURL('https://pdftron.s3.amazonaws.coQm/downloads/pdfref.pdf');
|
||||||
|
setState(() => isLoading = false);
|
||||||
|
} catch(e) {
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconTheme: IconThemeData(
|
||||||
|
color: Color(0xFF545454), //change your color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Center(
|
||||||
|
child: isLoading
|
||||||
|
? CircularProgressIndicator()
|
||||||
|
: PDFViewer(document: document),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+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: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 {
|
class ProfileView extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -10,19 +13,102 @@ class _ProfileViewState extends State<ProfileView> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
body: CustomScrollView(
|
||||||
title: Text(
|
slivers: [
|
||||||
"Mon Profil",
|
SliverList(
|
||||||
style: TextStyle(color: Colors.black),
|
delegate: SliverChildListDelegate(
|
||||||
),
|
[
|
||||||
leading: Builder(builder: (BuildContext context) {
|
_buildProfileHeader(),
|
||||||
return Padding(
|
SizedBox(height: 48),
|
||||||
padding: const EdgeInsets.only(left: 16),
|
Padding(
|
||||||
child: Image.asset("assets/images/kiosque_logo.png"),
|
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(),
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+188
-6
@@ -1,6 +1,20 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
|
advance_pdf_viewer:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: advance_pdf_viewer
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.2"
|
||||||
|
archive:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: archive
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -43,6 +57,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.15.0"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -57,6 +78,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
|
ffi:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ffi
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0"
|
||||||
|
file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.1.0"
|
||||||
firebase:
|
firebase:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -111,13 +146,13 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_auth_buttons:
|
flutter_cache_manager:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_auth_buttons
|
name: flutter_cache_manager
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.0"
|
version: "2.1.2"
|
||||||
flutter_login_facebook:
|
flutter_login_facebook:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -170,6 +205,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "3.1.4"
|
||||||
|
image:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
|
infinite_listview:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: infinite_listview
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
intl:
|
intl:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -205,6 +254,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
nested:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: nested
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0"
|
||||||
|
numberpicker:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: numberpicker
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -212,6 +275,41 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
|
path_provider:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.6.28"
|
||||||
|
path_provider_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_linux
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.1+2"
|
||||||
|
path_provider_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_macos
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.4+8"
|
||||||
|
path_provider_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_platform_interface
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
path_provider_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_windows
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.5"
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -219,6 +317,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.11.0"
|
||||||
|
petitparser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: petitparser
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.2"
|
||||||
|
platform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: platform
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -226,6 +338,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
|
process:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: process
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.0"
|
||||||
|
provider:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: provider
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.0"
|
||||||
quiver:
|
quiver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -233,6 +359,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.5"
|
version: "2.1.5"
|
||||||
|
rxdart:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: rxdart
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.25.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -245,6 +378,20 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
|
sqflite:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sqflite
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0+3"
|
||||||
|
sqflite_common:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sqflite_common
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0+2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -266,6 +413,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
|
synchronized:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: synchronized
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -287,6 +441,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
uuid:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: uuid
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -294,6 +455,27 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
|
win32:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: win32
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.4"
|
||||||
|
xdg_directories:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xdg_directories
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.2"
|
||||||
|
xml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xml
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0-0.0 <3.0.0"
|
dart: ">=2.12.0 <3.0.0"
|
||||||
flutter: ">=1.12.13+hotfix.5"
|
flutter: ">=1.24.0-10"
|
||||||
|
|||||||
+2
-1
@@ -32,7 +32,8 @@ dependencies:
|
|||||||
firebase_auth: 0.18.2
|
firebase_auth: 0.18.2
|
||||||
google_sign_in: ^4.5.6
|
google_sign_in: ^4.5.6
|
||||||
flutter_login_facebook: 0.4.0+1
|
flutter_login_facebook: 0.4.0+1
|
||||||
flutter_auth_buttons: ^0.10.0
|
provider: ^5.0.0
|
||||||
|
advance_pdf_viewer: ^1.2.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user