This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
flutter: | |
sdk: flutter | |
# The following adds the Cupertino Icons font to your application. | |
# Use with the CupertinoIcons class for iOS style icons. | |
cupertino_icons: ^0.1.2 | |
cloud_firestore: ^0.8.2+3 | |
firebase_auth: ^0.7.0 | |
provider: ^3.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To add assets to your application, add an assets section, like this: | |
assets: | |
- images/spotify_logo_banner_black.png | |
- images/spotify_logo_title.png | |
- images/spotify_logo_vertical_black.jpg | |
- images/spotify_logo.jpg | |
- images/spotify_smaller.png | |
- images/Spotify_logo_horizontal_black.jpg | |
# An image asset can refer to one or more resolution-specific "variants", see |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:spotify_clone/components/auth.dart'; | |
void main(){ | |
runApp(MaterialApp( | |
title: 'Spotify Clone', | |
theme: ThemeData( | |
fontFamily: 'Proxima Nova', | |
brightness: Brightness.dark, | |
primaryColor: Colors.lightBlue[800], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SplashScreen extends StatefulWidget { | |
@override | |
_SplashScreenState createState() => _SplashScreenState(); | |
} | |
class _SplashScreenState extends State<SplashScreen> { | |
Future onloadDecider() async { | |
FirebaseUser user = await FirebaseAuth.instance.currentUser(); | |
if(user == null){ | |
print("No User"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SessionManagement extends ChangeNotifier{ | |
FirebaseUser fUser; | |
Future<FirebaseUser> currentUser()async{ | |
FirebaseUser user = await FirebaseAuth.instance.currentUser(); | |
if(user == null){ | |
print("No User"); | |
}else{ | |
print("Current User : "+user.uid); | |
return user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthUI extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.spaceAround, | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: <Widget>[ | |
Image.asset('./images/spotify_logo_banner_black.png', height: MediaQuery.of(context).size.height*0.12,), | |
Text("Millions of songs. \n Free on Spotify.", style: TextStyle( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateAccount extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final sessionObj = Provider.of<CreateUserAccount>(context); | |
final uiComponents = Provider.of<ShowCustomAlertDialog>(context); | |
return Scaffold( | |
backgroundColor: Colors.black, | |
appBar: AppBar( | |
centerTitle: true, | |
elevation: 0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoginPage extends StatelessWidget { | |
final TextEditingController emailCtrl = TextEditingController(); | |
final TextEditingController passCtrl = TextEditingController(); | |
@override | |
Widget build(BuildContext context) { | |
final loginLogic = Provider.of<LoginLogic>(context); | |
final uiComponents = Provider.of<ShowCustomAlertDialog>(context); | |
return Scaffold( | |
backgroundColor: Colors.black, | |
appBar: AppBar( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"users": [ | |
{ | |
"name": "String", | |
"nameIndex": "Charecter", | |
"user_dob": "TimeStamp", | |
"premiumMember": "Boolean", | |
"user_activites": { | |
"songHistory": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"artists": [ | |
{ | |
"artistId": "String", | |
"name": "String", | |
"artistIndex": "Character", | |
"date": "TimeStamp", | |
"followers": "Integer", | |
"monthlyListerners": "Integer", | |
"coverImageUrl": "String: url/image" |
OlderNewer