Skip to content

Commit

Permalink
Merge pull request #3 from JothishKamal/dev
Browse files Browse the repository at this point in the history
Implement Login Screen and minor refactoring
  • Loading branch information
souvik03-136 authored Jul 5, 2024
2 parents 90fd3af + 13da0ab commit f5b1ff5
Show file tree
Hide file tree
Showing 6 changed files with 321 additions and 145 deletions.
5 changes: 3 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:spotify_collab_app/screens/home_screen.dart';
import 'theme/theme.dart';
import 'package:spotify_collab_app/screens/login_screen.dart';
import 'theme/theme.dart';

void main() {
runApp(const MyApp());
Expand All @@ -14,7 +15,7 @@ class MyApp extends StatelessWidget {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Spotify Collab',
theme: darkTheme,
theme: darkTheme,
home: const HomeScreen(),
);
}
Expand Down
165 changes: 22 additions & 143 deletions lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_svg/svg.dart';
import 'package:spotify_collab_app/widgets/now_playing.dart';
import 'package:spotify_collab_app/widgets/recent_card.dart';
import 'package:spotify_collab_app/widgets/song_widget.dart';

class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
Expand All @@ -17,7 +20,7 @@ class HomeScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/logo.svg'),
SizedBox(width: 10),
const SizedBox(width: 10),
const Text(
'Collabify',
style: TextStyle(
Expand All @@ -32,20 +35,20 @@ class HomeScreen extends StatelessWidget {
),
),
drawer: Drawer(
backgroundColor: Color.fromARGB(255, 0, 0, 0),
backgroundColor: const Color.fromARGB(255, 0, 0, 0),
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
Container(
child: const SizedBox(
height: 100,
),
color: Colors.transparent),
height: 100,
color: Colors.transparent,
child: const SizedBox(),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.home_outlined, size: 36),
title: Center(
leading: const Icon(Icons.home_outlined, size: 36),
title: const Center(
child: Text('Home', style: TextStyle(fontSize: 28))),
onTap: () {
// Handle the tap
Expand All @@ -55,8 +58,8 @@ class HomeScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.search_outlined, size: 36),
title: Center(
leading: const Icon(Icons.search_outlined, size: 36),
title: const Center(
child: Text('Search', style: TextStyle(fontSize: 28))),
onTap: () {
// Handle the tap
Expand All @@ -66,8 +69,8 @@ class HomeScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.grid_view_outlined, size: 36),
title: Center(
leading: const Icon(Icons.grid_view_outlined, size: 36),
title: const Center(
child:
Text('Your Events', style: TextStyle(fontSize: 28))),
onTap: () {
Expand All @@ -78,8 +81,8 @@ class HomeScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.account_circle_outlined, size: 36),
title: Center(
leading: const Icon(Icons.account_circle_outlined, size: 36),
title: const Center(
child:
Text('Your Profile', style: TextStyle(fontSize: 28))),
onTap: () {
Expand All @@ -90,8 +93,8 @@ class HomeScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.settings_outlined, size: 36),
title: Center(
leading: const Icon(Icons.settings_outlined, size: 36),
title: const Center(
child: Text('Settings', style: TextStyle(fontSize: 28))),
onTap: () {
// Handle the tap
Expand All @@ -101,8 +104,8 @@ class HomeScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
leading: Icon(Icons.queue_music_outlined, size: 36),
title: Center(
leading: const Icon(Icons.queue_music_outlined, size: 36),
title: const Center(
child: Text('Your Playlists',
style: TextStyle(fontSize: 28))),
onTap: () {
Expand Down Expand Up @@ -179,127 +182,3 @@ class HomeScreen extends StatelessWidget {
));
}
}

class NowPlaying extends StatelessWidget {
const NowPlaying({
super.key,
});

@override
Widget build(BuildContext context) {
return Container(
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Color.fromARGB(255, 128, 33, 21), Color(0xff646B35)])),
child: Stack(children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Container(
width: 34,
height: 34,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Color(0xffC14231)),
),
SizedBox(width: 8),
Text(
"From Me to You - Mono / Remastered",
style: TextStyle(
fontSize: 13,
color: Colors.white,
fontWeight: FontWeight.w600),
),
],
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Align(
alignment: Alignment.bottomCenter,
child: LinearProgressIndicator(
borderRadius: BorderRadius.circular(10),
color: Color(0xffB2B2B2),
backgroundColor: Color.fromARGB(255, 128, 33, 21),
),
),
)
]),
);
}
}

class SongWidget extends StatelessWidget {
const SongWidget({
super.key,
});

@override
Widget build(BuildContext context) {
return Container(
height: 80,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Color.fromARGB(50, 0, 0, 0),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 64,
height: 64,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.white),
),
Container(
width: 34,
height: 34,
margin: const EdgeInsets.only(right: 15),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xff24bb58)),
child: const Icon(
Icons.play_arrow,
color: Colors.black,
size: 34,
),
),
],
),
),
);
}
}

class RecentCard extends StatelessWidget {
const RecentCard({
super.key,
});

@override
Widget build(BuildContext context) {
return Container(
width: 98,
height: 130,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Color(0xff4d5350),
Color(0xff2f2e27),
],
tileMode: TileMode.mirror,
),
),
);
}
}
Loading

0 comments on commit f5b1ff5

Please sign in to comment.