Skip to content

Commit

Permalink
albumart on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
raysummee committed Jun 24, 2020
1 parent 3f72ed7 commit 7219278
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 49 deletions.
114 changes: 72 additions & 42 deletions lib/ux/components/appBars/libraryAppBar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,53 +87,83 @@ class _LibraryAppBarState extends State<LibraryAppBar> with TickerProviderStateM
height: 200,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"Library",
style: TextStyle(
color: Colors.white,
fontSize: 27,
fontWeight: FontWeight.bold
)
Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
child: Text(
"Library",
style: TextStyle(
color: Colors.white,
fontSize: 25,
fontWeight: FontWeight.bold
)
),
),
Row(
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
IconButton(
icon: Icon(
Icons.fast_rewind,
color: Colors.white,
Container(
margin: EdgeInsets.fromLTRB(0, 5, 0, 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
boxShadow: [

]
),
onPressed: (){}
width: 140,
height: 110,
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Container(
color: Colors.white,
child: Image(
image: AssetImage("lib/assets/images/white-headphone.jpg"),
fit: BoxFit.cover,
),
),
)
),
IconButton(
iconSize: 35,
icon: AnimatedIcon(
icon: AnimatedIcons.play_pause,
progress: __animationController,
color: Colors.white,
),
onPressed: (){
if(isPlaying){
setState(() {
isPlaying = false;
});
_playerLogic.pauseMusic();
//__animationController.reverse();
}
else{
setState(() {
isPlaying = true;
});
_playerLogic.playPausedMusic();
//__animationController.forward();
}
}
),
IconButton(
icon: Icon(
Icons.fast_forward,color: Colors.white,
),
onPressed: (){}
Row(
children: <Widget>[
IconButton(
icon: Icon(
Icons.fast_rewind,
color: Colors.white,
),
onPressed: (){}
),
IconButton(
iconSize: 35,
icon: AnimatedIcon(
icon: AnimatedIcons.play_pause,
progress: __animationController,
color: Colors.white,
),
onPressed: (){
if(isPlaying){
setState(() {
isPlaying = false;
});
_playerLogic.pauseMusic();
//__animationController.reverse();
}
else{
setState(() {
isPlaying = true;
});
_playerLogic.playPausedMusic();
//__animationController.forward();
}
}
),
IconButton(
icon: Icon(
Icons.fast_forward,color: Colors.white,
),
onPressed: (){}
),
],
),
],
)
Expand Down
49 changes: 45 additions & 4 deletions lib/ux/components/lists/verticalListSimple.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,60 @@ import 'package:Raylex/logic/models/songInfo.dart';
import 'package:Raylex/ux/pages/playerUIPage.dart';
import 'package:flutter/material.dart';

class VerticalListSimple extends StatelessWidget {
class VerticalListSimple extends StatefulWidget {
final List<SongInfo> songinfo;
VerticalListSimple(this.songinfo);

@override
_VerticalListSimpleState createState() => _VerticalListSimpleState();
}

class _VerticalListSimpleState extends State<VerticalListSimple> {
int currentPlaying;
@override
void initState(){
super.initState();
}
@override
Widget build(BuildContext context) {
return Expanded(
child: ListView.builder(
itemCount: songinfo.length,
itemCount: widget.songinfo.length,
scrollDirection: Axis.vertical,
itemBuilder: (context, index){
return ListTile(
title: Text(songinfo.elementAt(index).title),
onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context) => PlayerUIPage(songinfo.elementAt(index)))),
title: Text(
widget.songinfo.elementAt(index).title,
style: ((){
if(currentPlaying!=null && currentPlaying == index){
return TextStyle(
color: Colors.pink.shade300,
fontWeight: FontWeight.bold
);
}else{
return TextStyle();
}
}()),
),
trailing: ((){
if(currentPlaying!=null && currentPlaying == index)
return Icon(
Icons.bubble_chart,
color: Colors.pink.shade300,

);
else
return Text("");
}()),
onTap: (){
Navigator.push(
context,
MaterialPageRoute(builder: (context) => PlayerUIPage(widget.songinfo.elementAt(index)))
);
setState(() {
currentPlaying = index;
});
}
);
},
),
Expand Down
10 changes: 10 additions & 0 deletions lib/ux/pages/historyPage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class HistoryPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(

);
}
}
10 changes: 10 additions & 0 deletions lib/ux/pages/likedPage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class LikedPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(

);
}
}
12 changes: 9 additions & 3 deletions lib/ux/pages/navPages.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import 'package:Raylex/ux/pages/historyPage.dart';
import 'package:Raylex/ux/pages/libraryPages.dart';
import 'package:Raylex/ux/pages/likedPage.dart';
import 'package:Raylex/ux/pages/searchPage.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

Expand All @@ -21,7 +24,10 @@ class _NavPagesState extends State<NavPages> {
index: _currentIndex,
//the body of the nav should be here index wise
children: <Widget>[
LibraryPages()
LibraryPages(),
LikedPage(),
HistoryPage(),
SearchPage()
],
),
//nav bar
Expand Down Expand Up @@ -68,10 +74,10 @@ class _NavPagesState extends State<NavPages> {
),
BottomNavigationBarItem(
icon: Icon(
Icons.history,
Icons.explore,
),
title: Text(
"History",
"Explore",
)
),
BottomNavigationBarItem(
Expand Down
10 changes: 10 additions & 0 deletions lib/ux/pages/searchPage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class SearchPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(

);
}
}

0 comments on commit 7219278

Please sign in to comment.