├── .github └── FUNDING.yml ├── .gitignore ├── .idea ├── libraries │ ├── Dart_Packages.xml │ ├── Dart_SDK.xml │ ├── Flutter_Plugins.xml │ └── Flutter_for_Android.xml ├── misc.xml ├── modules.xml ├── runConfigurations │ └── main_dart.xml ├── vcs.xml └── workspace.xml ├── .metadata ├── .vscode ├── launch.json └── settings.json ├── LICENSE ├── README.md ├── android ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .classpath │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── onedreamers │ │ │ └── musicplayer │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ └── launch_background.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── demo ├── album.png ├── album_view.png ├── artist.png ├── dark_home.png ├── dark_home1.png ├── dark_now_playing.png ├── home.png ├── home1.png ├── landscape.png ├── now_playing.png ├── nowplaying.png ├── playlist.png ├── queue.png ├── songs.png └── top_tracks.png ├── flutter_01.log ├── fonts ├── Raleway-Black.ttf ├── Raleway-BlackItalic.ttf ├── Raleway-Bold.ttf ├── Raleway-Italic.ttf ├── Raleway-Light.ttf ├── Raleway-Medium.ttf └── Raleway-Regular.ttf ├── images ├── artist.jpg ├── avatar.jpg ├── back.jpg ├── kid.png ├── logo.png ├── logo_white.png ├── micra.jpg └── sad.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── flutter_export_environment.sh ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── database │ └── database_client.dart ├── main.dart ├── musichome.dart ├── pages │ ├── NoMusicFound.dart │ ├── Walkthrough.dart │ ├── about.dart │ ├── about_new.dart │ ├── card_detail.dart │ ├── list_songs.dart │ ├── material_search.dart │ ├── now_playing.dart │ └── settings.dart ├── sc_model │ └── model.dart ├── util │ ├── lastplay.dart │ └── utility.dart └── views │ ├── album.dart │ ├── artists.dart │ ├── home.dart │ ├── playlists.dart │ └── songs.dart ├── musicplayer.iml ├── musicplayer_android.iml ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: paypal.me/amangautam1 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_Packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_for_Android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 44b7e7d3f42f050a79712daab253af06e9daf530 8 | channel: beta 9 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter", 9 | "type": "dart", 10 | "request": "launch", 11 | "program": "lib/main.dart" 12 | }, 13 | 14 | ] 15 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.classpath": true, 4 | "**/.project": true, 5 | "**/.settings": true, 6 | "**/.factorypath": true 7 | }, 8 | "java.configuration.updateBuildConfiguration": "interactive" 9 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Aman gautam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Music Player 2 | 3 | A complete and open source music player designed in flutter. It is first complete music player designed in flutter. 4 | This app exploits Sqlite databse that enables faster loading of songs at startup. Only one time setup for loading songs is needed. This app comes with a lot of features and a more are coming soon. 5 |
6 |
7 | You can download app from releases Music Player. 8 | 9 |
10 | Please star the repo up, if you like the work. 11 | 12 | # Features 13 |
  • Play local songs 14 |
  • Beautiful screens 15 |
  • Sqlite database support 16 |
  • Search songs, Songs suggestions 17 |
  • Top tracks, Recent songs, Random song 18 |
  • Album view, Artist view 19 |
  • Playing queue, Shuffle, Add to favourites 20 |
  • Play/pause, Next/prev 21 |
  • Themes(dark/light), Custom font, Animations 22 |
  • landscape mode 23 | 24 | # Video 25 | Catch the demo in this video.
    26 | [![Watch the video](https://img.youtube.com/vi/EfB_0vKdSAE/hqdefault.jpg)](https://youtu.be/EfB_0vKdSAE) 27 | 28 | 29 | # Screenshots 30 | 31 | 32 | 36 | 40 | 45 | 46 | 88 |
    33 | 34 | Now playing 35 | 37 | 38 | Home Screen 39 | 41 | 42 |
    43 | Dark Home Screen 44 |
    89 | 90 | # Plugins 91 | Music player plugin used : Flute-music 92 |
    93 | For Sqlite :SQLite flutter plugin 94 | 95 | Note: This app may contain few bugs, which will be fixed shortly. 96 | 97 | # Licence 98 | MIT License 99 | 100 | Copyright (c) 2018 Aman gautam 101 | 102 | Permission is hereby granted, free of charge, to any person obtaining a copy 103 | of this software and associated documentation files (the "Software"), to deal 104 | in the Software without restriction for personal use, including without limitation the rights 105 | to use, copy, modify, merge and/or publish copies of the Software, and to permit persons to whom the Software is 106 | furnished to do so, subject to the following conditions: 107 | 108 | The above copyright notice and this permission notice shall be included in all 109 | copies or substantial portions of the Software. 110 | 111 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 112 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 113 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 114 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 115 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 116 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 117 | SOFTWARE. 118 | 119 | ## Getting Started 120 | 121 | For help getting started with Flutter, view our online 122 | [documentation](https://flutter.io/). 123 | 124 | ## Donation 125 | If this project help you reduce time to develop, you can give me a cup of coffee :) 126 | 127 | [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3GM7UXJDF3MDG) 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | 21 | 22 | lintOptions { 23 | disable 'InvalidPackage' 24 | } 25 | 26 | defaultConfig { 27 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 28 | applicationId "com.onedreamers.musicplayer" 29 | minSdkVersion 16 30 | targetSdkVersion 27 31 | versionCode 6 32 | multiDexEnabled = true 33 | versionName "1.0 beta" 34 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 35 | } 36 | 37 | buildTypes { 38 | release { 39 | // TODO: Add your own signing config for the release build. 40 | // Signing with the debug keys for now, so `flutter run --release` works. 41 | signingConfig signingConfigs.debug 42 | } 43 | } 44 | 45 | } 46 | 47 | flutter { 48 | source '../..' 49 | } 50 | 51 | dependencies { 52 | testImplementation 'junit:junit:4.12' 53 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 54 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 55 | } 56 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 23 | 26 | 27 | 28 | 35 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/onedreamers/musicplayer/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.onedreamers.musicplayer; 2 | 3 | import android.os.Bundle; 4 | import android.util.Log; 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugin.common.MethodCall; 7 | import io.flutter.plugin.common.MethodChannel; 8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 9 | import io.flutter.plugins.GeneratedPluginRegistrant; 10 | 11 | public class MainActivity extends FlutterActivity { 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | GeneratedPluginRegistrant.registerWith(this); 16 | new MethodChannel(getFlutterView(), "android_app_retain").setMethodCallHandler(new MethodCallHandler() { 17 | @Override 18 | public void onMethodCall(MethodCall call, MethodChannel.Result result) { 19 | if (call.method.equals("sendToBackground")) { 20 | Log.d("abc", "Backkkkk"); 21 | moveTaskToBack(true); 22 | } 23 | } 24 | }); 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | classpath 'com.google.gms:google-services:3.2.1' 10 | } 11 | } 12 | 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | 33 | subprojects { 34 | project.configurations.all { 35 | resolutionStrategy.eachDependency { details -> 36 | if (details.requested.group == 'com.android.support' 37 | && !details.requested.name.contains('multidex') ) { 38 | details.useVersion "27.1.0" 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableD8.desugaring=true -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /demo/album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/album.png -------------------------------------------------------------------------------- /demo/album_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/album_view.png -------------------------------------------------------------------------------- /demo/artist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/artist.png -------------------------------------------------------------------------------- /demo/dark_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/dark_home.png -------------------------------------------------------------------------------- /demo/dark_home1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/dark_home1.png -------------------------------------------------------------------------------- /demo/dark_now_playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/dark_now_playing.png -------------------------------------------------------------------------------- /demo/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/home.png -------------------------------------------------------------------------------- /demo/home1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/home1.png -------------------------------------------------------------------------------- /demo/landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/landscape.png -------------------------------------------------------------------------------- /demo/now_playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/now_playing.png -------------------------------------------------------------------------------- /demo/nowplaying.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/nowplaying.png -------------------------------------------------------------------------------- /demo/playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/playlist.png -------------------------------------------------------------------------------- /demo/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/queue.png -------------------------------------------------------------------------------- /demo/songs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/songs.png -------------------------------------------------------------------------------- /demo/top_tracks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/demo/top_tracks.png -------------------------------------------------------------------------------- /flutter_01.log: -------------------------------------------------------------------------------- 1 | Flutter crash report; please file at https://github.com/flutter/flutter/issues. 2 | 3 | ## command 4 | 5 | flutter build bundle --suppress-analytics --target C:\flutterprojects\musicplayer\lib\main.dart --preview-dart-2 --filesystem-scheme org-dartlang-root --depfile C:\flutterprojects\musicplayer\build\app\intermediates\flutter\debug/snapshot_blob.bin.d --asset-dir C:\flutterprojects\musicplayer\build\app\intermediates\flutter\debug/flutter_assets 6 | 7 | ## exception 8 | 9 | FileSystemException: FileSystemException: Deletion failed, path = 'C:\flutterprojects\musicplayer\build\app\intermediates\flutter\debug/flutter_assets' (OS Error: The directory is not empty. 10 | , errno = 145) 11 | 12 | ``` 13 | #0 _Directory._deleteSync (dart:io/directory_impl.dart:174) 14 | #1 FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:451) 15 | #2 ForwardingFileSystemEntity.deleteSync (package:file/src/forwarding/forwarding_file_system_entity.dart:72) 16 | #3 writeBundle (package:flutter_tools/src/bundle.dart:216) 17 | 18 | #4 assemble (package:flutter_tools/src/bundle.dart:209) 19 | 20 | #5 build (package:flutter_tools/src/bundle.dart:149) 21 | 22 | #6 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:67) 23 | 24 | #7 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:333) 25 | 26 | #8 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:270) 27 | 28 | #9 AppContext.run. (package:flutter_tools/src/base/context.dart:142) 29 | 30 | #10 _rootRun (dart:async/zone.dart:1126) 31 | #11 _CustomZone.run (dart:async/zone.dart:1023) 32 | #12 runZoned (dart:async/zone.dart:1501) 33 | #13 AppContext.run (package:flutter_tools/src/base/context.dart:141) 34 | 35 | #14 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:261) 36 | #15 CommandRunner.runCommand (package:args/command_runner.dart:194) 37 | 38 | #16 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:309) 39 | 40 | #17 AppContext.run. (package:flutter_tools/src/base/context.dart:142) 41 | 42 | #18 _rootRun (dart:async/zone.dart:1126) 43 | #19 _CustomZone.run (dart:async/zone.dart:1023) 44 | #20 runZoned (dart:async/zone.dart:1501) 45 | #21 AppContext.run (package:flutter_tools/src/base/context.dart:141) 46 | 47 | #22 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265) 48 | 49 | #23 CommandRunner.run. (package:args/command_runner.dart:109) 50 | #24 new Future.sync (dart:async/future.dart:224) 51 | #25 CommandRunner.run (package:args/command_runner.dart:109) 52 | #26 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174) 53 | #27 run. (package:flutter_tools/runner.dart:54) 54 | 55 | #28 AppContext.run. (package:flutter_tools/src/base/context.dart:142) 56 | 57 | #29 _rootRun (dart:async/zone.dart:1126) 58 | #30 _CustomZone.run (dart:async/zone.dart:1023) 59 | #31 runZoned (dart:async/zone.dart:1501) 60 | #32 AppContext.run (package:flutter_tools/src/base/context.dart:141) 61 | 62 | #33 runInContext (package:flutter_tools/src/context_runner.dart:41) 63 | 64 | #34 run (package:flutter_tools/runner.dart:49) 65 | #35 main (package:flutter_tools/executable.dart:48) 66 | 67 | #36 main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8) 68 | #37 _startIsolate. (dart:isolate-patch/dart:isolate/isolate_patch.dart:277) 69 | #38 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165) 70 | ``` 71 | 72 | ## flutter doctor 73 | 74 | ``` 75 | [✓] Flutter (Channel beta, v0.3.2, on Microsoft Windows [Version 10.0.16299.251], locale en-IN) 76 | • Flutter version 0.3.2 at C:\flutter 77 | • Framework revision 44b7e7d3f4 (5 weeks ago), 2018-04-20 01:02:44 -0700 78 | • Engine revision 09d05a3891 79 | • Dart version 2.0.0-dev.48.0.flutter-fe606f890b 80 | 81 | [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) 82 | • Android SDK at C:/Android/sdk 83 | • Android NDK location not configured (optional; useful for native profiling support) 84 | • Platform android-27, build-tools 27.0.3 85 | • ANDROID_HOME = C:/Android/sdk 86 | • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java 87 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) 88 | • All Android licenses accepted. 89 | 90 | [✓] Android Studio (version 3.0) 91 | • Android Studio at C:\Program Files\Android Studio 92 | • Flutter plugin version 22.2.1 93 | • Dart plugin version 171.4424 94 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01) 95 | 96 | [✓] Android Studio (version 3.1) 97 | • Android Studio at C:\Program Files\Android\Android Studio 98 | • Flutter plugin version 22.2.1 99 | • Dart plugin version 171.4424 100 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) 101 | 102 | [✓] IntelliJ IDEA Community Edition (version 2018.1) 103 | • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.1 104 | • Flutter plugin version 24.1.2 105 | • Dart plugin version 181.4445.29 106 | 107 | [✓] VS Code, 64-bit edition (version 1.21.1) 108 | • VS Code at C:\Program Files\Microsoft VS Code 109 | • Dart Code extension version 2.11.2 110 | 111 | [✓] Connected devices (1 available) 112 | • Google Nexus 6P, 8 0, API 26, 1440x2560 • 192.168.63.101:5555 • android-x86 • Android 8.0.0 (API 26) 113 | 114 | • No issues found! 115 | ``` 116 | -------------------------------------------------------------------------------- /fonts/Raleway-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Black.ttf -------------------------------------------------------------------------------- /fonts/Raleway-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-BlackItalic.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Bold.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Italic.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Light.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Medium.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /images/artist.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/artist.jpg -------------------------------------------------------------------------------- /images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/avatar.jpg -------------------------------------------------------------------------------- /images/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/back.jpg -------------------------------------------------------------------------------- /images/kid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/kid.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/logo.png -------------------------------------------------------------------------------- /images/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/logo_white.png -------------------------------------------------------------------------------- /images/micra.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/micra.jpg -------------------------------------------------------------------------------- /images/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/images/sad.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=C:\flutter" 4 | export "FLUTTER_APPLICATION_PATH=C:\flutterprojects\musicplayer" 5 | export "FLUTTER_TARGET=lib\main.dart" 6 | export "FLUTTER_BUILD_DIR=build" 7 | export "SYMROOT=${SOURCE_ROOT}/../build\ios" 8 | export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios" 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0910; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 289 | CLANG_WARN_STRICT_PROTOTYPES = YES; 290 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = dwarf; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | ENABLE_TESTABILITY = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 97C147041CF9000F007C117D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | 97C147061CF9000F007C117D /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 371 | buildSettings = { 372 | ARCHS = arm64; 373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 374 | CURRENT_PROJECT_VERSION = 1; 375 | ENABLE_BITCODE = NO; 376 | FRAMEWORK_SEARCH_PATHS = ( 377 | "$(inherited)", 378 | "$(PROJECT_DIR)/Flutter", 379 | ); 380 | INFOPLIST_FILE = Runner/Info.plist; 381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 382 | LIBRARY_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "$(PROJECT_DIR)/Flutter", 385 | ); 386 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.musicplayer; 387 | PRODUCT_NAME = "$(TARGET_NAME)"; 388 | VERSIONING_SYSTEM = "apple-generic"; 389 | }; 390 | name = Debug; 391 | }; 392 | 97C147071CF9000F007C117D /* Release */ = { 393 | isa = XCBuildConfiguration; 394 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 395 | buildSettings = { 396 | ARCHS = arm64; 397 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 398 | CURRENT_PROJECT_VERSION = 1; 399 | ENABLE_BITCODE = NO; 400 | FRAMEWORK_SEARCH_PATHS = ( 401 | "$(inherited)", 402 | "$(PROJECT_DIR)/Flutter", 403 | ); 404 | INFOPLIST_FILE = Runner/Info.plist; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 406 | LIBRARY_SEARCH_PATHS = ( 407 | "$(inherited)", 408 | "$(PROJECT_DIR)/Flutter", 409 | ); 410 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.musicplayer; 411 | PRODUCT_NAME = "$(TARGET_NAME)"; 412 | VERSIONING_SYSTEM = "apple-generic"; 413 | }; 414 | name = Release; 415 | }; 416 | /* End XCBuildConfiguration section */ 417 | 418 | /* Begin XCConfigurationList section */ 419 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 420 | isa = XCConfigurationList; 421 | buildConfigurations = ( 422 | 97C147031CF9000F007C117D /* Debug */, 423 | 97C147041CF9000F007C117D /* Release */, 424 | ); 425 | defaultConfigurationIsVisible = 0; 426 | defaultConfigurationName = Release; 427 | }; 428 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 429 | isa = XCConfigurationList; 430 | buildConfigurations = ( 431 | 97C147061CF9000F007C117D /* Debug */, 432 | 97C147071CF9000F007C117D /* Release */, 433 | ); 434 | defaultConfigurationIsVisible = 0; 435 | defaultConfigurationName = Release; 436 | }; 437 | /* End XCConfigurationList section */ 438 | }; 439 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 440 | } 441 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danijelconsulting/Flutter-MusicPlayer/0d7f5f903b07b45848fee4389f96d56b207c2f76/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | musicplayer 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/database/database_client.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:flute_music_player/flute_music_player.dart'; 5 | import 'package:path/path.dart'; 6 | import 'package:path_provider/path_provider.dart'; 7 | import 'package:sqflite/sqflite.dart'; 8 | 9 | class DatabaseClient { 10 | Database _db; 11 | Song song; 12 | Future create() async { 13 | Directory path = await getApplicationDocumentsDirectory(); 14 | String dbpath = join(path.path, "database.db"); 15 | _db = await openDatabase(dbpath, version: 1, onCreate: this._create); 16 | } 17 | 18 | Future _create(Database db, int version) async { 19 | await db.execute(""" 20 | CREATE TABLE songs(id NUMBER,title TEXT,duration NUMBER,albumArt TEXT,album TEXT,uri TEXT,artist TEXT,albumId NUMBER,isFav number NOT NULL default 0,timestamp number,count number not null default 0) 21 | """); 22 | await db.execute(""" 23 | CREATE TABLE recents(id integer primary key autoincrement,title TEXT,duration NUMBER,albumArt TEXT,album TEXT,uri TEXT,artist TEXT,albumId NUMBER) 24 | """); 25 | } 26 | 27 | Future upsertSOng(Song song) async { 28 | if (song.count == null) { 29 | song.count = 0; 30 | } 31 | if (song.timestamp == null) { 32 | song.timestamp = 0; 33 | } 34 | if (song.isFav == null) { 35 | song.isFav = 0; 36 | } 37 | int id = 0; 38 | var count = Sqflite.firstIntValue(await _db 39 | .rawQuery("SELECT COUNT(*) FROM songs WHERE id = ?", [song.id])); 40 | if (count == 0) { 41 | id = await _db.insert("songs", song.toMap()); 42 | } else { 43 | await _db 44 | .update("songs", song.toMap(), where: "id= ?", whereArgs: [song.id]); 45 | } 46 | return id; 47 | } 48 | 49 | Future updateList(Song song) async { 50 | song.count = 0; 51 | song.timestamp = new DateTime.now().millisecondsSinceEpoch; 52 | ; 53 | song.isFav = 0; 54 | 55 | int id = 0; 56 | var count = Sqflite.firstIntValue(await _db 57 | .rawQuery("SELECT COUNT(*) FROM songs WHERE title = ?", [song.title])); 58 | if (count == 0) { 59 | id = await _db.insert("songs", song.toMap()); 60 | } 61 | return id; 62 | } 63 | 64 | Future alreadyLoaded() async { 65 | var count = 66 | Sqflite.firstIntValue(await _db.rawQuery("SELECT COUNT(*) FROM songs")); 67 | if (count > 0) { 68 | return true; 69 | } else { 70 | return false; 71 | } 72 | } 73 | 74 | Future> fetchSongs() async { 75 | List results = 76 | await _db.query("songs", columns: Song.Columns, orderBy: "title"); 77 | List songs = new List(); 78 | results.forEach((s) { 79 | Song song = new Song.fromMap(s); 80 | songs.add(song); 81 | }); 82 | return songs; 83 | } 84 | 85 | Future> fetchSongsfromAlbum(int id) async { 86 | List results = 87 | await _db.query("songs", columns: Song.Columns, where: "albumid=$id"); 88 | List songs = new List(); 89 | results.forEach((s) { 90 | Song song = new Song.fromMap(s); 91 | songs.add(song); 92 | }); 93 | return songs; 94 | } 95 | 96 | Future> fetchAlbum() async { 97 | // List results = await _db.query("songs", 98 | // distinct: true, 99 | //columns: Song.Columns ); 100 | List results = await _db.rawQuery( 101 | "select distinct albumid,album,artist ,albumArt from songs group by album order by album"); 102 | List songs = new List(); 103 | results.forEach((s) { 104 | Song song = new Song.fromMap(s); 105 | songs.add(song); 106 | }); 107 | return songs; 108 | } 109 | 110 | Future> fetchArtist() async { 111 | // List results = await _db.query("songs", 112 | // distinct: true, 113 | //columns: Song.Columns ); 114 | List results = await _db.rawQuery( 115 | "select distinct artist,album,albumArt from songs group by artist order by artist"); 116 | List songs = new List(); 117 | results.forEach((s) { 118 | Song song = new Song.fromMap(s); 119 | songs.add(song); 120 | }); 121 | return songs; 122 | } 123 | 124 | Future> fetchSongsByArtist(String artist) async { 125 | // List results = await _db.query("songs", 126 | // distinct: true, 127 | //columns: Song.Columns ); 128 | List results = await _db.query("songs", 129 | columns: Song.Columns, where: "artist='$artist'"); 130 | List songs = new List(); 131 | results.forEach((s) { 132 | Song song = new Song.fromMap(s); 133 | songs.add(song); 134 | }); 135 | return songs; 136 | } 137 | 138 | Future> fetchRandomAlbum() async { 139 | // List results = await _db.query("songs", 140 | // distinct: true, 141 | //columns: Song.Columns ); 142 | List results = await _db.rawQuery( 143 | "select distinct albumid,album,artist,albumArt from songs group by album order by RANDOM() limit 10"); 144 | List songs = new List(); 145 | results.forEach((s) { 146 | Song song = new Song.fromMap(s); 147 | songs.add(song); 148 | }); 149 | return songs; 150 | } 151 | 152 | Future upsertSong(Song song) async { 153 | int id = 0; 154 | var count = Sqflite.firstIntValue(await _db 155 | .rawQuery("SELECT COUNT(*) FROM recents WHERE id = ?", [song.id])); 156 | if (count == 0) { 157 | id = await _db.insert("recents", song.toMap()); 158 | } else { 159 | 160 | await _db.update("recents", song.toMap(), 161 | where: "id= ?", whereArgs: [song.id]); 162 | } 163 | return id; 164 | } 165 | 166 | Future> fetchRecentSong() async { 167 | List results = 168 | await _db.rawQuery("select * from songs order by timestamp desc limit 25"); 169 | List songs = new List(); 170 | results.forEach((s) { 171 | Song song = new Song.fromMap(s); 172 | songs.add(song); 173 | }); 174 | return songs; 175 | } 176 | 177 | Future> fetchTopSong() async { 178 | List results = 179 | await _db.rawQuery("select * from songs order by count desc limit 25"); 180 | List songs = new List(); 181 | results.forEach((s) { 182 | Song song = new Song.fromMap(s); 183 | songs.add(song); 184 | }); 185 | return songs; 186 | } 187 | 188 | Future updateSong(Song song) async { 189 | int id = 0; 190 | // id==9999 for shared song 191 | var count = Sqflite.firstIntValue(await _db 192 | .rawQuery("SELECT COUNT FROM songs WHERE id = ?", [song.id])); 193 | 194 | if (song.count == null) { 195 | song.count = 0; 196 | } 197 | song.count += 1; 198 | await _db.update("songs", song.toMap(), 199 | where: "id= ?", whereArgs: [song.id]); 200 | 201 | return id; 202 | } 203 | 204 | Future isfav(Song song) async { 205 | var c = Sqflite.firstIntValue( 206 | await _db.rawQuery("select isFav from songs where is=${song.id}")); 207 | if (c == 0) { 208 | return 1; 209 | } else { 210 | return 0; 211 | } 212 | } 213 | 214 | Future favSong(Song song) async { 215 | // var c = Sqflite.firstIntValue( 216 | // await _db.rawQuery("select isFav from songs where id=${song.id}")); 217 | // if (c == 0) { 218 | await _db.rawQuery("update songs set isFav =1 where id=${song.id}"); 219 | return "added"; 220 | // } else { 221 | // await _db.rawQuery("update songs set isFav =0 where id=${song.id}"); 222 | // return "removed"; 223 | // } 224 | } 225 | 226 | Future fetchLastSong() async { 227 | List results = await _db 228 | .rawQuery("select * from songs order by timestamp desc limit 1"); 229 | Song song; 230 | results.forEach((s) { 231 | song = new Song.fromMap(s); 232 | }); 233 | return song; 234 | } 235 | 236 | Future> fetchFavSong() async { 237 | List results = await _db.rawQuery("select * from songs where isFav=1"); 238 | List songs = new List(); 239 | results.forEach((s) { 240 | Song song = new Song.fromMap(s); 241 | songs.add(song); 242 | }); 243 | return songs; 244 | } 245 | 246 | Future removeFavSong(Song song) async { 247 | await _db.rawQuery("update songs set isFav= 0 where id=${song.id}"); 248 | 249 | return true; 250 | } 251 | Future> searchSong(String q) async { 252 | 253 | List results = 254 | await _db.rawQuery("select * from songs where title like '%$q%'"); 255 | List songs = new List(); 256 | results.forEach((s) { 257 | Song song = new Song.fromMap(s); 258 | songs.add(song); 259 | }); 260 | return songs; 261 | } 262 | 263 | Future> fetchSongById(int id) async { 264 | List results = await _db.rawQuery("select * from songs where id=$id"); 265 | List songs = new List(); 266 | results.forEach((s) { 267 | Song song = new Song.fromMap(s); 268 | songs.add(song); 269 | }); 270 | return songs; 271 | } 272 | } 273 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:dynamic_theme/dynamic_theme.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:musicplayer/pages/Walkthrough.dart'; 4 | import 'package:musicplayer/sc_model/model.dart'; 5 | import 'package:scoped_model/scoped_model.dart'; 6 | 7 | void main() => runApp(new MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return new DynamicTheme( 13 | defaultBrightness: Brightness.light, 14 | data: (brightness) => 15 | new ThemeData( 16 | primarySwatch: Colors.deepPurple, 17 | accentColor: Colors.deepPurpleAccent, 18 | fontFamily: 'Raleway', 19 | brightness: brightness, 20 | ), 21 | themedWidgetBuilder: (context, theme) { 22 | return ScopedModel( 23 | model: new SongModel(), 24 | child: new MaterialApp( 25 | 26 | title: 'Music Player', 27 | theme: theme, 28 | debugShowCheckedModeBanner: false, 29 | home: new SplashScreen(), 30 | ), 31 | ); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/musichome.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:flute_music_player/flute_music_player.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/services.dart'; 7 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 8 | import 'package:musicplayer/database/database_client.dart'; 9 | import 'package:musicplayer/pages/about.dart'; 10 | import 'package:musicplayer/pages/material_search.dart'; 11 | import 'package:musicplayer/pages/now_playing.dart'; 12 | import 'package:musicplayer/pages/settings.dart'; 13 | import 'package:musicplayer/util/lastplay.dart'; 14 | import 'package:musicplayer/views/album.dart'; 15 | import 'package:musicplayer/views/artists.dart'; 16 | import 'package:musicplayer/views/home.dart'; 17 | import 'package:musicplayer/views/playlists.dart'; 18 | import 'package:musicplayer/views/songs.dart'; 19 | import 'package:share/share.dart'; 20 | import 'package:url_launcher/url_launcher.dart'; 21 | class MusicHome extends StatefulWidget { 22 | List songs; 23 | MusicHome(); 24 | final bottomItems = [ 25 | new BottomItem("Home", Icons.home), 26 | new BottomItem("Albums", Icons.album), 27 | new BottomItem("Songs", Icons.music_note), 28 | new BottomItem("Artists", Icons.person), 29 | new BottomItem("PlayList", Icons.playlist_add_check), 30 | ]; 31 | @override 32 | State createState() { 33 | return new _musicState(); 34 | } 35 | } 36 | 37 | class _musicState extends Statewith SingleTickerProviderStateMixin { 38 | int _selectedDrawerIndex = 0; 39 | List songs; 40 | String title = "Music player"; 41 | DatabaseClient db; 42 | bool isLoading = true; 43 | Song last; 44 | Color color = Colors.deepPurple; 45 | int currentIndex = 0; 46 | final pageController = PageController(); 47 | var pages; 48 | 49 | _onSelectItem(int index) { 50 | setState(() => currentIndex = index); 51 | // getDrawerItemWidget(_selectedDrawerIndex); 52 | 53 | 54 | } 55 | 56 | @override 57 | void initState() { 58 | super.initState(); 59 | getLast(); 60 | pages=[Home(db),Artists(db),Songs(db), Album(db),PlayList(db)]; 61 | 62 | } 63 | 64 | 65 | @override 66 | void dispose() async { 67 | super.dispose(); 68 | } 69 | // getSharedData() async { 70 | // const platform = const MethodChannel('app.channel.shared.data'); 71 | // Map sharedData = await platform.invokeMethod("getSharedData"); 72 | // if (sharedData != null) { 73 | // if (sharedData["albumArt"] == "null") { 74 | // sharedData["albumArt"] = null; 75 | // } 76 | // Song song = new Song( 77 | // 9999 /*random*/, 78 | // sharedData["artist"], 79 | // sharedData["title"], 80 | // sharedData["album"], 81 | // null, 82 | // int.parse(sharedData["duration"]), 83 | // sharedData["uri"], 84 | // sharedData["albumArt"]); 85 | // List list = new List(); 86 | // list.add((song)); 87 | // MyQueue.songs = list; 88 | // Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 89 | // return new NowPlaying(null, list, 0, 0); 90 | // })); 91 | // } 92 | // } 93 | 94 | void getLast() async { 95 | db = new DatabaseClient(); 96 | await db.create(); 97 | last = await db.fetchLastSong(); 98 | songs = await db.fetchSongs(); 99 | setState(() { 100 | songs = songs; 101 | isLoading = false; 102 | }); 103 | 104 | } 105 | void onTap(int index) { 106 | pageController.jumpToPage(index); 107 | title = widget.bottomItems[index].title; 108 | } 109 | void onPageChanged(int index) { 110 | setState(() { 111 | currentIndex = index; 112 | }); 113 | title = widget.bottomItems[index].title; 114 | } 115 | 116 | 117 | GlobalKey scaffoldState = new GlobalKey(); 118 | @override 119 | Widget build(BuildContext context) { 120 | var bottomOptions = []; 121 | for (var i = 0; i < widget.bottomItems.length; i++) { 122 | var d = widget.bottomItems[i]; 123 | bottomOptions.add( 124 | new BottomNavigationBarItem( 125 | icon: new Icon( 126 | d.icon, 127 | ), 128 | title: new Text(d.title), 129 | backgroundColor: Theme.of(context).primaryColor, 130 | ), 131 | ); 132 | } 133 | return new WillPopScope( 134 | child: new Scaffold( 135 | key: scaffoldState, 136 | appBar: currentIndex == 0 137 | ? null 138 | : new AppBar( 139 | title: new Text(title), 140 | actions: [ 141 | new IconButton( 142 | icon: Icon(Icons.search), 143 | onPressed: () { 144 | Navigator.of(context) 145 | .push(new MaterialPageRoute(builder: (context) { 146 | return new SearchSong(db, songs); 147 | })); 148 | }) 149 | ], 150 | ), 151 | floatingActionButton: new FloatingActionButton( 152 | child: new Icon(Icons.play_circle_filled), 153 | onPressed: () async { 154 | Navigator.of(context) 155 | .push(new MaterialPageRoute(builder: (context) { 156 | if (MyQueue.songs == null) { 157 | List list = new List(); 158 | list.add(last); 159 | MyQueue.songs = list; 160 | return new NowPlaying(db, list, 0, 0); 161 | } else 162 | return new NowPlaying(db, MyQueue.songs, MyQueue.index, 1); 163 | })); 164 | //} 165 | }), 166 | drawer: new Drawer( 167 | child: SingleChildScrollView( 168 | child: new Column( 169 | children: [ 170 | new UserAccountsDrawerHeader( 171 | accountName: new Text("Music player"), 172 | accountEmail: null, 173 | currentAccountPicture: CircleAvatar( 174 | child: Image.asset("images/logo.png"), 175 | backgroundColor: Colors.white, 176 | ), 177 | ), 178 | new Column( 179 | children: [ 180 | new ListTile( 181 | leading: new Icon(Icons.settings, 182 | color: Theme 183 | .of(context) 184 | .accentColor), 185 | title: new Text("Settings"), 186 | onTap: () { 187 | Navigator.of(context).pop(); 188 | Navigator.of(context) 189 | .push(new MaterialPageRoute(builder: (context) { 190 | return new Settings(); 191 | })); 192 | }), 193 | new ListTile( 194 | leading: new Icon(Icons.info, 195 | color: Theme 196 | .of(context) 197 | .accentColor), 198 | title: new Text("About"), 199 | onTap: () { 200 | Navigator.of(context).pop(); 201 | Navigator.push(context, 202 | new MaterialPageRoute(builder: (context) { 203 | return new About(); 204 | })); 205 | }, 206 | ), 207 | Divider(), 208 | new ListTile( 209 | leading: Icon(Icons.share, 210 | color: Theme 211 | .of(context) 212 | .accentColor), 213 | title: Text("Share"), 214 | onTap: () { 215 | Share.share( 216 | "Hey, checkout this cool music player at https://play.google.com/store/apps/details?id=com.onedreamers.musicplayer"); 217 | Navigator.of(context).pop(); 218 | }, 219 | ), 220 | new ListTile( 221 | leading: Icon(Icons.star, 222 | color: Theme 223 | .of(context) 224 | .accentColor), 225 | title: Text("Rate the app"), 226 | onTap: () { 227 | Navigator.of(context).pop(); 228 | 229 | launchUrl( 230 | "https://play.google.com/store/apps/details?id=com.onedreamers.musicplayer"); 231 | }, 232 | ), 233 | new ListTile( 234 | leading: Icon(FontAwesomeIcons.donate, 235 | color: Theme 236 | .of(context) 237 | .accentColor), 238 | title: Text("Donate"), 239 | onTap: () { 240 | Navigator.of(context).pop(); 241 | launchUrl("http://paypal.me/amangautam1"); 242 | }, 243 | ) 244 | ], 245 | ) 246 | ], 247 | ), 248 | ), 249 | ), 250 | body: isLoading 251 | ? new Center( 252 | child: new CircularProgressIndicator(), 253 | ) 254 | : Padding( 255 | padding: EdgeInsets.only(bottom: 0), 256 | child: PageView( 257 | controller: pageController, 258 | children: pages, 259 | onPageChanged: onPageChanged, // 260 | physics: NeverScrollableScrollPhysics (), // 261 | )), 262 | 263 | bottomNavigationBar: BottomNavigationBar( 264 | items: bottomOptions, 265 | onTap: onTap, 266 | currentIndex: currentIndex, 267 | ), 268 | 269 | 270 | ), 271 | onWillPop: _onWillPop, 272 | ); 273 | } 274 | 275 | Future _onWillPop() { 276 | if (currentIndex != 0) { 277 | onTap(0); 278 | } else { 279 | if (Platform.isAndroid) { 280 | if (Navigator.of(context).canPop()) { 281 | return Future.value(true); 282 | } else { 283 | const platform = const MethodChannel('android_app_retain'); 284 | platform.invokeMethod("sendToBackground"); 285 | return Future.value(false); 286 | } 287 | } else { 288 | return Future.value(true); 289 | } 290 | } 291 | 292 | 293 | } 294 | 295 | 296 | launchUrl(url) async { 297 | if (await canLaunch(url)) { 298 | await launch(url); 299 | } else { 300 | throw 'could not open'; 301 | } 302 | } 303 | } 304 | 305 | class BottomItem { 306 | String title; 307 | IconData icon; 308 | BottomItem(this.title, this.icon); 309 | } 310 | -------------------------------------------------------------------------------- /lib/pages/NoMusicFound.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter/widgets.dart'; 4 | 5 | class NoMusicFound extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return WillPopScope( 9 | onWillPop: _onWillPop, 10 | child: new Scaffold( 11 | appBar: AppBar( 12 | title: Text("Music player"), 13 | centerTitle: true, 14 | automaticallyImplyLeading: false, 15 | ), 16 | backgroundColor: Colors.deepPurple, 17 | body: new Center( 18 | child: SingleChildScrollView( 19 | child: Column( 20 | children: [ 21 | Padding( 22 | padding: const EdgeInsets.all(20.0), 23 | child: Image.asset( 24 | "images/sad.png", 25 | height: 200, 26 | width: 200, 27 | fit: BoxFit.cover, 28 | ), 29 | ), 30 | Padding( 31 | padding: const EdgeInsets.all(20.0), 32 | child: Text( 33 | "Sorry ", 34 | style: TextStyle( 35 | color: Colors.white, 36 | fontSize: 40, 37 | ), 38 | ), 39 | ), 40 | Text( 41 | " No music found!!", 42 | style: TextStyle( 43 | color: Colors.white, 44 | fontSize: 30, 45 | ), 46 | ), 47 | Padding( 48 | padding: const EdgeInsets.all(50.0), 49 | child: RaisedButton.icon( 50 | icon: Icon(Icons.exit_to_app), 51 | onPressed: () { 52 | SystemNavigator.pop(); 53 | }, 54 | elevation: 6.0, 55 | label: Text("Exit"), 56 | ), 57 | ) 58 | ], 59 | ), 60 | ), 61 | )), 62 | ); 63 | } 64 | 65 | Future _onWillPop() { 66 | SystemNavigator.pop(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/pages/Walkthrough.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:musicplayer/database/database_client.dart'; 4 | import 'package:musicplayer/musichome.dart'; 5 | import 'package:musicplayer/pages/NoMusicFound.dart'; 6 | 7 | class SplashScreen extends StatefulWidget { 8 | 9 | 10 | @override 11 | State createState() { 12 | return new SplashState(); 13 | } 14 | } 15 | 16 | class SplashState extends State { 17 | var db; 18 | var isLoading = false; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | loadSongs(); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | 29 | return new Scaffold( 30 | backgroundColor: Colors.deepPurple, 31 | body: SafeArea( 32 | child: new Container( 33 | height: MediaQuery.of(context).size.height, 34 | child: Column( 35 | mainAxisAlignment: MainAxisAlignment.center, 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | children: [ 38 | Row( 39 | mainAxisAlignment: MainAxisAlignment.center, 40 | children: [ 41 | Image.asset("images/kid.png", height: 200, width: 200, 42 | fit: BoxFit.cover,), 43 | ], 44 | ), 45 | Container( 46 | margin: EdgeInsets.only( 47 | top: MediaQuery.of(context).size.height / 5), 48 | child: Text( 49 | "Music player", 50 | style: TextStyle( 51 | color: Colors.white, 52 | fontSize: 40, 53 | ), 54 | ), 55 | ), 56 | 57 | Expanded( 58 | child: Center( 59 | child: isLoading ? CircularProgressIndicator( 60 | backgroundColor: Colors.white, 61 | ) : Container(), 62 | ), 63 | ), 64 | Text("Setting up...", 65 | style: TextStyle(color: Colors.white, fontSize: 20)) 66 | 67 | ], 68 | ), 69 | ), 70 | )); 71 | } 72 | 73 | loadSongs() async { 74 | setState(() { 75 | isLoading = true; 76 | }); 77 | var db = new DatabaseClient(); 78 | await db.create(); 79 | if (await db.alreadyLoaded()) { 80 | // Navigator.of(context).pop(); 81 | Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (context) { 82 | return new MusicHome(); 83 | })); 84 | } else { 85 | var songs; 86 | try { 87 | songs = await MusicFinder.allSongs(); 88 | List list = new List.from(songs); 89 | 90 | if (list == null || list.length == 0) { 91 | print("List-> $list"); 92 | 93 | Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (context) { 94 | return new NoMusicFound(); 95 | })); 96 | } 97 | else { 98 | for (Song song in list) 99 | db.upsertSOng(song); 100 | if (!mounted) { 101 | return; 102 | } 103 | 104 | Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (context) { 105 | return new MusicHome(); 106 | })); 107 | } 108 | } catch (e) { 109 | print("failed to get songs"); 110 | } 111 | } 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /lib/pages/about.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:url_launcher/url_launcher.dart'; 4 | 5 | class About extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return new Scaffold( 9 | appBar: new AppBar( 10 | title: new Text("About"), 11 | ), 12 | body: SingleChildScrollView( 13 | child: new Center( 14 | child: new Container( 15 | child: new Column(children: [ 16 | new Card( 17 | child: Row( 18 | children: [ 19 | Image.asset( 20 | "images/logo.png", 21 | height: 150, 22 | width: 150, 23 | ), 24 | Text( 25 | "Music player", 26 | style: TextStyle(fontSize: 30), 27 | ) 28 | ], 29 | ), 30 | ), 31 | new Card( 32 | child: new Column( 33 | children: [ 34 | new CircleAvatar( 35 | radius: 30.0, 36 | backgroundImage: new AssetImage("images/avatar.jpg"), 37 | ), 38 | Text( 39 | "Aman gautam", 40 | style: TextStyle(fontSize: 30), 41 | ), 42 | Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | IconButton( 46 | icon: Icon( 47 | Icons.mail, 48 | color: Colors.deepPurpleAccent, 49 | size: 25, 50 | ), 51 | onPressed: () => 52 | launchUrl( 53 | "mailto:amangautam208@gmail.com")), 54 | IconButton( 55 | icon: Icon( 56 | FontAwesomeIcons.linkedinIn, 57 | color: Colors.deepPurpleAccent, 58 | size: 25, 59 | ), 60 | onPressed: () => 61 | launchUrl( 62 | "https://www.linkedin.com/in/amangautam1/")), 63 | new IconButton( 64 | icon: new Icon(FontAwesomeIcons.githubSquare, 65 | color: Colors.deepPurpleAccent, size: 25), 66 | onPressed: () => 67 | launchUrl( 68 | "https://github.com/amangautam1/flutter-musicplayer"), 69 | ) 70 | ], 71 | ), 72 | ], 73 | ), 74 | ), 75 | Card( 76 | child: Stack( 77 | children: [ 78 | Positioned( 79 | child: Image.asset( 80 | "images/kid.png", height: 250, width: 170, 81 | fit: BoxFit.fill, 82 | ), 83 | right: 45.0, 84 | bottom: 0.0, 85 | ), 86 | Column( 87 | children: [ 88 | Text( 89 | "References", 90 | style: TextStyle(fontSize: 25), 91 | ), 92 | ListTile( 93 | title: Text("flute_music_player"), 94 | trailing: IconButton( 95 | icon: new Icon(FontAwesomeIcons.github, 96 | color: Colors.deepPurpleAccent, size: 25), 97 | onPressed: () => 98 | launchUrl( 99 | "https://github.com/iampawan/Flute-Music-Player"), 100 | ), 101 | ), 102 | ListTile( 103 | title: Text("sqflite"), 104 | trailing: IconButton( 105 | icon: new Icon(FontAwesomeIcons.github, 106 | color: Colors.deepPurpleAccent, size: 25), 107 | onPressed: () => 108 | launchUrl( 109 | "https://github.com/tekartik/sqflite"), 110 | ), 111 | ), 112 | ListTile( 113 | title: Text("dynamic_theme"), 114 | trailing: IconButton( 115 | icon: new Icon(FontAwesomeIcons.github, 116 | color: Colors.deepPurpleAccent, size: 25), 117 | onPressed: () => 118 | launchUrl( 119 | "https://github.com/Norbert515/dynamic_theme"), 120 | ), 121 | ), 122 | ListTile( 123 | title: Text("floating_search_bar"), 124 | trailing: IconButton( 125 | icon: new Icon(FontAwesomeIcons.github, 126 | color: Colors.deepPurpleAccent, size: 25), 127 | onPressed: () => 128 | launchUrl( 129 | "https://github.com/AppleEducate/plugins/tree/master/packages/floating_search_bar"), 130 | ), 131 | ), 132 | ListTile( 133 | title: Text("scoped_model"), 134 | trailing: IconButton( 135 | icon: new Icon(FontAwesomeIcons.github, 136 | color: Colors.deepPurpleAccent, size: 25), 137 | onPressed: () => 138 | launchUrl( 139 | "https://github.com/brianegan/scoped_model"), 140 | ), 141 | ), 142 | ListTile( 143 | title: Text("font_awesome_flutter"), 144 | trailing: IconButton( 145 | icon: new Icon(FontAwesomeIcons.github, 146 | color: Colors.deepPurpleAccent, size: 25), 147 | onPressed: () => 148 | launchUrl( 149 | "https://github.com/brianegan/font_awesome_flutter"), 150 | ), 151 | ) 152 | 153 | ], 154 | ), 155 | ], 156 | ), 157 | ), 158 | Card( 159 | child: Row( 160 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 161 | children: [ 162 | Image.asset( 163 | "images/logo.png", 164 | height: 50, 165 | width: 50, 166 | ), 167 | Flexible( 168 | child: Text( 169 | "Logo designed with www.designevo.com", 170 | style: TextStyle(fontSize: 10), 171 | maxLines: 2, 172 | ), 173 | ), 174 | ], 175 | ), 176 | ) 177 | ])), 178 | ), 179 | )); 180 | } 181 | 182 | launchUrl(url) async { 183 | if (await canLaunch(url)) { 184 | await launch(url); 185 | } else { 186 | throw 'could not open'; 187 | } 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/pages/about_new.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:clippy_flutter/diagonal.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:url_launcher/url_launcher.dart'; 6 | 7 | class AboutNew extends StatelessWidget { 8 | static final double containerHeight = 300.0; 9 | double clipHeight = containerHeight * 0.35; 10 | DiagonalPosition position = DiagonalPosition.BOTTOM_RIGHT; 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | 15 | body: SingleChildScrollView( 16 | child: Stack(children: [ 17 | Image.network("http://imcmusiclessons.com/wp-content/uploads/2015/07/Music-Background-light-500.jpg",height: 500,), 18 | Column( 19 | children: [ 20 | Diagonal( 21 | position: position, 22 | clipHeight: clipHeight, 23 | child: Container( 24 | decoration: BoxDecoration( 25 | image: DecorationImage( 26 | image: NetworkImage( 27 | "http://www.micrasolution.com/assets/images/proj1-bg.png"), 28 | fit: BoxFit.cover, 29 | ), 30 | ), 31 | height: containerHeight, 32 | child: Padding( 33 | padding: EdgeInsets.fromLTRB(50, 80, 10, 70), 34 | child: Column( 35 | children: [ 36 | Row( 37 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 38 | children: [ 39 | CircleAvatar( 40 | backgroundImage: AssetImage("images/micra.jpg"), 41 | radius: 30, 42 | ), 43 | Padding( 44 | padding: const EdgeInsets.all(20.0), 45 | child: Text( 46 | "Micra Solution", 47 | style: TextStyle( 48 | fontSize: 25, color: Colors.white), 49 | ), 50 | ), 51 | ], 52 | ), 53 | Row( 54 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 55 | children: [ 56 | Icon(FontAwesomeIcons.facebook, 57 | color: Colors.white), 58 | Icon(FontAwesomeIcons.linkedinIn, 59 | color: Colors.white), 60 | Icon(Icons.email, color: Colors.white) 61 | ], 62 | ), 63 | RaisedButton.icon( 64 | icon: Icon(Icons.call, color: Colors.white), 65 | label: Text( 66 | "Contact us", 67 | style: TextStyle(color: Colors.white), 68 | ), 69 | color: Colors.deepPurple, 70 | shape: new RoundedRectangleBorder( 71 | borderRadius: new BorderRadius.circular(30.0)), 72 | onPressed: () => {}, 73 | ) 74 | ], 75 | ), 76 | ), 77 | ), 78 | ), 79 | Padding( 80 | padding: const EdgeInsets.all(8.0), 81 | child: new Card( 82 | child: new Column( 83 | children: [ 84 | Text("Developed by:", 85 | style: TextStyle(fontSize: 20),), 86 | Text( 87 | "Aman gautam", 88 | style: TextStyle(fontSize: 30), 89 | ), 90 | Row( 91 | mainAxisAlignment: MainAxisAlignment.center, 92 | children: [ 93 | IconButton( 94 | icon: Icon( 95 | Icons.mail, 96 | color: Colors.deepPurpleAccent, 97 | size: 25, 98 | ), 99 | onPressed: () => 100 | launchUrl("mailto:amangautam208@gmail.com")), 101 | IconButton( 102 | icon: Icon( 103 | FontAwesomeIcons.linkedinIn, 104 | color: Colors.deepPurpleAccent, 105 | size: 25, 106 | ), 107 | onPressed: () => launchUrl( 108 | "https://www.linkedin.com/in/amangautam1/")), 109 | new IconButton( 110 | icon: new Icon(FontAwesomeIcons.githubSquare, 111 | color: Colors.deepPurpleAccent, size: 25), 112 | onPressed: () => launchUrl( 113 | "https://github.com/amangautam1/flutter-musicplayer"), 114 | ) 115 | ], 116 | ), 117 | ], 118 | ), 119 | ), 120 | ), 121 | Card( 122 | child: Column( 123 | children: [ 124 | Text( 125 | "Open source plugins", 126 | style: TextStyle(fontSize: 25), 127 | ), 128 | ListTile( 129 | title: Text("flute_music_player"), 130 | trailing: IconButton( 131 | icon: new Icon(FontAwesomeIcons.github, 132 | color: Colors.deepPurpleAccent, size: 25), 133 | onPressed: () => launchUrl( 134 | "https://github.com/iampawan/Flute-Music-Player"), 135 | ), 136 | ), 137 | ListTile( 138 | title: Text("sqflite"), 139 | trailing: IconButton( 140 | icon: new Icon(FontAwesomeIcons.github, 141 | color: Colors.deepPurpleAccent, size: 25), 142 | onPressed: () => 143 | launchUrl("https://github.com/tekartik/sqflite"), 144 | ), 145 | ), 146 | ListTile( 147 | title: Text("dynamic_theme"), 148 | trailing: IconButton( 149 | icon: new Icon(FontAwesomeIcons.github, 150 | color: Colors.deepPurpleAccent, size: 25), 151 | onPressed: () => launchUrl( 152 | "https://github.com/Norbert515/dynamic_theme"), 153 | ), 154 | ), 155 | ListTile( 156 | title: Text("floating_search_bar"), 157 | trailing: IconButton( 158 | icon: new Icon(FontAwesomeIcons.github, 159 | color: Colors.deepPurpleAccent, size: 25), 160 | onPressed: () => launchUrl( 161 | "https://github.com/AppleEducate/plugins/tree/master/packages/floating_search_bar"), 162 | ), 163 | ), 164 | ListTile( 165 | title: Text("scoped_model"), 166 | trailing: IconButton( 167 | icon: new Icon(FontAwesomeIcons.github, 168 | color: Colors.deepPurpleAccent, size: 25), 169 | onPressed: () => launchUrl( 170 | "https://github.com/brianegan/scoped_model"), 171 | ), 172 | ), 173 | ListTile( 174 | title: Text("font_awesome_flutter"), 175 | trailing: IconButton( 176 | icon: new Icon(FontAwesomeIcons.github, 177 | color: Colors.deepPurpleAccent, size: 25), 178 | onPressed: () => launchUrl( 179 | "https://github.com/brianegan/font_awesome_flutter"), 180 | ), 181 | ) 182 | ], 183 | ), 184 | ), 185 | Card( 186 | child: Row( 187 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 188 | children: [ 189 | Image.asset( 190 | "images/logo.png", 191 | height: 50, 192 | width: 50, 193 | ), 194 | Flexible( 195 | child: Text( 196 | "Logo designed with www.designevo.com", 197 | style: TextStyle(fontSize: 10), 198 | maxLines: 2, 199 | ), 200 | ), 201 | ], 202 | ), 203 | ) 204 | ], 205 | ), 206 | new Positioned( 207 | //Place it at the top, and not use the entire screen 208 | top: 0.0, 209 | left: 0.0, 210 | right: 0.0, 211 | child: AppBar( 212 | title: Text('About Us'), 213 | backgroundColor: Colors.transparent, //No more green 214 | elevation: 0.0, //Shadow gone 215 | leading: IconButton( 216 | icon: Icon(Icons.arrow_back), 217 | onPressed: () => {Navigator.pop(context)}, 218 | ), 219 | ), 220 | ), 221 | ]), 222 | ), 223 | ); 224 | } 225 | 226 | launchUrl(url) async { 227 | if (await canLaunch(url)) { 228 | await launch(url); 229 | } else { 230 | throw 'could not open'; 231 | } 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /lib/pages/card_detail.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flute_music_player/flute_music_player.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:musicplayer/database/database_client.dart'; 6 | import 'package:musicplayer/pages/now_playing.dart'; 7 | import 'package:musicplayer/util/lastplay.dart'; 8 | import 'package:musicplayer/util/utility.dart'; 9 | 10 | class CardDetail extends StatefulWidget { 11 | int id; 12 | var album; 13 | Song song; 14 | int mode; 15 | DatabaseClient db; 16 | CardDetail(this.db, this.song, this.mode); 17 | @override 18 | State createState() { 19 | return new stateCardDetail(); 20 | } 21 | } 22 | 23 | class stateCardDetail extends State { 24 | List songs; 25 | bool isLoading = true; 26 | var image; 27 | @override 28 | void initState() { 29 | super.initState(); 30 | initAlbum(); 31 | } 32 | 33 | void initAlbum() async { 34 | image = widget.song.albumArt == null 35 | ? null 36 | : new File.fromUri(Uri.parse(widget.song.albumArt)); 37 | if (widget.mode == 0) 38 | songs = await widget.db.fetchSongsfromAlbum(widget.song.albumId); 39 | else 40 | songs = await widget.db.fetchSongsByArtist(widget.song.artist); 41 | setState(() { 42 | isLoading = false; 43 | }); 44 | } 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | final Orientation orientation = MediaQuery.of(context).orientation; 49 | return new Scaffold( 50 | body: isLoading 51 | ? new Center( 52 | child: new CircularProgressIndicator(), 53 | ) 54 | : new CustomScrollView( 55 | slivers: [ 56 | new SliverAppBar( 57 | expandedHeight: 58 | orientation == Orientation.portrait ? 350.0 : 200.0, 59 | floating: false, 60 | pinned: true, 61 | flexibleSpace: new FlexibleSpaceBar( 62 | title: widget.mode == 0 63 | ? new Text( 64 | widget.song.album, 65 | ) 66 | : new Text(widget.song.artist), 67 | background: new Stack( 68 | fit: StackFit.expand, 69 | children: [ 70 | new Hero( 71 | tag: widget.mode == 0 72 | ? widget.song.album 73 | : widget.song.artist, 74 | child: image != null 75 | ? new Image.file( 76 | image, 77 | fit: BoxFit.cover, 78 | ) 79 | : new Image.asset("images/back.jpg", 80 | fit: BoxFit.cover), 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | new SliverList( 87 | delegate: new SliverChildListDelegate([ 88 | new Padding( 89 | padding: const EdgeInsets.only(left: 8.0), 90 | child: new Text( 91 | widget.mode == 0 92 | ? widget.song.album 93 | : widget.song.artist, 94 | style: new TextStyle( 95 | fontSize: 30.0, fontWeight: FontWeight.bold), 96 | maxLines: 1, 97 | ), 98 | ), 99 | new Padding( 100 | padding: const EdgeInsets.only(left: 8.0), 101 | child: new Text( 102 | widget.mode == 0 ? widget.song.artist : "", 103 | style: new TextStyle(fontSize: 14.0), 104 | maxLines: 1, 105 | ), 106 | ), 107 | new Padding( 108 | padding: const EdgeInsets.only( 109 | left: 8.0, top: 10.0, bottom: 10.0), 110 | child: new Text(songs.length.toString() + " song(s)"), 111 | ), 112 | new Padding( 113 | padding: const EdgeInsets.only(left: 8.0), 114 | child: new Text("Songs", 115 | style: new TextStyle( 116 | fontSize: 18.0, 117 | fontWeight: FontWeight.bold, 118 | ))), 119 | ]), 120 | ), 121 | new SliverList( 122 | delegate: new SliverChildBuilderDelegate((builder, i) { 123 | return new ListTile( 124 | leading: new CircleAvatar( 125 | child: new Hero( 126 | tag: songs[i].id, 127 | child: avatar( 128 | context, getImage(songs[i]), songs[i].title), 129 | ), 130 | ), 131 | title: new Text(songs[i].title, 132 | maxLines: 1, style: new TextStyle(fontSize: 18.0)), 133 | subtitle: new Text( 134 | songs[i].artist, 135 | maxLines: 1, 136 | style: 137 | new TextStyle(fontSize: 12.0, color: Colors.grey), 138 | ), 139 | trailing: new Text( 140 | new Duration(milliseconds: songs[i].duration) 141 | .toString() 142 | .split('.') 143 | .first, 144 | style: new TextStyle( 145 | fontSize: 12.0, color: Colors.grey)), 146 | onTap: () { 147 | MyQueue.songs = songs; 148 | Navigator.of(context).push(new MaterialPageRoute( 149 | builder: (context) => 150 | new NowPlaying(widget.db, songs, i, 0))); 151 | }, 152 | ); 153 | }, childCount: songs.length), 154 | ), 155 | ], 156 | ), 157 | floatingActionButton: new FloatingActionButton( 158 | onPressed: () { 159 | MyQueue.songs = songs; 160 | Navigator.of(context).push(new MaterialPageRoute( 161 | builder: (context) => 162 | new NowPlaying(widget.db, MyQueue.songs, 0, 0))); 163 | }, 164 | child: new Icon(Icons.shuffle), 165 | ), 166 | ); 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /lib/pages/list_songs.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:musicplayer/database/database_client.dart'; 4 | import 'package:musicplayer/pages/now_playing.dart'; 5 | import 'package:musicplayer/util/lastplay.dart'; 6 | import 'package:musicplayer/util/utility.dart'; 7 | 8 | class ListSongs extends StatefulWidget { 9 | DatabaseClient db; 10 | int mode; 11 | Orientation orientation; 12 | // mode =1=>recent, 2=>top, 3=>fav 13 | ListSongs(this.db, this.mode, this.orientation); 14 | @override 15 | State createState() { 16 | return new _listSong(); 17 | } 18 | } 19 | 20 | class _listSong extends State { 21 | List songs; 22 | bool isLoading = true; 23 | 24 | @override 25 | void initState() { 26 | super.initState(); 27 | initSongs(); 28 | } 29 | 30 | void initSongs() async { 31 | switch (widget.mode) { 32 | case 1: 33 | songs = await widget.db.fetchRecentSong(); 34 | break; 35 | case 2: 36 | { 37 | songs = await widget.db.fetchTopSong(); 38 | break; 39 | } 40 | case 3: 41 | { 42 | songs = await widget.db.fetchFavSong(); 43 | break; 44 | } 45 | default: 46 | break; 47 | } 48 | print(songs.length); 49 | 50 | setState(() { 51 | isLoading = false; 52 | }); 53 | } 54 | 55 | Widget getTitle(int mode) { 56 | switch (mode) { 57 | case 1: 58 | return new Text("Recently played"); 59 | break; 60 | case 2: 61 | return new Text("Top tracks"); 62 | break; 63 | case 3: 64 | return new Text("Favourites"); 65 | break; 66 | default: 67 | return null; 68 | } 69 | } 70 | 71 | void _showDialog() { 72 | showDialog( 73 | context: context, 74 | builder: (BuildContext context) { 75 | return AlertDialog( 76 | title: new Text("Add songs"), 77 | content: new Text( 78 | "To add songs to favourite, long press any song from All songs tab."), 79 | actions: [ 80 | // usually buttons at the bottom of the dialog 81 | new FlatButton( 82 | child: new Text("Got it"), 83 | onPressed: () { 84 | Navigator.of(context).pop(); 85 | }, 86 | ), 87 | ], 88 | ); 89 | }, 90 | ); 91 | } 92 | @override 93 | Widget build(BuildContext context) { 94 | return new Scaffold( 95 | // appBar: widget.orientation == Orientation.portrait 96 | // ? new AppBar( 97 | // title: getTitle(widget.mode), 98 | // ) 99 | // : null, 100 | appBar: new AppBar( 101 | title: getTitle(widget.mode), 102 | actions: [ 103 | widget.mode == 3 ? IconButton( 104 | icon: Icon(Icons.add,), onPressed: () { 105 | _showDialog(); 106 | },) : Container() 107 | ], 108 | ), 109 | 110 | body: new Container( 111 | child: isLoading 112 | ? new Center( 113 | child: new CircularProgressIndicator(), 114 | ) 115 | : new ListView.builder( 116 | itemCount: songs.length == null ? 0 : songs.length, 117 | itemBuilder: (context, i) => 118 | Column( 119 | children: [ 120 | new Divider( 121 | height: 8.0, 122 | ), 123 | new ListTile( 124 | leading: new Hero( 125 | tag: songs[i].id, 126 | child: avatar( 127 | context, getImage(songs[i]), songs[i].title), 128 | ), 129 | title: new Text(songs[i].title, 130 | maxLines: 1, 131 | style: new TextStyle(fontSize: 18.0)), 132 | subtitle: new Text( 133 | songs[i].artist, 134 | maxLines: 1, 135 | style: new TextStyle( 136 | fontSize: 12.0, color: Colors.grey), 137 | ), 138 | trailing: widget.mode == 2 139 | ? new Text( 140 | (i + 1).toString(), 141 | style: new TextStyle( 142 | fontSize: 12.0, color: Colors.grey), 143 | ) 144 | : new Text( 145 | new Duration( 146 | milliseconds: songs[i].duration) 147 | .toString() 148 | .split('.') 149 | .first, 150 | style: new TextStyle( 151 | fontSize: 12.0, color: Colors.grey)), 152 | onTap: () { 153 | MyQueue.songs = songs; 154 | Navigator.of(context).push(new MaterialPageRoute( 155 | builder: (context) => new NowPlaying( 156 | widget.db, MyQueue.songs, i, 0))); 157 | }, 158 | onLongPress: () { 159 | if (widget.mode == 3) { 160 | showDialog( 161 | context: context, 162 | child: new AlertDialog( 163 | title: new Text( 164 | 'Are you sure want remove this from favourites?'), 165 | content: new Text(songs[i].title), 166 | actions: [ 167 | new FlatButton( 168 | onPressed: () => 169 | Navigator.of(context).pop(false), 170 | child: new Text( 171 | 'No', 172 | ), 173 | ), 174 | new FlatButton( 175 | onPressed: () { 176 | widget.db.removeFavSong(songs[i]); 177 | 178 | setState(() { 179 | songs.removeAt(i); 180 | }); 181 | Navigator.of(context).pop(); 182 | }, 183 | child: new Text('Yes'), 184 | ), 185 | ], 186 | ), 187 | ); 188 | } 189 | }, 190 | ), 191 | ], 192 | ), 193 | ), 194 | )); 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /lib/pages/material_search.dart: -------------------------------------------------------------------------------- 1 | import 'package:floating_search_bar/floating_search_bar.dart'; 2 | import 'package:flute_music_player/flute_music_player.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:musicplayer/database/database_client.dart'; 5 | import 'package:musicplayer/pages/now_playing.dart'; 6 | import 'package:musicplayer/util/lastplay.dart'; 7 | import 'package:musicplayer/util/utility.dart'; 8 | 9 | class SearchSong extends StatefulWidget { 10 | final DatabaseClient db; 11 | final List songs; 12 | 13 | SearchSong(this.db, this.songs); 14 | 15 | @override 16 | _SearchSongState createState() => _SearchSongState(); 17 | } 18 | 19 | class _SearchSongState extends State { 20 | List results; 21 | 22 | @override 23 | void initState() { 24 | super.initState(); 25 | results = []; 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | backgroundColor: Theme 32 | .of(context) 33 | .primaryColor, 34 | body: SafeArea( 35 | child: FloatingSearchBar.builder( 36 | itemCount: results.length, 37 | itemBuilder: (BuildContext context, int index) { 38 | return ListTile( 39 | leading: new Hero( 40 | tag: results[index].id, 41 | child: avatar( 42 | context, getImage(results[index]), results[index].title), 43 | ), 44 | title: new Text(results[index].title, 45 | maxLines: 1, style: new TextStyle(fontSize: 18.0)), 46 | subtitle: new Text( 47 | results[index].artist, 48 | maxLines: 1, 49 | style: new TextStyle(fontSize: 12.0, color: Colors.grey), 50 | ), 51 | trailing: new Text( 52 | new Duration(milliseconds: results[index].duration) 53 | .toString() 54 | .split('.') 55 | .first, 56 | style: new TextStyle(fontSize: 12.0, color: Colors.grey)), 57 | onTap: () { 58 | MyQueue.songs = results; 59 | Navigator.of(context).pop(); 60 | Navigator.of(context).push(new MaterialPageRoute( 61 | builder: (context) => 62 | new NowPlaying(widget.db, results, index, 0))); 63 | }, 64 | ); 65 | }, 66 | trailing: Icon(Icons.search), 67 | leading: IconButton( 68 | icon: Icon(Icons.arrow_back), 69 | onPressed: () { 70 | Navigator.of(context).pop(); 71 | }), 72 | onChanged: (String value) { 73 | if (value.trim() == "") { 74 | setState(() { 75 | results = []; 76 | }); 77 | } else { 78 | setState(() { 79 | results = widget.songs 80 | .where((song) => 81 | song.title 82 | .toLowerCase() 83 | .contains(value.toLowerCase()) || 84 | song.artist 85 | .toLowerCase() 86 | .contains(value.toLowerCase()) || 87 | song.album.toLowerCase().contains(value.toLowerCase())) 88 | .toList(); 89 | }); 90 | } 91 | print(results.length); 92 | }, 93 | onTap: () { 94 | print("On tap callled"); 95 | }, 96 | decoration: InputDecoration.collapsed( 97 | hintText: "Search song, artist or album", 98 | ), 99 | ), 100 | ), 101 | ); 102 | // return new Scaffold( 103 | // backgroundColor: Colors.deepPurple, 104 | // body: new SafeArea( 105 | 106 | // child: new MaterialSearch( 107 | // barBackgroundColor:Theme.of(context).accentColor, 108 | // iconColor: Colors.white, 109 | // placeholder: 'Search songs', //placeholder of the search bar text input 110 | // results: songs 111 | // .map((song) => new MaterialSearchResult( 112 | // value: song.title, //The value must be of type 113 | // text: song.title, //String that will be show in the list 114 | // icon: FontAwesomeIcons.compactDisc, 115 | // )) 116 | // .toList(), 117 | // onSelect: (dynamic selected) async { 118 | // if (selected == null) { 119 | // return; 120 | // } 121 | 122 | // results = songs.where((song) => song.title == selected).toList(); 123 | 124 | // Navigator.pop(context); 125 | // MyQueue.songs = results; 126 | // Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 127 | // return new NowPlaying(db, results, 0, 0); 128 | // })); 129 | // }, 130 | // onSubmit: (String value) { 131 | 132 | // }, 133 | // ), 134 | // )); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /lib/pages/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:dynamic_theme/dynamic_theme.dart'; 2 | import 'package:flute_music_player/flute_music_player.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:musicplayer/database/database_client.dart'; 5 | 6 | class Settings extends StatefulWidget { 7 | @override 8 | State createState() { 9 | return new _settingState(); 10 | } 11 | } 12 | 13 | class _settingState extends State { 14 | var isLoading = false; 15 | var selected = 0; 16 | var db; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | db = DatabaseClient(); 22 | db.create(); 23 | } 24 | 25 | @override 26 | GlobalKey scaffoldState = new GlobalKey(); 27 | 28 | Widget build(BuildContext context) { 29 | return new Scaffold( 30 | key: scaffoldState, 31 | appBar: new AppBar( 32 | title: new Text("Settings"), 33 | ), 34 | body: new Container( 35 | child: Column( 36 | children: [ 37 | new ListTile( 38 | leading: 39 | new Icon(Icons.style, color: Theme.of(context).accentColor), 40 | title: new Text(("Theme")), 41 | onTap: () { 42 | showDialog( 43 | context: context, 44 | builder: (context) { 45 | return new SimpleDialog( 46 | title: new Text("Select theme"), 47 | children: [ 48 | new ListTile( 49 | title: Text("Light"), 50 | onTap: () { 51 | DynamicTheme.of(context).setBrightness( 52 | Brightness.light 53 | ); 54 | 55 | Navigator.of(context).pop(); 56 | }, 57 | trailing: Theme 58 | .of(context) 59 | .brightness == 60 | Brightness.light 61 | ? Icon(Icons.check) 62 | : null, 63 | ), 64 | new ListTile( 65 | title: Text("Dark"), 66 | onTap: () { 67 | DynamicTheme.of(context).setBrightness( 68 | Brightness.dark); 69 | 70 | Navigator.of(context).pop(); 71 | }, 72 | trailing: Theme 73 | .of(context) 74 | .brightness == 75 | Brightness.dark 76 | ? Icon(Icons.check) 77 | : null, 78 | ), 79 | ], 80 | ); 81 | }); 82 | }), 83 | new Divider(), 84 | new ListTile( 85 | leading: new Icon( 86 | Icons.build, 87 | color: Theme.of(context).accentColor, 88 | ), 89 | title: new Text("Re-scan/Reset Media"), 90 | onTap: () async { 91 | setState(() { 92 | isLoading = true; 93 | }); 94 | var db = new DatabaseClient(); 95 | await db.create(); 96 | var songs; 97 | try { 98 | songs = await MusicFinder.allSongs(); 99 | } catch (e) { 100 | print("failed to get songs"); 101 | } 102 | List list = new List.from(songs); 103 | for (Song song in list) 104 | db.updateList(song); 105 | setState(() { 106 | isLoading = false; 107 | }); 108 | }, 109 | ), 110 | new Divider(), 111 | 112 | 113 | new Container( 114 | child: isLoading 115 | ? new Center( 116 | child: new Column( 117 | children: [ 118 | new CircularProgressIndicator(), 119 | new Text("Loading Songs"), 120 | ], 121 | ), 122 | ) 123 | : new Container()), 124 | ], 125 | ), 126 | ), 127 | ); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /lib/sc_model/model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | import 'package:scoped_model/scoped_model.dart'; 3 | 4 | class SongModel extends Model { 5 | Song _song; 6 | List albums, recents, songs; 7 | Song last; 8 | Song top; 9 | int mode = 2; 10 | 11 | Song get song => _song; 12 | 13 | void updateUI(Song song, db) async { 14 | _song = song; 15 | recents = await db.fetchRecentSong(); 16 | //recents.removeAt(0); 17 | top = await db.fetchTopSong().then((item) => item[0]); 18 | notifyListeners(); 19 | } 20 | 21 | void setMode(int mode) { 22 | this.mode = mode; 23 | notifyListeners(); 24 | } 25 | 26 | // void updateRecents(db)async{ 27 | // recents=await db.fetchRecentSong(); 28 | // recents.removeAt(0); 29 | // notifyListeners(); 30 | // } 31 | init(db) async { 32 | recents = (await db.fetchRecentSong()); 33 | recents.removeAt(0); // as it is showing in header 34 | notifyListeners(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/util/lastplay.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | 3 | class MyQueue { 4 | static List songs; // current playing queue 5 | static Song song; // current playing song 6 | static int index; // current playing song index 7 | static MusicFinder player = new MusicFinder(); 8 | static List allSongs; 9 | } 10 | -------------------------------------------------------------------------------- /lib/util/utility.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:typed_data'; 3 | 4 | import 'package:flute_music_player/flute_music_player.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | dynamic getImage(Song song) { 8 | return song.albumArt == null 9 | ? null 10 | : new File.fromUri(Uri.parse(song.albumArt)); 11 | } 12 | 13 | Widget avatar(context, File f, String title) { 14 | return new Material( 15 | borderRadius: new BorderRadius.circular(30.0), 16 | elevation: 2.0, 17 | child: f != null 18 | ? new CircleAvatar( 19 | backgroundColor: Theme.of(context).accentColor, 20 | backgroundImage: new FileImage( 21 | f, 22 | ), 23 | ) 24 | : new CircleAvatar( 25 | backgroundColor: Theme.of(context).accentColor, 26 | child: new Text(title[0].toUpperCase()), 27 | ), 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /lib/views/album.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:musicplayer/database/database_client.dart'; 4 | import 'package:musicplayer/pages/card_detail.dart'; 5 | import 'package:musicplayer/util/utility.dart'; 6 | 7 | class Album extends StatefulWidget { 8 | DatabaseClient db; 9 | Album(this.db); 10 | @override 11 | State createState() { 12 | return new _stateAlbum(); 13 | } 14 | } 15 | 16 | class _stateAlbum extends State with AutomaticKeepAliveClientMixin{ 17 | List songs; 18 | var f; 19 | bool isLoading = true; 20 | @override 21 | initState() { 22 | super.initState(); 23 | initAlbum(); 24 | } 25 | 26 | void initAlbum() async { 27 | // songs=await widget.db.fetchSongs(); 28 | songs = await widget.db.fetchAlbum(); 29 | setState(() { 30 | isLoading = false; 31 | }); 32 | } 33 | 34 | List _buildGridCards(BuildContext context) { 35 | return songs.map((song) { 36 | return Card( 37 | child: new InkResponse( 38 | child: Column( 39 | crossAxisAlignment: CrossAxisAlignment.start, 40 | children: [ 41 | new Hero( 42 | tag: song.album, 43 | child: AspectRatio( 44 | aspectRatio: 18 / 16, 45 | child: getImage(song) != null 46 | ? new Image.file( 47 | getImage(song), 48 | height: 120.0, 49 | fit: BoxFit.fill, 50 | ) 51 | : new Image.asset( 52 | "images/back.jpg", 53 | height: 120.0, 54 | fit: BoxFit.cover, 55 | ), 56 | ), 57 | ), 58 | Expanded( 59 | child: Padding( 60 | // padding: EdgeInsets.fromLTRB(16.0, 12.0, 16.0, 8.0), 61 | padding: EdgeInsets.fromLTRB(4.0, 8.0, 0.0, 0.0), 62 | child: Column( 63 | crossAxisAlignment: CrossAxisAlignment.start, 64 | children: [ 65 | Flexible( 66 | child: Text( 67 | song.album, 68 | style: new TextStyle(fontSize: 18.0), 69 | maxLines: 2, 70 | ), 71 | ), 72 | 73 | ], 74 | ), 75 | ), 76 | ), 77 | ], 78 | ), 79 | onTap: () { 80 | Navigator.push(context, new MaterialPageRoute(builder: (_) { 81 | return new CardDetail(widget.db, song, 0); 82 | })); 83 | /*Navigator 84 | .of(context) 85 | .push(new MaterialPageRoute(builder: (_) { 86 | return new CardDetail(widget.db, song, 0); 87 | }));*/ 88 | }, 89 | ), 90 | ); 91 | }).toList(); 92 | } 93 | 94 | @override 95 | Widget build(BuildContext context) { 96 | final Orientation orientation = MediaQuery.of(context).orientation; 97 | return new Container( 98 | child: isLoading 99 | ? new Center( 100 | child: new CircularProgressIndicator(), 101 | ) 102 | : new GridView.count( 103 | crossAxisCount: orientation == Orientation.portrait ? 2 : 4, 104 | children: _buildGridCards(context), 105 | padding: EdgeInsets.all(2.0), 106 | childAspectRatio: 8.0 / 10.0, 107 | )); 108 | } 109 | 110 | @override 111 | // TODO: implement wantKeepAlive 112 | bool get wantKeepAlive => true; 113 | } 114 | -------------------------------------------------------------------------------- /lib/views/artists.dart: -------------------------------------------------------------------------------- 1 | import 'package:flute_music_player/flute_music_player.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:musicplayer/database/database_client.dart'; 4 | import 'package:musicplayer/pages/card_detail.dart'; 5 | 6 | class Artists extends StatefulWidget { 7 | DatabaseClient db; 8 | Artists(this.db); 9 | @override 10 | State createState() { 11 | return new _stateArtist(); 12 | } 13 | } 14 | 15 | class _stateArtist extends State with AutomaticKeepAliveClientMixin{ 16 | List songs; 17 | var f; 18 | bool isLoading = true; 19 | 20 | @override 21 | initState() { 22 | super.initState(); 23 | initArtists(); 24 | } 25 | 26 | void initArtists() async { 27 | songs = await widget.db.fetchArtist(); 28 | setState(() { 29 | isLoading = false; 30 | }); 31 | } 32 | 33 | List _buildGridCards(BuildContext context) { 34 | return songs.map((song) { 35 | return Card( 36 | child: new InkResponse( 37 | child: Column( 38 | crossAxisAlignment: CrossAxisAlignment.start, 39 | children: [ 40 | Hero( 41 | tag: song.artist, 42 | child: AspectRatio( 43 | aspectRatio: 18 / 16, 44 | child: new Image.asset( 45 | "images/artist.jpg", 46 | height: 120.0, 47 | fit: BoxFit.fitWidth, 48 | ), 49 | ), 50 | ), 51 | Expanded( 52 | child: Padding( 53 | padding: EdgeInsets.fromLTRB(4.0, 8.0, 0.0, 0.0), 54 | child: Text( 55 | song.artist, 56 | style: new TextStyle(fontSize: 18.0), 57 | maxLines: 1, 58 | ), 59 | ), 60 | ), 61 | ], 62 | ), 63 | onTap: () { 64 | Navigator.of(context) 65 | .push(new MaterialPageRoute(builder: (context) { 66 | return new CardDetail(widget.db, song, 1); 67 | })); 68 | }, 69 | ), 70 | ); 71 | }).toList(); 72 | } 73 | 74 | @override 75 | Widget build(BuildContext context) { 76 | final Orientation orientation = MediaQuery.of(context).orientation; 77 | return new Container( 78 | child: isLoading 79 | ? new Center(child: new CircularProgressIndicator()) 80 | : new GridView.count( 81 | crossAxisCount: orientation == Orientation.portrait ? 2 : 4, 82 | children: _buildGridCards(context), 83 | padding: EdgeInsets.all(2.0), 84 | childAspectRatio: 8.0 / 10.0, 85 | )); 86 | } 87 | 88 | @override 89 | // TODO: implement wantKeepAlive 90 | bool get wantKeepAlive => true; 91 | } 92 | -------------------------------------------------------------------------------- /lib/views/playlists.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:musicplayer/database/database_client.dart'; 3 | import 'package:musicplayer/pages/list_songs.dart'; 4 | import 'package:musicplayer/sc_model/model.dart'; 5 | import 'package:scoped_model/scoped_model.dart'; 6 | 7 | class PlayList extends StatefulWidget { 8 | DatabaseClient db; 9 | PlayList(this.db); 10 | 11 | @override 12 | State createState() { 13 | return new _statePlaylist(); 14 | } 15 | } 16 | 17 | class _statePlaylist extends State with AutomaticKeepAliveClientMixin { 18 | var mode; 19 | var selected; 20 | Orientation orientation; 21 | @override 22 | void initState() { 23 | mode = 1; 24 | selected = 1; 25 | super.initState(); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | orientation = MediaQuery.of(context).orientation; 31 | return new Container( 32 | child: /*orientation == Orientation.portrait ? */potrait() /*: landscape()*/, 33 | ); 34 | } 35 | 36 | Widget potrait() { 37 | return new ListView( 38 | children: [ 39 | new ListTile( 40 | leading: new Icon(Icons.call_received, 41 | color: Theme.of(context).accentColor), 42 | title: new Text("Recently played"), 43 | subtitle: new Text("songs"), 44 | onTap: () { 45 | Navigator.of(context) 46 | .push(new MaterialPageRoute(builder: (context) { 47 | return new ListSongs(widget.db, 1, orientation); 48 | })); 49 | }, 50 | ), 51 | new Divider(), 52 | new ListTile( 53 | leading: 54 | new Icon(Icons.show_chart, color: Theme.of(context).accentColor), 55 | title: new Text("Top tracks"), 56 | subtitle: new Text("songs"), 57 | onTap: () { 58 | Navigator.of(context) 59 | .push(new MaterialPageRoute(builder: (context) { 60 | return new ListSongs(widget.db, 2, orientation); 61 | })); 62 | }, 63 | ), 64 | new Divider(), 65 | new ListTile( 66 | leading: 67 | new Icon(Icons.favorite, color: Theme.of(context).accentColor), 68 | title: new Text("Favourites"), 69 | subtitle: new Text("Songs"), 70 | onTap: () { 71 | Navigator.of(context) 72 | .push(new MaterialPageRoute(builder: (context) { 73 | return new ListSongs(widget.db, 3, orientation); 74 | })); 75 | }, 76 | ), 77 | new Divider(), 78 | ], 79 | ); 80 | } 81 | 82 | Widget landscape() { 83 | return new Row( 84 | children: [ 85 | new Container( 86 | width: MediaQuery 87 | .of(context) 88 | .size 89 | .width / 2.5, 90 | child: new ListView( 91 | children: [ 92 | new ListTile( 93 | leading: new Icon(Icons.call_received), 94 | title: new Text("Recently played", 95 | style: new TextStyle( 96 | color: selected == 1 ? Colors.deepPurpleAccent : Colors 97 | .black)), 98 | subtitle: new Text("songs"), 99 | onTap: () { 100 | setState(() { 101 | mode = 1; 102 | selected = 1; 103 | }); 104 | }, 105 | ), 106 | new Divider(), 107 | ScopedModelDescendant( 108 | builder: (context, child, model) { 109 | return new ListTile( 110 | leading: new Icon(Icons.show_chart), 111 | title: new Text("Top tracks", 112 | style: new TextStyle( 113 | color: selected == 2 ? Colors.deepPurpleAccent : Colors 114 | .black)), 115 | subtitle: new Text("songs"), 116 | onTap: () => model.setMode(2) 117 | ); 118 | }), 119 | new Divider(), 120 | ScopedModelDescendant( 121 | builder: (context, child, model) { 122 | return 123 | new ListTile( 124 | leading: new Icon(Icons.favorite), 125 | title: new Text("Favourites", 126 | style: new TextStyle( 127 | color: selected == 3 128 | ? Colors.deepPurpleAccent 129 | : Colors.black)), 130 | subtitle: new Text("Songs"), 131 | onTap: () { 132 | model.setMode(3); 133 | // setState(() { 134 | // mode = 3; 135 | // selected = 3; 136 | // }); 137 | }, 138 | ); 139 | }), 140 | new Divider(), 141 | ], 142 | ), 143 | ), 144 | ScopedModelDescendant( 145 | builder: (context, child, model) { 146 | return new Expanded( 147 | child: new Container( 148 | child: new ListSongs(widget.db, model.mode, orientation), 149 | )); 150 | }) 151 | ], 152 | ); 153 | } 154 | 155 | @override 156 | // TODO: implement wantKeepAlive 157 | bool get wantKeepAlive => true; 158 | } 159 | -------------------------------------------------------------------------------- /lib/views/songs.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flute_music_player/flute_music_player.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:musicplayer/database/database_client.dart'; 6 | import 'package:musicplayer/pages/now_playing.dart'; 7 | import 'package:musicplayer/util/lastplay.dart'; 8 | import 'package:musicplayer/util/utility.dart'; 9 | 10 | class Songs extends StatefulWidget { 11 | DatabaseClient db; 12 | List songs; 13 | Songs(this.db); 14 | @override 15 | State createState() { 16 | return new _songsState(); 17 | } 18 | } 19 | 20 | class _songsState extends State with AutomaticKeepAliveClientMixin { 21 | List songs; 22 | bool isLoading = true; 23 | 24 | @override 25 | void initState() { 26 | super.initState(); 27 | initSongs(); 28 | } 29 | 30 | void initSongs() async { 31 | songs = await widget.db.fetchSongs(); 32 | setState(() { 33 | isLoading = false; 34 | }); 35 | } 36 | 37 | dynamic getImage(Song song) { 38 | return song.albumArt == null 39 | ? null 40 | : new File.fromUri(Uri.parse(song.albumArt)); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return Container( 46 | child: isLoading 47 | ? new Center( 48 | child: new CircularProgressIndicator(), 49 | ) 50 | : Column(children: [ 51 | SizedBox( 52 | width: MediaQuery 53 | .of(context) 54 | .size 55 | .width - 20, 56 | child: OutlineButton( 57 | 58 | child: Text("Play All", style: TextStyle( 59 | fontSize: 20 60 | ),), 61 | onPressed: () { 62 | MyQueue.songs = songs; 63 | Navigator.of(context) 64 | .push(new MaterialPageRoute(builder: (context) { 65 | return new NowPlaying(widget.db, songs, 0, 0); 66 | })); 67 | }, 68 | shape: new RoundedRectangleBorder( 69 | borderRadius: new BorderRadius.circular(30.0), 70 | )), 71 | ), 72 | Expanded( 73 | child: new ListView.builder( 74 | itemCount: songs.length, 75 | itemBuilder: (context, i) => 76 | new Column( 77 | children: [ 78 | new Divider( 79 | height: 8.0, 80 | ), 81 | new ListTile( 82 | leading: new Hero( 83 | tag: songs[i].id, 84 | child: avatar(context, getImage(songs[i]), 85 | songs[i].title), 86 | ), 87 | title: new Text(songs[i].title, 88 | maxLines: 1, 89 | style: new TextStyle(fontSize: 18.0)), 90 | subtitle: new Text( 91 | songs[i].artist, 92 | maxLines: 1, 93 | style: new TextStyle( 94 | fontSize: 12.0, color: Colors.grey), 95 | ), 96 | trailing: new Text( 97 | new Duration(milliseconds: songs[i].duration) 98 | .toString() 99 | .split('.') 100 | .first, 101 | style: new TextStyle( 102 | fontSize: 12.0, color: Colors.grey)), 103 | onTap: () { 104 | MyQueue.songs = songs; 105 | Navigator.of(context).push( 106 | new MaterialPageRoute( 107 | builder: (context) => 108 | new NowPlaying( 109 | widget.db, MyQueue.songs, i, 0))); 110 | }, 111 | onLongPress: () { 112 | setFav(songs[i]); 113 | }, 114 | ), 115 | ], 116 | ), 117 | ), 118 | ) 119 | ])); 120 | } 121 | 122 | Future setFav(song) { 123 | showDialog( 124 | context: context, 125 | child: new AlertDialog( 126 | title: new Text('Add this to favourites?'), 127 | content: new Text(song.title), 128 | actions: [ 129 | new FlatButton( 130 | onPressed: () => Navigator.of(context).pop(false), 131 | child: new Text( 132 | 'No', 133 | ), 134 | ), 135 | new FlatButton( 136 | onPressed: () async { 137 | await widget.db.favSong(song); 138 | 139 | Navigator.of(context).pop(); 140 | }, 141 | child: new Text('Yes'), 142 | ), 143 | ], 144 | ), 145 | ); 146 | } 147 | 148 | @override 149 | // TODO: implement wantKeepAlive 150 | bool get wantKeepAlive => true; 151 | } 152 | -------------------------------------------------------------------------------- /musicplayer.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /musicplayer_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animated_text_kit: 5 | dependency: "direct main" 6 | description: 7 | name: animated_text_kit 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.3.1" 11 | archive: 12 | dependency: transitive 13 | description: 14 | name: archive 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.0.9" 18 | args: 19 | dependency: transitive 20 | description: 21 | name: args 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.5.1" 25 | async: 26 | dependency: transitive 27 | description: 28 | name: async 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.3.0" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.5" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.2" 46 | clippy_flutter: 47 | dependency: "direct main" 48 | description: 49 | name: clippy_flutter 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.14.11" 60 | convert: 61 | dependency: transitive 62 | description: 63 | name: convert 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.1" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.6" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.1.2" 81 | dynamic_theme: 82 | dependency: "direct main" 83 | description: 84 | name: dynamic_theme 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.0.1" 88 | firebase_admob: 89 | dependency: "direct main" 90 | description: 91 | name: firebase_admob 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.9.0+2" 95 | floating_search_bar: 96 | dependency: "direct main" 97 | description: 98 | name: floating_search_bar 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "0.2.0" 102 | flute_music_player: 103 | dependency: "direct main" 104 | description: 105 | name: flute_music_player 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "0.0.6" 109 | flutter: 110 | dependency: "direct main" 111 | description: flutter 112 | source: sdk 113 | version: "0.0.0" 114 | flutter_launcher_icons: 115 | dependency: "direct dev" 116 | description: 117 | name: flutter_launcher_icons 118 | url: "https://pub.dartlang.org" 119 | source: hosted 120 | version: "0.7.2" 121 | flutter_test: 122 | dependency: "direct dev" 123 | description: flutter 124 | source: sdk 125 | version: "0.0.0" 126 | font_awesome_flutter: 127 | dependency: "direct main" 128 | description: 129 | name: font_awesome_flutter 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "8.4.0" 133 | image: 134 | dependency: transitive 135 | description: 136 | name: image 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.1.4" 140 | indexed_list_view: 141 | dependency: "direct main" 142 | description: 143 | name: indexed_list_view 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "1.0.0" 147 | matcher: 148 | dependency: transitive 149 | description: 150 | name: matcher 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "0.12.5" 154 | media_notification: 155 | dependency: "direct main" 156 | description: 157 | name: media_notification 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "0.0.5" 161 | meta: 162 | dependency: transitive 163 | description: 164 | name: meta 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "1.1.7" 168 | path: 169 | dependency: transitive 170 | description: 171 | name: path 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "1.6.4" 175 | path_provider: 176 | dependency: "direct main" 177 | description: 178 | name: path_provider 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.4.0" 182 | pedantic: 183 | dependency: transitive 184 | description: 185 | name: pedantic 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.8.0+1" 189 | petitparser: 190 | dependency: transitive 191 | description: 192 | name: petitparser 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "2.3.0" 196 | platform: 197 | dependency: transitive 198 | description: 199 | name: platform 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "2.2.0" 203 | quiver: 204 | dependency: transitive 205 | description: 206 | name: quiver 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "2.0.5" 210 | scoped_model: 211 | dependency: "direct main" 212 | description: 213 | name: scoped_model 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "1.0.1" 217 | share: 218 | dependency: "direct main" 219 | description: 220 | name: share 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "0.6.1+1" 224 | shared_preferences: 225 | dependency: "direct main" 226 | description: 227 | name: shared_preferences 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "0.5.3+1" 231 | sky_engine: 232 | dependency: transitive 233 | description: flutter 234 | source: sdk 235 | version: "0.0.99" 236 | source_span: 237 | dependency: transitive 238 | description: 239 | name: source_span 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.5.5" 243 | sqflite: 244 | dependency: "direct main" 245 | description: 246 | name: sqflite 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "0.13.0+1" 250 | stack_trace: 251 | dependency: transitive 252 | description: 253 | name: stack_trace 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "1.9.3" 257 | stream_channel: 258 | dependency: transitive 259 | description: 260 | name: stream_channel 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.0.0" 264 | string_scanner: 265 | dependency: transitive 266 | description: 267 | name: string_scanner 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "1.0.5" 271 | synchronized: 272 | dependency: transitive 273 | description: 274 | name: synchronized 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "1.5.3+2" 278 | term_glyph: 279 | dependency: transitive 280 | description: 281 | name: term_glyph 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "1.1.0" 285 | test_api: 286 | dependency: transitive 287 | description: 288 | name: test_api 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "0.2.5" 292 | typed_data: 293 | dependency: transitive 294 | description: 295 | name: typed_data 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.1.6" 299 | url_launcher: 300 | dependency: "direct main" 301 | description: 302 | name: url_launcher 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "3.0.1" 306 | vector_math: 307 | dependency: transitive 308 | description: 309 | name: vector_math 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "2.0.8" 313 | xml: 314 | dependency: transitive 315 | description: 316 | name: xml 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "3.5.0" 320 | yaml: 321 | dependency: transitive 322 | description: 323 | name: yaml 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "2.1.15" 327 | sdks: 328 | dart: ">=2.3.0 <3.0.0" 329 | flutter: ">=1.5.0 <2.0.0" 330 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: musicplayer 2 | description: A new Flutter project. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | # The following adds the Cupertino Icons font to your application. 9 | # Use with the CupertinoIcons class for iOS style icons. 10 | cupertino_icons: ^0.1.0 11 | flute_music_player: 12 | sqflite: 13 | path_provider: 14 | url_launcher: 3.0.1 15 | shared_preferences: 16 | media_notification: ^0.0.5 17 | dynamic_theme: ^1.0.1 18 | scoped_model: 19 | share: ^0.6.1+1 20 | font_awesome_flutter: 21 | floating_search_bar: 22 | firebase_admob: ^0.9.0+2 23 | clippy_flutter: 24 | animated_text_kit: ^1.3.1 25 | indexed_list_view: ^1.0.0 26 | 27 | dev_dependencies: 28 | flutter_test: 29 | sdk: flutter 30 | flutter_launcher_icons: 31 | 32 | flutter_icons: 33 | android: true 34 | ios: true 35 | image_path: "images/logo.png" 36 | 37 | 38 | # For information on the generic Dart part of this file, see the 39 | # following page: https://www.dartlang.org/tools/pub/pubspec 40 | 41 | # The following section is specific to Flutter. 42 | flutter: 43 | assets: 44 | - images/back.jpg 45 | - images/avatar.jpg 46 | - images/artist.jpg 47 | - images/logo.png 48 | - images/logo_white.png 49 | - images/kid.png 50 | - images/sad.png 51 | - images/micra.jpg 52 | 53 | 54 | fonts: 55 | - family: Raleway 56 | fonts: 57 | - asset: fonts/Raleway-Regular.ttf 58 | - asset: fonts/Raleway-Italic.ttf 59 | style: italic 60 | 61 | 62 | # The following line ensures that the Material Icons font is 63 | # included with your application, so that you can use the icons in 64 | # the material Icons class. 65 | uses-material-design: true 66 | 67 | # To add assets to your application, add an assets section, like this: 68 | # assets: 69 | # - images/a_dot_burr.jpeg 70 | # - images/a_dot_ham.jpeg 71 | 72 | # An image asset can refer to one or more resolution-specific "variants", see 73 | # https://flutter.io/assets-and-images/#resolution-aware. 74 | 75 | # For details regarding adding assets from package dependencies, see 76 | # https://flutter.io/assets-and-images/#from-packages 77 | 78 | # To add custom fonts to your application, add a fonts section here, 79 | # in this "flutter" section. Each entry in this list should have a 80 | # "family" key with the font family name, and a "fonts" key with a 81 | # list giving the asset and other descriptors for the font. For 82 | # example: 83 | # fonts: 84 | # - family: Schyler 85 | # fonts: 86 | # - asset: fonts/Schyler-Regular.ttf 87 | # - asset: fonts/Schyler-Italic.ttf 88 | # style: italic 89 | # - family: Trajan Pro 90 | # fonts: 91 | # - asset: fonts/TrajanPro.ttf 92 | # - asset: fonts/TrajanPro_Bold.ttf 93 | # weight: 700 94 | # 95 | # For details regarding fonts from package dependencies, 96 | # see https://flutter.io/custom-fonts/#from-packages 97 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:musicplayer/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | --------------------------------------------------------------------------------