Profile View
This commit is contained in:
+11
-3
@@ -2,7 +2,10 @@ import 'package:firebase_core/firebase_core.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_settings_screens/flutter_settings_screens.dart';
|
import 'package:flutter_settings_screens/flutter_settings_screens.dart';
|
||||||
import 'package:le_kiosque_by_gcs/services/auth/main_auth.dart';
|
import 'package:le_kiosque_by_gcs/services/auth/main_auth.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/landing.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/landing.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import 'services/auth/auth.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
await Settings.init(cacheProvider: SharePreferenceCache());
|
await Settings.init(cacheProvider: SharePreferenceCache());
|
||||||
@@ -20,9 +23,14 @@ class MyApp extends StatelessWidget {
|
|||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.blue,
|
primarySwatch: Colors.blue,
|
||||||
),
|
),
|
||||||
home: LandingPageView(
|
home: MultiProvider(
|
||||||
auth: MainAuth(),
|
providers: [
|
||||||
|
Provider<Auth>(create: (_) => MainAuth())
|
||||||
|
],
|
||||||
|
child: LandingPageView(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class Magazine {
|
class Magazine {
|
||||||
final String uid;
|
final String uid;
|
||||||
final String title;
|
final String title;
|
||||||
@@ -19,9 +21,9 @@ class Magazine {
|
|||||||
this.publishedAt,
|
this.publishedAt,
|
||||||
this.createdAt,
|
this.createdAt,
|
||||||
this.updatedAt,
|
this.updatedAt,
|
||||||
this.summaryText,
|
@required this.summaryText,
|
||||||
this.summaryUrl,
|
this.summaryUrl,
|
||||||
this.magazineUrl,
|
@required this.magazineUrl,
|
||||||
this.uidCategory,
|
this.uidCategory,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
Future<bool> showAlertDialog({
|
||||||
|
BuildContext context,
|
||||||
|
@required String title,
|
||||||
|
@required String contentMessage,
|
||||||
|
String confirmText,
|
||||||
|
String cancelText,
|
||||||
|
}) {
|
||||||
|
return showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text(title),
|
||||||
|
content: Text(contentMessage),
|
||||||
|
actions: [
|
||||||
|
if (cancelText != null)
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop(false);
|
||||||
|
},
|
||||||
|
child: Text(cancelText),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop(true);
|
||||||
|
},
|
||||||
|
child: Text(confirmText),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,30 +1,47 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/pdf_reader.dart';
|
||||||
|
|
||||||
class ItemMagLarge extends StatelessWidget {
|
class ItemMagLarge extends StatelessWidget {
|
||||||
const ItemMagLarge({
|
const ItemMagLarge({
|
||||||
Key key,
|
Key key,
|
||||||
this.magazine,
|
@required this.magazine,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final Magazine magazine;
|
final Magazine magazine;
|
||||||
|
|
||||||
|
void showPdfReader(BuildContext context, String magazineUrl) {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) {
|
||||||
|
return PdfReader(
|
||||||
|
pdfUrl: magazine.magazineUrl,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
showPdfReader(context, magazine.magazineUrl);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
height: 235,
|
height: 235,
|
||||||
width: 168,
|
width: 168,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(5)
|
Radius.circular(5),
|
||||||
),
|
),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: NetworkImage(
|
image: NetworkImage(magazine.urlCover),
|
||||||
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg"),
|
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,28 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/detailmag/detail_mag.dart';
|
||||||
|
|
||||||
import 'item_mag_small.dart';
|
import 'item_mag_small.dart';
|
||||||
|
|
||||||
|
showDetailCategoryMagazine({
|
||||||
|
BuildContext context,
|
||||||
|
List<Magazine> magazines,
|
||||||
|
String rowTitle,
|
||||||
|
}) {
|
||||||
|
showBottomSheet(
|
||||||
|
//barrierColor: Colors.black87,
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
context: context,
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
builder: (builder) {
|
||||||
|
return DetailMagazine(
|
||||||
|
magazines: magazines,
|
||||||
|
toolbarTitle: rowTitle,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
class ItemMagRow extends StatelessWidget {
|
class ItemMagRow extends StatelessWidget {
|
||||||
const ItemMagRow({
|
const ItemMagRow({
|
||||||
Key key,
|
Key key,
|
||||||
@@ -22,12 +42,28 @@ class ItemMagRow extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
||||||
child: Text(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
rowTitle,
|
rowTitle,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => showDetailCategoryMagazine(
|
||||||
|
context: context,
|
||||||
|
magazines: magazines,
|
||||||
|
rowTitle: rowTitle,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'Détails',
|
||||||
|
style: TextStyle(fontSize: 16, color: Color(0xFF25ADF3)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 170,
|
height: 170,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_large.dart';
|
import 'package:le_kiosque_by_gcs/ui/custom/item_mag_large.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/detailmag/detail_mag.dart';
|
||||||
|
|
||||||
|
import 'item_mag_row.dart';
|
||||||
import 'item_mag_small.dart';
|
import 'item_mag_small.dart';
|
||||||
|
|
||||||
class ItemMagRowNewest extends StatelessWidget {
|
class ItemMagRowNewest extends StatelessWidget {
|
||||||
@@ -11,6 +13,8 @@ class ItemMagRowNewest extends StatelessWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final List<Magazine> magazines;
|
final List<Magazine> magazines;
|
||||||
|
final title = "Nouveautés";
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -21,12 +25,28 @@ class ItemMagRowNewest extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
padding: const EdgeInsets.only(bottom: 16, top: 26),
|
||||||
child: Text(
|
child: Row(
|
||||||
"Nouveautés",
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => showDetailCategoryMagazine(
|
||||||
|
context: context,
|
||||||
|
magazines: magazines,
|
||||||
|
rowTitle: title,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'Détails',
|
||||||
|
style: TextStyle(fontSize: 16, color: Color(0xFF25ADF3)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 235,
|
height: 235,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/pdf_reader.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/pdf_reader.dart';
|
||||||
|
|
||||||
class ItemMagSmall extends StatelessWidget {
|
class ItemMagSmall extends StatelessWidget {
|
||||||
const ItemMagSmall({Key key, this.magazine}) : super(key: key);
|
const ItemMagSmall({Key key, this.magazine}) : super(key: key);
|
||||||
@@ -20,8 +21,7 @@ class ItemMagSmall extends StatelessWidget {
|
|||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: NetworkImage(
|
image: NetworkImage(magazine.urlCover),
|
||||||
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg"),
|
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -34,7 +34,7 @@ class ItemMagSmall extends StatelessWidget {
|
|||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return PdfReader(
|
return PdfReader(
|
||||||
pdfUrl: "http://www.africau.edu/images/default/sample.pdf",
|
pdfUrl: magazine.magazineUrl,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
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 {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
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()]),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_settings_screens/flutter_settings_screens.dart';
|
|
||||||
|
|
||||||
class SettingView extends StatelessWidget {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
centerTitle: false,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text(
|
|
||||||
"Paramètres",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
iconTheme: IconThemeData(
|
|
||||||
color: Color(0xFF545454), //change your color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: Padding(
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Compte",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 23,
|
|
||||||
color: Color(0xFFA7A7A7),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
|
|
||||||
child: Text(
|
|
||||||
"Changer le mot de passe",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
//Text("Changer le mot de passe")
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class SubscriptionView extends StatelessWidget {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'custom/custom_elevated_button.dart';
|
import '../custom/custom_elevated_button.dart';
|
||||||
|
|
||||||
class AuthView extends StatelessWidget {
|
class AuthView extends StatelessWidget {
|
||||||
const AuthView({Key key, this.auth}) : super(key: key);
|
|
||||||
final Auth auth;
|
|
||||||
|
|
||||||
Future<void> _signWithGoogle() async {
|
|
||||||
|
Future<void> _signWithGoogle(context) async {
|
||||||
|
final auth = Provider.of<Auth>(context, listen: false);
|
||||||
try {
|
try {
|
||||||
await auth.signInWithGoogle();
|
await auth.signInWithGoogle();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -15,7 +16,8 @@ class AuthView extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _signInWithFacebook() async {
|
Future<void> _signInWithFacebook(context) async {
|
||||||
|
final auth = Provider.of<Auth>(context, listen: false);
|
||||||
try {
|
try {
|
||||||
await auth.signInWithFacebook();
|
await auth.signInWithFacebook();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -74,7 +76,7 @@ class AuthView extends StatelessWidget {
|
|||||||
imageAsset: "assets/images/google_logo.png",
|
imageAsset: "assets/images/google_logo.png",
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
textColor: Colors.black,
|
textColor: Colors.black,
|
||||||
onPressed: _signWithGoogle,
|
onPressed: () => _signWithGoogle(context),
|
||||||
text: "Se connecter avec Google",
|
text: "Se connecter avec Google",
|
||||||
),
|
),
|
||||||
SizedBox(height: 24),
|
SizedBox(height: 24),
|
||||||
@@ -82,7 +84,7 @@ class AuthView extends StatelessWidget {
|
|||||||
imageAsset: "assets/images/facebook_logo.png",
|
imageAsset: "assets/images/facebook_logo.png",
|
||||||
color: Color(0xFF334D92),
|
color: Color(0xFF334D92),
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
onPressed: _signInWithFacebook,
|
onPressed: () => _signInWithFacebook(context),
|
||||||
text: "Se connecter avec Facebook",
|
text: "Se connecter avec Facebook",
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
import 'package:carousel_slider/carousel_slider.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/model/magazine.dart';
|
||||||
|
|
||||||
|
class DetailMagazine extends StatefulWidget {
|
||||||
|
final List<Magazine> magazines;
|
||||||
|
final String toolbarTitle;
|
||||||
|
|
||||||
|
DetailMagazine({
|
||||||
|
Key key,
|
||||||
|
@required this.magazines,
|
||||||
|
@required this.toolbarTitle,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_DetailMagazineState createState() => _DetailMagazineState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DetailMagazineState extends State<DetailMagazine> {
|
||||||
|
String _currentSummary;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_updateSummary(widget.magazines[0].summaryText);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
_updateSummary(String newText) {
|
||||||
|
setState(() {
|
||||||
|
_currentSummary = newText;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: CarouselSlider.builder(
|
||||||
|
itemCount: widget.magazines.length,
|
||||||
|
itemBuilder: (context, index, realIndex) => Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
|
child: Container(
|
||||||
|
height: 235,
|
||||||
|
width: 168,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(5),
|
||||||
|
),
|
||||||
|
image: DecorationImage(
|
||||||
|
image: NetworkImage(widget.magazines[index].urlCover),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
options: CarouselOptions(
|
||||||
|
height: 400,
|
||||||
|
pageSnapping: true,
|
||||||
|
enableInfiniteScroll: false,
|
||||||
|
enlargeCenterPage: true,
|
||||||
|
onPageChanged: (index, _) {
|
||||||
|
_updateSummary(widget.magazines[index].summaryText);
|
||||||
|
}
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Text(
|
||||||
|
_currentSummary,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
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 {
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
final summary = "Voyez ce jeu exquis wallon, de graphie en kit mais bref. Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à côté de l\"alcôve ovoïde, où les bûches se consument dans l\"âtre";
|
||||||
|
final url = "https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg";
|
||||||
|
final urlPrd = "http://www.africau.edu/images/default/sample.pdf";
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
ItemMagRowNewest(magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
ItemMagRow(rowTitle: "Buzzz Magazine", magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
ItemMagRow(rowTitle: "Hamaji Magazine", magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
ItemMagRow(rowTitle: "Mining and buziness", magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
ItemMagRow(rowTitle: "Declic Car Magazine", magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
ItemMagRow(rowTitle: "Congo Airways", magazines: [Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary), Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/auth.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/auth.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/main.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/main.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class LandingPageView extends StatelessWidget {
|
class LandingPageView extends StatelessWidget {
|
||||||
final Auth auth;
|
|
||||||
|
|
||||||
const LandingPageView({Key key, this.auth}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
final auth = Provider.of<Auth>(context, listen: false);
|
||||||
return StreamBuilder<User>(
|
return StreamBuilder<User>(
|
||||||
stream: auth.authStateChanges(),
|
stream: auth.authStateChanges(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.active) {
|
if (snapshot.connectionState == ConnectionState.active) {
|
||||||
if (snapshot.data == null) {
|
if (snapshot.data == null) {
|
||||||
return AuthView(auth: auth);
|
return AuthView();
|
||||||
} else {
|
} else {
|
||||||
return MainView();
|
return MainView();
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/home.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/home.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/news.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/news.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/profile.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/profile.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/search.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/search.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/setting.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/setting/setting.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/subscription.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/subscription/subscription.dart';
|
||||||
|
|
||||||
class MainView extends StatefulWidget {
|
class MainView extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -34,7 +34,7 @@ class _MainViewState extends State<MainView> {
|
|||||||
_showSettingView(BuildContext context) {
|
_showSettingView(BuildContext context) {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => SettingView(),
|
builder: (_) => SettingView(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ class _MainViewState extends State<MainView> {
|
|||||||
void _showSearchView(BuildContext context) {
|
void _showSearchView(BuildContext context) {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => SearchView(),
|
builder: (_) => SearchView(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ class _PdfReaderState extends State<PdfReader> {
|
|||||||
|
|
||||||
loadDocument() async {
|
loadDocument() async {
|
||||||
try {
|
try {
|
||||||
document = await PDFDocument.fromURL('https://pdftron.s3.amazonaws.coQm/downloads/pdfref.pdf');
|
document = await PDFDocument.fromURL('https://pdftron.s3.amazonaws.com/downloads/pdfref.pdf');
|
||||||
setState(() => isLoading = false);
|
setState(() => isLoading = false);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
print(e);
|
print(e);
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.dart';
|
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 '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/custom/profile_picture.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/edit_profil.dart';
|
import 'package:le_kiosque_by_gcs/ui/view/edit_profil.dart';
|
||||||
|
|
||||||
class ProfileView extends StatefulWidget {
|
class ProfileView extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -12,14 +13,29 @@ class ProfileView extends StatefulWidget {
|
|||||||
class _ProfileViewState extends State<ProfileView> {
|
class _ProfileViewState extends State<ProfileView> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
// TODO Removig
|
||||||
|
final summary =
|
||||||
|
"Voyez ce jeu exquis wallon, de graphie en kit mais bref. Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à côté de l\"alcôve ovoïde, où les bûches se consument dans l\"âtre";
|
||||||
|
final url =
|
||||||
|
"https://miningandbusiness.com/wp-content/uploads/2021/02/03f19c3a-1d92-4be7-ac54-f52b37e626ad-561x771.jpg";
|
||||||
|
final urlPrd = "http://www.africau.edu/images/default/sample.pdf";
|
||||||
|
|
||||||
|
final magazines = [
|
||||||
|
Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary),
|
||||||
|
Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary),
|
||||||
|
Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary),
|
||||||
|
Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary),
|
||||||
|
Magazine(urlCover: url, magazineUrl: urlPrd, summaryText: summary)
|
||||||
|
];
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverList(
|
SliverToBoxAdapter(
|
||||||
delegate: SliverChildListDelegate(
|
child: Column(
|
||||||
[
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
_buildProfileHeader(),
|
_buildProfileHeader(),
|
||||||
SizedBox(height: 48),
|
SizedBox(height: 24),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 16,
|
left: 16,
|
||||||
@@ -38,9 +54,21 @@ class _ProfileViewState extends State<ProfileView> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverToBoxAdapter(
|
SliverPadding(
|
||||||
child: Text("ssdsfdss")
|
padding: EdgeInsets.all(16),
|
||||||
)
|
sliver: SliverGrid(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
mainAxisSpacing: 16.0,
|
||||||
|
crossAxisSpacing: 16.0,
|
||||||
|
mainAxisExtent: 250
|
||||||
|
),
|
||||||
|
delegate: SliverChildBuilderDelegate(
|
||||||
|
(context, int index) => ItemMagLarge(magazine: magazines[index]),
|
||||||
|
childCount: magazines.length,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
||||||
@@ -48,10 +76,19 @@ class _ProfileViewState extends State<ProfileView> {
|
|||||||
floatingActionButton: Visibility(
|
floatingActionButton: Visibility(
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
onPressed: () => _showEditProfileView(context),
|
onPressed: () => _showEditProfileView(context),
|
||||||
label: const Text('Editer', style: TextStyle(color: Color(0XFFFF567E))),
|
label: const Text(
|
||||||
icon: const Icon(Icons.edit, color: Color(0XFFFF567E)),
|
'Editer',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0XFFFF567E),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.edit,
|
||||||
|
color: Color(0XFFFF567E),
|
||||||
|
),
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,8 +144,10 @@ class _ProfileViewState extends State<ProfileView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_showEditProfileView(BuildContext context) {
|
_showEditProfileView(BuildContext context) {
|
||||||
Navigator.of(context).push(MaterialPageRoute(
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
builder: (BuildContext context) => EditProfileView(),
|
builder: (BuildContext context) => EditProfileView(),
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ItemLogout extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
const ItemLogout({
|
||||||
|
Key key,
|
||||||
|
this.title,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
color: Color(0xFF56B4FC),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ItemTitleGroup extends StatelessWidget {
|
||||||
|
|
||||||
|
const ItemTitleGroup({
|
||||||
|
Key key,
|
||||||
|
this.groupTitle,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String groupTitle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Text(
|
||||||
|
groupTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 23,
|
||||||
|
color: Color(0xFFA7A7A7),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ItemTitleSetting extends StatelessWidget {
|
||||||
|
const ItemTitleSetting({
|
||||||
|
Key key,
|
||||||
|
this.title,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.arrow_forward_ios_rounded,
|
||||||
|
color: Colors.black,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/custom/dialog.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/about.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/setting/item_logout.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/view/setting/item_title_group.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
|
||||||
|
import 'item_title_setting.dart';
|
||||||
|
|
||||||
|
class SettingView extends StatelessWidget {
|
||||||
|
_navigateToAboutView(BuildContext context) {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (_) {
|
||||||
|
return AboutView();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final String licenceUrl = "http://example.com";
|
||||||
|
|
||||||
|
_showTermAndCond(BuildContext context) async {
|
||||||
|
if (await canLaunch(licenceUrl)) {
|
||||||
|
await launch(licenceUrl);
|
||||||
|
} else {
|
||||||
|
throw 'Could not launch $licenceUrl';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_showLicence(BuildContext context) async {
|
||||||
|
if (await canLaunch(licenceUrl)) {
|
||||||
|
await launch(licenceUrl);
|
||||||
|
} else {
|
||||||
|
throw 'Could not launch $licenceUrl';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_changeLanguage(BuildContext context) async {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_showLogoutDialog(BuildContext context) async {
|
||||||
|
final auth = Provider.of<Auth>(context, listen: false);
|
||||||
|
final isConfirm = await showAlertDialog(
|
||||||
|
context: context,
|
||||||
|
title: "Deconnexion",
|
||||||
|
contentMessage: "Êtes-vous sûr de vouloir continuer",
|
||||||
|
confirmText: "Oui",
|
||||||
|
cancelText: "Non",
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isConfirm) {
|
||||||
|
await auth.signOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
centerTitle: false,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
title: Text(
|
||||||
|
"Paramètres",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
iconTheme: IconThemeData(
|
||||||
|
color: Color(0xFF545454), //change your color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
ItemTitleGroup(groupTitle: "Compte"),
|
||||||
|
InkWell(
|
||||||
|
child: ItemTitleSetting(title: "Changer la langue"),
|
||||||
|
onTap: () => _changeLanguage(context),
|
||||||
|
),
|
||||||
|
ItemTitleGroup(groupTitle: "Autres"),
|
||||||
|
InkWell(
|
||||||
|
child: ItemTitleSetting(title: "Termes & Conditions"),
|
||||||
|
onTap: () => _showTermAndCond(context),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: ItemTitleSetting(title: "Licence"),
|
||||||
|
onTap: () => _showLicence(context),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: ItemTitleSetting(title: "A propos"),
|
||||||
|
onTap: () => _navigateToAboutView(context),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
InkWell(
|
||||||
|
child: ItemLogout(title: "Deconnexion"),
|
||||||
|
onTap: () => _showLogoutDialog(context),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SubscriptionView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 286,
|
||||||
|
width: 317,
|
||||||
|
child: Image.asset("assets/images/mags.png"),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(24.0),
|
||||||
|
child: Text(
|
||||||
|
"Voyez ce jeu exquis wallon, de graphie en kit mais bref. Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à côté de l\"alcôve ovoïde, où les bûches se",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 17,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 200,
|
||||||
|
child: FloatingActionButton.extended(
|
||||||
|
onPressed: () => _buyNow(context),
|
||||||
|
label: const Text(
|
||||||
|
'Payer maintenant',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: Color(0XFF2571F3),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_buyNow(BuildContext context) {}
|
||||||
|
}
|
||||||
@@ -29,6 +29,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
|
carousel_slider:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: carousel_slider
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -497,6 +504,48 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
url_launcher:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: url_launcher
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.2"
|
||||||
|
url_launcher_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_linux
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
|
url_launcher_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_macos
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
|
url_launcher_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_platform_interface
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
|
url_launcher_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_web
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
|
url_launcher_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_windows
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ dependencies:
|
|||||||
provider: ^4.0.0
|
provider: ^4.0.0
|
||||||
advance_pdf_viewer: ^1.2.2
|
advance_pdf_viewer: ^1.2.2
|
||||||
flutter_settings_screens: ^0.2.1+1
|
flutter_settings_screens: ^0.2.1+1
|
||||||
|
url_launcher: ^6.0.2
|
||||||
|
carousel_slider: ^3.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user