├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── arekbiela │ │ │ │ └── flutteraudioplayer │ │ │ │ └── MainActivity.kt │ │ └── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── app.png ├── assets ├── audios │ ├── country.mp3 │ └── country_2.mp3 └── images │ └── country.jpg ├── featured_image.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── 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 │ └── Runner-Bridging-Header.h ├── lib ├── data │ ├── model │ │ └── AudioPlayerModel.dart │ └── repository │ │ ├── AudioPlayerModelFactory.dart │ │ ├── AudioPlayerRepository.dart │ │ └── InMemoryAudioPlayerRepository.dart ├── features │ └── music_player │ │ ├── AudioPlayerBloc.dart │ │ ├── AudioPlayerEvent.dart │ │ └── AudioPlayerState.dart ├── main.dart ├── pages │ └── MusicPage.dart └── ui │ └── widget │ ├── AudioTrackWidget.dart │ └── PlayerWidget.dart ├── pubspec.lock └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /.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: 1ad9baa8b99a2897c20f9e6e54d3b9b359ade314 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter - Audio Player app 2 | 3 | ![](./featured_image.png) 4 | 5 | It's a Flutter application that provides a basic audio player functionality, using [Assets Audio Players](https://pub.dev/packages/assets_audio_player) plugin. 6 | 7 | It's an example for [5 steps for building audio player in Flutter](https://arekbiela.com/flutter-5-steps-audio-player/) article. 8 | 9 | ## Contributions 10 | 11 | The codebase cannot be treated as completed, as it's just an example. Chances are, you'll need to expand and improve it in your codebase. However, if you find something worth sharing to everyone who would make use of that code, feel free to [create a Pull Request](../../pulls)! 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /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 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.arekbiela.flutteraudioplayer" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/arekbiela/flutteraudioplayer/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.arekbiela.flutteraudioplayer 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 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 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/app.png -------------------------------------------------------------------------------- /assets/audios/country.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/assets/audios/country.mp3 -------------------------------------------------------------------------------- /assets/audios/country_2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/assets/audios/country_2.mp3 -------------------------------------------------------------------------------- /assets/images/country.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/assets/images/country.jpg -------------------------------------------------------------------------------- /featured_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/featured_image.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | post_install do |installer| 82 | installer.pods_project.targets.each do |target| 83 | target.build_configurations.each do |config| 84 | config.build_settings['ENABLE_BITCODE'] = 'NO' 85 | end 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /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 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 97C146F11CF9000F007C117D /* Supporting Files */, 94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 98 | ); 99 | path = Runner; 100 | sourceTree = ""; 101 | }; 102 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 97C146ED1CF9000F007C117D /* Runner */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 115 | buildPhases = ( 116 | 9740EEB61CF901F6004384FC /* Run Script */, 117 | 97C146EA1CF9000F007C117D /* Sources */, 118 | 97C146EB1CF9000F007C117D /* Frameworks */, 119 | 97C146EC1CF9000F007C117D /* Resources */, 120 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = Runner; 128 | productName = Runner; 129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 97C146E61CF9000F007C117D /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 1020; 139 | ORGANIZATIONNAME = ""; 140 | TargetAttributes = { 141 | 97C146ED1CF9000F007C117D = { 142 | CreatedOnToolsVersion = 7.3.1; 143 | LastSwiftMigration = 1100; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = 97C146E51CF9000F007C117D; 156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | 97C146ED1CF9000F007C117D /* Runner */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | 97C146EC1CF9000F007C117D /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXShellScriptBuildPhase section */ 180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "Thin Binary"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 193 | }; 194 | 9740EEB61CF901F6004384FC /* Run Script */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Run Script"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 97C146EA1CF9000F007C117D /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C146FB1CF9000F007C117D /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 97C147001CF9000F007C117D /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 243 | isa = XCBuildConfiguration; 244 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_NONNULL = YES; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_MODULES = YES; 251 | CLANG_ENABLE_OBJC_ARC = YES; 252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_COMMA = YES; 255 | CLANG_WARN_CONSTANT_CONVERSION = YES; 256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_EMPTY_BODY = YES; 259 | CLANG_WARN_ENUM_CONVERSION = YES; 260 | CLANG_WARN_INFINITE_RECURSION = YES; 261 | CLANG_WARN_INT_CONVERSION = YES; 262 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 267 | CLANG_WARN_STRICT_PROTOTYPES = YES; 268 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 269 | CLANG_WARN_UNREACHABLE_CODE = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 272 | COPY_PHASE_STRIP = NO; 273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 274 | ENABLE_NS_ASSERTIONS = NO; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | GCC_C_LANGUAGE_STANDARD = gnu99; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 280 | GCC_WARN_UNDECLARED_SELECTOR = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 282 | GCC_WARN_UNUSED_FUNCTION = YES; 283 | GCC_WARN_UNUSED_VARIABLE = YES; 284 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 285 | MTL_ENABLE_DEBUG_INFO = NO; 286 | SDKROOT = iphoneos; 287 | SUPPORTED_PLATFORMS = iphoneos; 288 | TARGETED_DEVICE_FAMILY = "1,2"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Profile; 292 | }; 293 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 296 | buildSettings = { 297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 298 | CLANG_ENABLE_MODULES = YES; 299 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 300 | ENABLE_BITCODE = NO; 301 | FRAMEWORK_SEARCH_PATHS = ( 302 | "$(inherited)", 303 | "$(PROJECT_DIR)/Flutter", 304 | ); 305 | INFOPLIST_FILE = Runner/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | LIBRARY_SEARCH_PATHS = ( 308 | "$(inherited)", 309 | "$(PROJECT_DIR)/Flutter", 310 | ); 311 | PRODUCT_BUNDLE_IDENTIFIER = com.arekbiela.flutteraudioplayer; 312 | PRODUCT_NAME = "$(TARGET_NAME)"; 313 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 314 | SWIFT_VERSION = 5.0; 315 | VERSIONING_SYSTEM = "apple-generic"; 316 | }; 317 | name = Profile; 318 | }; 319 | 97C147031CF9000F007C117D /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; 341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = YES; 369 | ONLY_ACTIVE_ARCH = YES; 370 | SDKROOT = iphoneos; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Debug; 374 | }; 375 | 97C147041CF9000F007C117D /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 407 | ENABLE_NS_ASSERTIONS = NO; 408 | ENABLE_STRICT_OBJC_MSGSEND = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_NO_COMMON_BLOCKS = YES; 411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 413 | GCC_WARN_UNDECLARED_SELECTOR = YES; 414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 415 | GCC_WARN_UNUSED_FUNCTION = YES; 416 | GCC_WARN_UNUSED_VARIABLE = YES; 417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 418 | MTL_ENABLE_DEBUG_INFO = NO; 419 | SDKROOT = iphoneos; 420 | SUPPORTED_PLATFORMS = iphoneos; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | VALIDATE_PRODUCT = YES; 424 | }; 425 | name = Release; 426 | }; 427 | 97C147061CF9000F007C117D /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | FRAMEWORK_SEARCH_PATHS = ( 436 | "$(inherited)", 437 | "$(PROJECT_DIR)/Flutter", 438 | ); 439 | INFOPLIST_FILE = Runner/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | LIBRARY_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | PRODUCT_BUNDLE_IDENTIFIER = com.arekbiela.flutteraudioplayer; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 449 | SWIFT_VERSION = 5.0; 450 | VERSIONING_SYSTEM = "apple-generic"; 451 | }; 452 | name = Debug; 453 | }; 454 | 97C147071CF9000F007C117D /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 457 | buildSettings = { 458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 459 | CLANG_ENABLE_MODULES = YES; 460 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 461 | ENABLE_BITCODE = NO; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(inherited)", 464 | "$(PROJECT_DIR)/Flutter", 465 | ); 466 | INFOPLIST_FILE = Runner/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 468 | LIBRARY_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Flutter", 471 | ); 472 | PRODUCT_BUNDLE_IDENTIFIER = com.arekbiela.flutteraudioplayer; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 475 | SWIFT_VERSION = 5.0; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | 249021D3217E4FDB00AE95B9 /* Profile */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 97C147061CF9000F007C117D /* Debug */, 497 | 97C147071CF9000F007C117D /* Release */, 498 | 249021D4217E4FDB00AE95B9 /* Profile */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 506 | } 507 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abiela/flutter_audio_player/6546e5d42eefab968dcc64c698e5d2aa6b974525/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 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutteraudioplayer 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/data/model/AudioPlayerModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:assets_audio_player/assets_audio_player.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | 4 | class AudioPlayerModel extends Equatable { 5 | 6 | final String id; 7 | final Audio audio; 8 | final bool isPlaying; 9 | 10 | const AudioPlayerModel({this.id, this.audio, this.isPlaying}); 11 | 12 | @override 13 | List get props => [this.id, this.isPlaying]; 14 | 15 | @override 16 | bool get stringify => true; 17 | 18 | AudioPlayerModel copyWithIsPlaying(bool isPlaying) { 19 | return AudioPlayerModel(id: this.id, audio: this.audio, isPlaying: isPlaying); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/data/repository/AudioPlayerModelFactory.dart: -------------------------------------------------------------------------------- 1 | import 'package:assets_audio_player/assets_audio_player.dart'; 2 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 3 | 4 | class AudioPlayerModelFactory { 5 | 6 | static List getAudioPlayerModels() { 7 | return [ 8 | AudioPlayerModel( 9 | id: "1", 10 | isPlaying: false, 11 | audio: Audio( 12 | "assets/audios/country.mp3", 13 | metas: Metas( 14 | id: "1", 15 | title: "My Country Song", 16 | artist: "Joe Doe", 17 | album: "Country Album", 18 | image: MetasImage.asset("assets/images/country.jpg"), 19 | ) 20 | ) 21 | ), 22 | AudioPlayerModel( 23 | id: "2", 24 | isPlaying: false, 25 | audio: Audio( 26 | "assets/audios/country_2.mp3", 27 | metas: Metas( 28 | id: "2", 29 | title: "My Other Country Song", 30 | artist: "Joe Doe", 31 | album: "Country Album", 32 | image: MetasImage.asset("assets/images/country.jpg"), 33 | ) 34 | ) 35 | ) 36 | ]; 37 | } 38 | } -------------------------------------------------------------------------------- /lib/data/repository/AudioPlayerRepository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 2 | 3 | abstract class AudioPlayerRepository { 4 | Future getById(String audioPlayerId); 5 | Future> getAll(); 6 | 7 | Future> updateModel(AudioPlayerModel updatedModel); 8 | Future> updateAllModels(List updatedList); 9 | } -------------------------------------------------------------------------------- /lib/data/repository/InMemoryAudioPlayerRepository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 2 | 3 | import 'AudioPlayerRepository.dart'; 4 | 5 | class InMemoryAudioPlayerRepository implements AudioPlayerRepository { 6 | 7 | final List audioPlayerModels; 8 | 9 | InMemoryAudioPlayerRepository({this.audioPlayerModels}); 10 | 11 | @override 12 | Future getById(String audioPlayerId) { 13 | return Future.value(audioPlayerModels.firstWhere((model) => model.id == audioPlayerId)); 14 | } 15 | 16 | @override 17 | Future> getAll() async { 18 | return Future.value(audioPlayerModels); 19 | } 20 | 21 | 22 | @override 23 | Future> updateModel(AudioPlayerModel updatedModel) { 24 | audioPlayerModels[audioPlayerModels.indexWhere((element) => element.id == updatedModel.id)] = updatedModel; 25 | return Future.value(audioPlayerModels); 26 | } 27 | 28 | @override 29 | Future> updateAllModels(List updatedList) { 30 | audioPlayerModels.clear(); 31 | audioPlayerModels.addAll(updatedList); 32 | return Future.value(audioPlayerModels); 33 | } 34 | } -------------------------------------------------------------------------------- /lib/features/music_player/AudioPlayerBloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:assets_audio_player/assets_audio_player.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 4 | import 'package:flutteraudioplayer/data/repository/AudioPlayerRepository.dart'; 5 | import 'dart:async'; 6 | 7 | import 'AudioPlayerEvent.dart'; 8 | import 'AudioPlayerState.dart'; 9 | 10 | class AudioPlayerBloc extends Bloc { 11 | 12 | final AssetsAudioPlayer assetsAudioPlayer; 13 | final AudioPlayerRepository audioPlayerRepository; 14 | 15 | List playerSubscriptions = new List(); 16 | 17 | AudioPlayerBloc({this.assetsAudioPlayer, this.audioPlayerRepository}) { 18 | playerSubscriptions.add( 19 | assetsAudioPlayer.playerState.listen((event) { 20 | _mapPlayerStateToEvent(event); 21 | })); 22 | } 23 | 24 | @override 25 | AudioPlayerState get initialState => AudioPlayerInitial(); 26 | 27 | @override 28 | Stream mapEventToState(AudioPlayerEvent event) async* { 29 | if (event is InitializeAudio) { 30 | final audioList = await audioPlayerRepository.getAll(); 31 | yield AudioPlayerReady(audioList); 32 | } 33 | 34 | if (event is AudioPlayed) { 35 | yield* _mapAudioPlayedToState(event); 36 | } 37 | if (event is AudioPaused) { 38 | yield* _mapAudioPausedToState(event); 39 | } 40 | 41 | if (event is AudioStopped) { 42 | yield* _mapAudioStoppedToState(); 43 | } 44 | 45 | if (event is TriggeredPlayAudio) { 46 | yield* _mapTriggeredPlayAudio(event); 47 | } 48 | 49 | if (event is TriggeredPauseAudio) { 50 | yield* _mapTriggeredPausedAudio(event); 51 | } 52 | 53 | } 54 | 55 | @override 56 | Future close() { 57 | playerSubscriptions.forEach((element) { 58 | element.cancel(); 59 | }); 60 | return assetsAudioPlayer.dispose(); 61 | } 62 | 63 | void _mapPlayerStateToEvent(PlayerState playerState) { 64 | if (playerState == PlayerState.stop) { 65 | add(AudioStopped()); 66 | } 67 | 68 | else if (playerState == PlayerState.pause) { 69 | add(AudioPaused(assetsAudioPlayer.current.value.audio.audio.metas.id)); 70 | } 71 | 72 | else if (playerState == PlayerState.play) { 73 | add(AudioPlayed(assetsAudioPlayer.current.value.audio.audio.metas.id)); 74 | } 75 | } 76 | 77 | Stream _mapAudioPlayedToState(AudioPlayed event) async* { 78 | final List currentList = await audioPlayerRepository.getAll(); 79 | final List updatedList = 80 | currentList 81 | .map((audioModel) => audioModel.audio.metas.id == event.audioModelMetaId ? audioModel.copyWithIsPlaying(true) : audioModel.copyWithIsPlaying(false)) 82 | .toList(); 83 | await audioPlayerRepository.updateAllModels(updatedList); 84 | final AudioPlayerModel currentlyPlaying = updatedList.firstWhere((model) => model.audio.metas.id == event.audioModelMetaId); 85 | yield AudioPlayerPlaying(currentlyPlaying, updatedList); 86 | } 87 | 88 | Stream _mapAudioPausedToState(AudioPaused event) async* { 89 | final List currentList = await audioPlayerRepository.getAll(); 90 | final List updatedList = 91 | currentList 92 | .map((audioModel) => audioModel.audio.metas.id == event.audioModelMetaId ? audioModel.copyWithIsPlaying(false) : audioModel) 93 | .toList(); 94 | await audioPlayerRepository.updateAllModels(updatedList); 95 | final AudioPlayerModel currentlyPaused = currentList.firstWhere((model) => model.audio.metas.id == event.audioModelMetaId); 96 | yield AudioPlayerPaused(currentlyPaused, updatedList); 97 | } 98 | 99 | Stream _mapAudioStoppedToState() async* { 100 | final List currentList = await audioPlayerRepository.getAll(); 101 | final List updatedList = 102 | currentList 103 | .map((audioModel) => audioModel.isPlaying ? audioModel.copyWithIsPlaying(false) : audioModel) 104 | .toList(); 105 | yield AudioPlayerReady(updatedList); 106 | audioPlayerRepository.updateAllModels(updatedList); 107 | } 108 | 109 | Stream _mapTriggeredPlayAudio(TriggeredPlayAudio event) async* { 110 | if (state is AudioPlayerReady) { 111 | final AudioPlayerModel updatedModel = event.audioPlayerModel.copyWithIsPlaying(true); 112 | final updatedList = await audioPlayerRepository.updateModel(updatedModel); 113 | 114 | await assetsAudioPlayer.open( 115 | updatedModel.audio, 116 | showNotification: true 117 | ); 118 | 119 | yield AudioPlayerPlaying(updatedModel, updatedList); 120 | } 121 | 122 | if (state is AudioPlayerPaused) { 123 | if (event.audioPlayerModel.id == (state as AudioPlayerPaused).pausedEntity.id) { 124 | final AudioPlayerModel updatedModel = event.audioPlayerModel.copyWithIsPlaying(true); 125 | final updatedList = await audioPlayerRepository.updateModel(updatedModel); 126 | 127 | await assetsAudioPlayer.play(); 128 | 129 | yield AudioPlayerPlaying(updatedModel, updatedList); 130 | } 131 | else { 132 | final AudioPlayerModel updatedModel = event.audioPlayerModel.copyWithIsPlaying(true); 133 | final updatedList = await audioPlayerRepository.updateModel(updatedModel); 134 | 135 | await assetsAudioPlayer.open( 136 | updatedModel.audio, 137 | showNotification: true, 138 | respectSilentMode: true, 139 | headPhoneStrategy: HeadPhoneStrategy.pauseOnUnplug 140 | ); 141 | 142 | yield AudioPlayerPlaying(updatedModel, updatedList); 143 | } 144 | } 145 | 146 | if (state is AudioPlayerPlaying) { 147 | final AudioPlayerModel updatedModel = event.audioPlayerModel.copyWithIsPlaying(true); 148 | final updatedList = await audioPlayerRepository.updateModel(updatedModel); 149 | 150 | await assetsAudioPlayer.open( 151 | updatedModel.audio, 152 | showNotification: true 153 | ); 154 | 155 | yield AudioPlayerPlaying(updatedModel, updatedList); 156 | } 157 | } 158 | 159 | Stream _mapTriggeredPausedAudio(TriggeredPauseAudio event) async* { 160 | final AudioPlayerModel updatedModel = event.audioPlayerModel.copyWithIsPlaying(false); 161 | final updatedList = await audioPlayerRepository.updateModel(updatedModel); 162 | 163 | await assetsAudioPlayer.pause(); 164 | 165 | yield AudioPlayerPaused(updatedModel, updatedList); 166 | } 167 | } -------------------------------------------------------------------------------- /lib/features/music_player/AudioPlayerEvent.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 3 | 4 | abstract class AudioPlayerEvent extends Equatable { 5 | 6 | const AudioPlayerEvent(); 7 | } 8 | 9 | class InitializeAudio extends AudioPlayerEvent { 10 | 11 | const InitializeAudio(); 12 | 13 | @override 14 | List get props => []; 15 | } 16 | 17 | class TriggeredPlayAudio extends AudioPlayerEvent { 18 | 19 | final AudioPlayerModel audioPlayerModel; 20 | 21 | const TriggeredPlayAudio(this.audioPlayerModel); 22 | 23 | @override 24 | List get props => [audioPlayerModel]; 25 | } 26 | 27 | class TriggeredPauseAudio extends AudioPlayerEvent { 28 | 29 | final AudioPlayerModel audioPlayerModel; 30 | 31 | const TriggeredPauseAudio(this.audioPlayerModel); 32 | 33 | @override 34 | List get props => [audioPlayerModel]; 35 | } 36 | 37 | class AudioPlayed extends AudioPlayerEvent { 38 | 39 | final String audioModelMetaId; 40 | 41 | const AudioPlayed(this.audioModelMetaId); 42 | 43 | @override 44 | List get props => [audioModelMetaId]; 45 | } 46 | 47 | class AudioPaused extends AudioPlayerEvent { 48 | 49 | final String audioModelMetaId; 50 | 51 | const AudioPaused(this.audioModelMetaId); 52 | 53 | @override 54 | List get props => [audioModelMetaId]; 55 | } 56 | 57 | class AudioStopped extends AudioPlayerEvent { 58 | 59 | const AudioStopped(); 60 | 61 | @override 62 | List get props => []; 63 | } -------------------------------------------------------------------------------- /lib/features/music_player/AudioPlayerState.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | import '../../data/model/AudioPlayerModel.dart'; 4 | 5 | abstract class AudioPlayerState extends Equatable { 6 | const AudioPlayerState(); 7 | } 8 | 9 | class AudioPlayerInitial extends AudioPlayerState { 10 | const AudioPlayerInitial(); 11 | 12 | @override 13 | List get props => []; 14 | } 15 | 16 | class AudioPlayerReady extends AudioPlayerState { 17 | 18 | final List entityList; 19 | 20 | const AudioPlayerReady(this.entityList); 21 | 22 | @override 23 | List get props => [entityList]; 24 | } 25 | 26 | class AudioPlayerPlaying extends AudioPlayerState { 27 | 28 | final List entityList; 29 | final AudioPlayerModel playingEntity; 30 | 31 | const AudioPlayerPlaying(this.playingEntity, this.entityList); 32 | 33 | @override 34 | List get props => [playingEntity, entityList]; 35 | } 36 | 37 | class AudioPlayerPaused extends AudioPlayerState { 38 | 39 | final List entityList; 40 | final AudioPlayerModel pausedEntity; 41 | 42 | const AudioPlayerPaused(this.pausedEntity, this.entityList); 43 | 44 | @override 45 | List get props => [pausedEntity]; 46 | } 47 | 48 | class AudioPlayerFailure extends AudioPlayerState { 49 | 50 | final String error; 51 | 52 | const AudioPlayerFailure(this.error); 53 | 54 | @override 55 | List get props => [error]; 56 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:assets_audio_player/assets_audio_player.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:flutteraudioplayer/pages/MusicPage.dart'; 6 | 7 | import 'data/repository/AudioPlayerModelFactory.dart'; 8 | import 'data/repository/AudioPlayerRepository.dart'; 9 | import 'data/repository/InMemoryAudioPlayerRepository.dart'; 10 | import 'features/music_player/AudioPlayerBloc.dart'; 11 | 12 | void main() { 13 | AssetsAudioPlayer.setupNotificationsOpenAction((notification) { 14 | print(notification.audioId); 15 | return true; 16 | }); 17 | 18 | runApp(App()); 19 | } 20 | 21 | class App extends StatelessWidget { 22 | @override 23 | Widget build(BuildContext context) { 24 | SystemChrome.setPreferredOrientations([ 25 | DeviceOrientation.portraitUp, 26 | DeviceOrientation.portraitDown, 27 | ]); 28 | return MultiRepositoryProvider( 29 | providers: [ 30 | RepositoryProvider( 31 | create: (context) => InMemoryAudioPlayerRepository( 32 | audioPlayerModels: AudioPlayerModelFactory.getAudioPlayerModels() 33 | ), 34 | ), 35 | ], 36 | child: MultiBlocProvider( 37 | providers: [ 38 | BlocProvider( 39 | create: (BuildContext context) => AudioPlayerBloc( 40 | assetsAudioPlayer: AssetsAudioPlayer.newPlayer(), 41 | audioPlayerRepository: 42 | RepositoryProvider.of(context)), 43 | ), 44 | ], 45 | child: MaterialApp( 46 | title: "Audio player", 47 | debugShowCheckedModeBanner: false, 48 | home: MainScreen()), 49 | ), 50 | ); 51 | } 52 | } 53 | 54 | class MainScreen extends StatelessWidget { 55 | @override 56 | Widget build(BuildContext context) { 57 | return Scaffold( 58 | appBar: AppBar( 59 | title: Text("Audio player"), 60 | ), 61 | body: MusicPage() 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/pages/MusicPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerBloc.dart'; 4 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerEvent.dart'; 5 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerState.dart'; 6 | import 'package:flutteraudioplayer/ui/widget/AudioTrackWidget.dart'; 7 | import 'package:flutteraudioplayer/ui/widget/PlayerWidget.dart'; 8 | 9 | class MusicPage extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | alignment: Alignment.center, 14 | child: BlocBuilder( 15 | builder: (context, state) { 16 | if (state is AudioPlayerInitial) { 17 | BlocProvider.of(context).add( 18 | InitializeAudio()); 19 | return buildCircularProgress(); 20 | } 21 | 22 | else if (state is AudioPlayerReady) { 23 | return buildReadyTrackList(state); 24 | } 25 | 26 | else if (state is AudioPlayerPlaying) { 27 | return buildPlayingTrackList(state); 28 | } 29 | 30 | else if (state is AudioPlayerPaused) { 31 | return buildPausedTrackList(state); 32 | } 33 | 34 | else { 35 | return buildUnknownStateError(); 36 | } 37 | })); 38 | } 39 | 40 | Widget buildReadyTrackList(AudioPlayerReady state) { 41 | return ListView.builder( 42 | itemBuilder: (BuildContext context, int index) { 43 | return AudioTrackWidget(audioPlayerModel: state.entityList[index]); 44 | }, 45 | itemCount: state.entityList.length); 46 | } 47 | 48 | Widget buildPlayingTrackList(AudioPlayerPlaying state) { 49 | return Stack( 50 | fit: StackFit.expand, 51 | alignment: Alignment.topCenter, 52 | children: [ 53 | Container( 54 | alignment: Alignment.topCenter, 55 | child: ListView.builder( 56 | padding: EdgeInsets.only(bottom: 124), 57 | itemBuilder: (BuildContext context, int index) { 58 | return AudioTrackWidget( 59 | audioPlayerModel: state.entityList[index]); 60 | }, 61 | itemCount: state.entityList.length), 62 | ), 63 | Container( 64 | alignment: Alignment.bottomCenter, 65 | child: PlayerWidget(), 66 | ) 67 | ], 68 | ); 69 | } 70 | 71 | Widget buildPausedTrackList(AudioPlayerPaused state) { 72 | return Stack( 73 | fit: StackFit.expand, 74 | alignment: Alignment.topCenter, 75 | children: [ 76 | Container( 77 | alignment: Alignment.topCenter, 78 | child: ListView.builder( 79 | padding: EdgeInsets.only(bottom: 96), 80 | itemBuilder: (BuildContext context, int index) { 81 | return AudioTrackWidget( 82 | audioPlayerModel: state.entityList[index]); 83 | }, 84 | itemCount: state.entityList.length), 85 | ), 86 | Container( 87 | alignment: Alignment.bottomCenter, 88 | child: PlayerWidget(), 89 | ) 90 | ], 91 | ); 92 | } 93 | 94 | Widget buildCircularProgress() { 95 | return Center(child: CircularProgressIndicator()); 96 | } 97 | 98 | Widget buildUnknownStateError() { 99 | return Text("Unknown state error"); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /lib/ui/widget/AudioTrackWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 5 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerBloc.dart'; 6 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerEvent.dart'; 7 | 8 | class AudioTrackWidget extends StatelessWidget { 9 | final AudioPlayerModel audioPlayerModel; 10 | 11 | const AudioTrackWidget({Key key, @required this.audioPlayerModel}) 12 | : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListTile( 17 | leading: setLeading(), 18 | title: setTitle(), 19 | subtitle: setSubtitle(), 20 | trailing: IconButton( 21 | icon: setIcon(), 22 | onPressed: setCallback(context), 23 | ), 24 | ); 25 | } 26 | 27 | Widget setIcon() { 28 | if (audioPlayerModel.isPlaying) 29 | return Icon(Icons.pause); 30 | else 31 | return Icon(Icons.play_arrow); 32 | } 33 | 34 | Widget setLeading() { 35 | return new Image.asset(audioPlayerModel.audio.metas.image.path); 36 | } 37 | 38 | Widget setTitle() { 39 | return Text(audioPlayerModel.audio.metas.title); 40 | } 41 | 42 | Widget setSubtitle() { 43 | return Text(audioPlayerModel.audio.metas.artist); 44 | } 45 | 46 | Function setCallback(BuildContext context) { 47 | if (audioPlayerModel.isPlaying) 48 | return () { 49 | BlocProvider.of(context) 50 | .add(TriggeredPauseAudio(audioPlayerModel)); 51 | }; 52 | else 53 | return () { 54 | BlocProvider.of(context) 55 | .add(TriggeredPlayAudio(audioPlayerModel)); 56 | }; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/ui/widget/PlayerWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutteraudioplayer/data/model/AudioPlayerModel.dart'; 5 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerBloc.dart'; 6 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerEvent.dart'; 7 | import 'package:flutteraudioplayer/features/music_player/AudioPlayerState.dart'; 8 | 9 | class PlayerWidget extends StatelessWidget { 10 | const PlayerWidget({Key key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return BlocBuilder( 15 | builder: (context, state) { 16 | if (state is AudioPlayerInitial || state is AudioPlayerReady) { 17 | return SizedBox.shrink(); 18 | } 19 | if (state is AudioPlayerPlaying) { 20 | return _showPlayer(context, state.playingEntity); 21 | } 22 | if (state is AudioPlayerPaused) { 23 | return _showPlayer(context, state.pausedEntity); 24 | } else { 25 | return SizedBox.shrink(); 26 | } 27 | }, 28 | ); 29 | } 30 | 31 | Widget _showPlayer(BuildContext context, AudioPlayerModel model) { 32 | return Container( 33 | child: Column( 34 | mainAxisAlignment: MainAxisAlignment.end, 35 | children: [ 36 | Container( 37 | color: Colors.grey.shade200, 38 | child: ListTile( 39 | leading: setLeading(model), 40 | title: setTitle(model), 41 | subtitle: setSubtitle(model), 42 | contentPadding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), 43 | trailing: IconButton( 44 | icon: setIcon(model), 45 | onPressed: setCallback(context, model), 46 | ), 47 | ), 48 | ), 49 | ], 50 | ), 51 | ); 52 | } 53 | 54 | Widget setIcon(AudioPlayerModel model) { 55 | if (model.isPlaying) 56 | return Icon(Icons.pause); 57 | else 58 | return Icon(Icons.play_arrow); 59 | } 60 | 61 | Widget setLeading(AudioPlayerModel model) { 62 | return new Image.asset(model.audio.metas.image.path); 63 | } 64 | 65 | Widget setTitle(AudioPlayerModel model) { 66 | return Text(model.audio.metas.title); 67 | } 68 | 69 | Widget setSubtitle(AudioPlayerModel model) { 70 | return Text(model.audio.metas.artist); 71 | } 72 | 73 | Function setCallback(BuildContext context, AudioPlayerModel model) { 74 | if (model.isPlaying) 75 | return () { 76 | BlocProvider.of(context) 77 | .add(TriggeredPauseAudio(model)); 78 | }; 79 | else 80 | return () { 81 | BlocProvider.of(context) 82 | .add(TriggeredPlayAudio(model)); 83 | }; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | assets_audio_player: 19 | dependency: "direct main" 20 | description: 21 | name: assets_audio_player 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.10" 25 | assets_audio_player_web: 26 | dependency: transitive 27 | description: 28 | name: assets_audio_player_web 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.9+2" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.4.1" 39 | bloc: 40 | dependency: transitive 41 | description: 42 | name: bloc 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "4.0.0" 46 | boolean_selector: 47 | dependency: transitive 48 | description: 49 | name: boolean_selector 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.0.0" 53 | charcode: 54 | dependency: transitive 55 | description: 56 | name: charcode 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.3" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.14.12" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.1" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.1.4" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.3" 88 | equatable: 89 | dependency: "direct main" 90 | description: 91 | name: equatable 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.2.5" 95 | ffi: 96 | dependency: transitive 97 | description: 98 | name: ffi 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "0.1.3" 102 | file: 103 | dependency: transitive 104 | description: 105 | name: file 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "5.2.1" 109 | flutter: 110 | dependency: "direct main" 111 | description: flutter 112 | source: sdk 113 | version: "0.0.0" 114 | flutter_bloc: 115 | dependency: "direct main" 116 | description: 117 | name: flutter_bloc 118 | url: "https://pub.dartlang.org" 119 | source: hosted 120 | version: "4.0.1" 121 | flutter_test: 122 | dependency: "direct dev" 123 | description: flutter 124 | source: sdk 125 | version: "0.0.0" 126 | flutter_web_plugins: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.0" 131 | http: 132 | dependency: transitive 133 | description: 134 | name: http 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.12.2" 138 | http_parser: 139 | dependency: transitive 140 | description: 141 | name: http_parser 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "3.1.4" 145 | image: 146 | dependency: transitive 147 | description: 148 | name: image 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.12" 152 | intl: 153 | dependency: transitive 154 | description: 155 | name: intl 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.16.1" 159 | matcher: 160 | dependency: transitive 161 | description: 162 | name: matcher 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "0.12.6" 166 | meta: 167 | dependency: transitive 168 | description: 169 | name: meta 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.1.8" 173 | nested: 174 | dependency: transitive 175 | description: 176 | name: nested 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.0.4" 180 | path: 181 | dependency: transitive 182 | description: 183 | name: path 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.6.4" 187 | path_provider: 188 | dependency: transitive 189 | description: 190 | name: path_provider 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.6.21" 194 | path_provider_linux: 195 | dependency: transitive 196 | description: 197 | name: path_provider_linux 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.0.1+2" 201 | path_provider_macos: 202 | dependency: transitive 203 | description: 204 | name: path_provider_macos 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.0.4+4" 208 | path_provider_platform_interface: 209 | dependency: transitive 210 | description: 211 | name: path_provider_platform_interface 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.0.3" 215 | path_provider_windows: 216 | dependency: transitive 217 | description: 218 | name: path_provider_windows 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.0.4+1" 222 | pedantic: 223 | dependency: transitive 224 | description: 225 | name: pedantic 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.9.0" 229 | petitparser: 230 | dependency: transitive 231 | description: 232 | name: petitparser 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.4.0" 236 | platform: 237 | dependency: transitive 238 | description: 239 | name: platform 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "2.2.1" 243 | plugin_platform_interface: 244 | dependency: transitive 245 | description: 246 | name: plugin_platform_interface 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.0.3" 250 | process: 251 | dependency: transitive 252 | description: 253 | name: process 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "3.0.13" 257 | provider: 258 | dependency: transitive 259 | description: 260 | name: provider 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "4.3.2+2" 264 | quiver: 265 | dependency: transitive 266 | description: 267 | name: quiver 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.1.3" 271 | rxdart: 272 | dependency: transitive 273 | description: 274 | name: rxdart 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "0.24.1" 278 | sky_engine: 279 | dependency: transitive 280 | description: flutter 281 | source: sdk 282 | version: "0.0.99" 283 | source_span: 284 | dependency: transitive 285 | description: 286 | name: source_span 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.7.0" 290 | stack_trace: 291 | dependency: transitive 292 | description: 293 | name: stack_trace 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.9.3" 297 | stream_channel: 298 | dependency: transitive 299 | description: 300 | name: stream_channel 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "2.0.0" 304 | string_scanner: 305 | dependency: transitive 306 | description: 307 | name: string_scanner 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "1.0.5" 311 | term_glyph: 312 | dependency: transitive 313 | description: 314 | name: term_glyph 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "1.1.0" 318 | test_api: 319 | dependency: transitive 320 | description: 321 | name: test_api 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "0.2.15" 325 | typed_data: 326 | dependency: transitive 327 | description: 328 | name: typed_data 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "1.1.6" 332 | uuid: 333 | dependency: transitive 334 | description: 335 | name: uuid 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "2.2.2" 339 | vector_math: 340 | dependency: transitive 341 | description: 342 | name: vector_math 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "2.0.8" 346 | win32: 347 | dependency: transitive 348 | description: 349 | name: win32 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "1.7.3" 353 | xdg_directories: 354 | dependency: transitive 355 | description: 356 | name: xdg_directories 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "0.1.0" 360 | xml: 361 | dependency: transitive 362 | description: 363 | name: xml 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "3.6.1" 367 | sdks: 368 | dart: ">=2.7.0 <3.0.0" 369 | flutter: ">=1.16.0 <2.0.0" 370 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutteraudioplayer 2 | description: Audio Player example for 5 steps for building audio player in Flutter article. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.1.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | cupertino_icons: ^0.1.2 27 | flutter_bloc: ^4.0.1 28 | equatable: ^1.0.0 29 | assets_audio_player: ^2.0.8+2 30 | 31 | dev_dependencies: 32 | flutter_test: 33 | sdk: flutter 34 | 35 | flutter: 36 | uses-material-design: true 37 | 38 | assets: 39 | - assets/audios/ 40 | - assets/images/ --------------------------------------------------------------------------------