fix current track displayed in profile page
continuous-integration/drone/push Build is passing Details

#MSG01/chat_firebase
Lucas DELANIER 2 years ago
parent a8da8c9999
commit bd4543bd56

@ -27,8 +27,14 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Paint.enableDithering = true;
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: [SystemUiOverlay.top]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [SystemUiOverlay.top],
);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark, // For Android (dark icons)
statusBarBrightness: Brightness.dark, // For iOS (dark icons)
));
return ChangeNotifierProvider(
create: (context) => CardProvider(),
child: const MaterialApp(

@ -24,7 +24,7 @@ class User {
//constructors
User(this.usernameDafl, this.passwDafl) {
_actualiseCurrentMusic();
actualiseCurrentMusic();
}
Music get currentMusic => _currentMusic; //lists
@ -38,7 +38,7 @@ class User {
discovery.add(music);
}
_actualiseCurrentMusic() async {
actualiseCurrentMusic() async {
try {
_currentMusic = Music(await MyApp.api.getCurrentlyPlayingTrack());
} on ApiException {

@ -31,6 +31,7 @@ class _MainPageProfilState extends State<MainPageProfil> {
@override
initState() {
username = MyApp.controller.currentUser.usernameDafl;
MyApp.controller.currentUser.actualiseCurrentMusic();
super.initState();
}

@ -79,6 +79,7 @@ class _SignInPageState extends State<SignInPage> {
Padding(
padding: const EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
keyboardAppearance: Brightness.dark,
controller: userNameTextField,
decoration: const InputDecoration(
border: InputBorder.none,
@ -123,6 +124,7 @@ class _SignInPageState extends State<SignInPage> {
Padding(
padding: const EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
keyboardAppearance: Brightness.dark,
controller: passwordTextField,
obscureText: true,
decoration: const InputDecoration(

Loading…
Cancel
Save