diff --git a/Sources/dafl_project_flutter/lib/spotify_api/api.dart b/Sources/dafl_project_flutter/lib/spotify_api/api.dart index 65df525..0a243e7 100644 --- a/Sources/dafl_project_flutter/lib/spotify_api/api.dart +++ b/Sources/dafl_project_flutter/lib/spotify_api/api.dart @@ -3,7 +3,7 @@ import 'dart:math'; class Api { var clientId = '7ceb49d874b9404492246027e4d68cf8'; - var redirectUri = 'https://felixmielcarek.github.io'; + var redirectUri='https://192.168.183.120:8888/'; var state; var scopes = 'user-read-private'; var url; @@ -23,12 +23,13 @@ class Api { Future launchInBrowser() async { if (!await launchUrl( url, - mode: LaunchMode.externalApplication, + mode: LaunchMode.inAppWebView, )) { throw 'Could not launch $url'; } } + // for state value String generateRandomString() { var r = Random(); return String.fromCharCodes( diff --git a/Sources/dafl_project_flutter/lib/views/pages/sign_up/p_sign_up.dart b/Sources/dafl_project_flutter/lib/views/pages/sign_up/p_sign_up.dart index e25ec92..12ec26b 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/sign_up/p_sign_up.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/sign_up/p_sign_up.dart @@ -66,7 +66,7 @@ class _SignUpPageState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: - const BorderRadius.all(Radius.circular(50)), + const BorderRadius.all(Radius.circular(50)), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.3), @@ -109,7 +109,7 @@ class _SignUpPageState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: - const BorderRadius.all(Radius.circular(50)), + const BorderRadius.all(Radius.circular(50)), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.3), @@ -152,7 +152,7 @@ class _SignUpPageState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: - const BorderRadius.all(Radius.circular(50)), + const BorderRadius.all(Radius.circular(50)), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.3), @@ -196,7 +196,7 @@ class _SignUpPageState extends State { decoration: BoxDecoration( color: const Color(0xFF24CF5F), borderRadius: - const BorderRadius.all(Radius.circular(50)), + const BorderRadius.all(Radius.circular(50)), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.3), @@ -209,25 +209,22 @@ class _SignUpPageState extends State { ), ), SizedBox( - height: 55, + height: 43, width: width * 0.75, - child: Padding( - padding: EdgeInsets.fromLTRB(0, 10, 10, 0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: const Color(0xFF24CF5F), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15.0), - ), - ), - onPressed: () => setState(() { + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFF24CF5F), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(100), + ), // background// foreground + ), + onPressed: () => setState(() { _launched = apiSptfy.launchInBrowser(); }), - child: const Text( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( "Lier compte ", style: TextStyle( fontFamily: 'DMSans', @@ -235,16 +232,14 @@ class _SignUpPageState extends State { fontSize: 18, fontWeight: FontWeight.w700), ), - ), - Image.asset( - 'assets/images/spotify_logo.png', - height: 25, - width: 25, - fit: BoxFit.cover, - ), - ], - ), - ), + Image.asset( + 'assets/images/spotify_logo.png', + height: 25, + width: 25, + fit: BoxFit.cover, + ), + ], + )), ), ], )), @@ -303,7 +298,7 @@ class _SignUpPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Text('Tu n’as déjà un compte?', + const Text('Tu as déjà un compte ?', style: TextStyle( color: Colors.white, fontWeight: FontWeight.normal,