Légère modifications des vues

pull/82/head
Félix MIELCAREK 3 years ago
parent 8c846dca5c
commit f2970d2e9c

@ -3,7 +3,7 @@ import 'dart:math';
class Api { class Api {
var clientId = '7ceb49d874b9404492246027e4d68cf8'; var clientId = '7ceb49d874b9404492246027e4d68cf8';
var redirectUri = 'https://felixmielcarek.github.io'; var redirectUri='https://192.168.183.120:8888/';
var state; var state;
var scopes = 'user-read-private'; var scopes = 'user-read-private';
var url; var url;
@ -23,12 +23,13 @@ class Api {
Future<void> launchInBrowser() async { Future<void> launchInBrowser() async {
if (!await launchUrl( if (!await launchUrl(
url, url,
mode: LaunchMode.externalApplication, mode: LaunchMode.inAppWebView,
)) { )) {
throw 'Could not launch $url'; throw 'Could not launch $url';
} }
} }
// for state value
String generateRandomString() { String generateRandomString() {
var r = Random(); var r = Random();
return String.fromCharCodes( return String.fromCharCodes(

@ -66,7 +66,7 @@ class _SignUpPageState extends State<SignUpPage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius:
const BorderRadius.all(Radius.circular(50)), const BorderRadius.all(Radius.circular(50)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withOpacity(0.3), color: Colors.black.withOpacity(0.3),
@ -109,7 +109,7 @@ class _SignUpPageState extends State<SignUpPage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius:
const BorderRadius.all(Radius.circular(50)), const BorderRadius.all(Radius.circular(50)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withOpacity(0.3), color: Colors.black.withOpacity(0.3),
@ -152,7 +152,7 @@ class _SignUpPageState extends State<SignUpPage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius:
const BorderRadius.all(Radius.circular(50)), const BorderRadius.all(Radius.circular(50)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withOpacity(0.3), color: Colors.black.withOpacity(0.3),
@ -196,7 +196,7 @@ class _SignUpPageState extends State<SignUpPage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFF24CF5F), color: const Color(0xFF24CF5F),
borderRadius: borderRadius:
const BorderRadius.all(Radius.circular(50)), const BorderRadius.all(Radius.circular(50)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withOpacity(0.3), color: Colors.black.withOpacity(0.3),
@ -209,25 +209,22 @@ class _SignUpPageState extends State<SignUpPage> {
), ),
), ),
SizedBox( SizedBox(
height: 55, height: 43,
width: width * 0.75, width: width * 0.75,
child: Padding( child: ElevatedButton(
padding: EdgeInsets.fromLTRB(0, 10, 10, 0), style: ElevatedButton.styleFrom(
child: Row( backgroundColor: Color(0xFF24CF5F),
mainAxisAlignment: MainAxisAlignment.center, shape: RoundedRectangleBorder(
crossAxisAlignment: CrossAxisAlignment.center, borderRadius: BorderRadius.circular(100),
children: [ ), // background// foreground
ElevatedButton( ),
style: ElevatedButton.styleFrom( onPressed: () => setState(() {
backgroundColor: const Color(0xFF24CF5F),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
),
onPressed: () => setState(() {
_launched = apiSptfy.launchInBrowser(); _launched = apiSptfy.launchInBrowser();
}), }),
child: const Text( child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Lier compte ", "Lier compte ",
style: TextStyle( style: TextStyle(
fontFamily: 'DMSans', fontFamily: 'DMSans',
@ -235,16 +232,14 @@ class _SignUpPageState extends State<SignUpPage> {
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
), ),
), Image.asset(
Image.asset( 'assets/images/spotify_logo.png',
'assets/images/spotify_logo.png', height: 25,
height: 25, width: 25,
width: 25, fit: BoxFit.cover,
fit: BoxFit.cover, ),
), ],
], )),
),
),
), ),
], ],
)), )),
@ -303,7 +298,7 @@ class _SignUpPageState extends State<SignUpPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
const Text('Tu nas déjà un compte?', const Text('Tu as déjà un compte ?',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

Loading…
Cancel
Save