Music Player
A music player app that allows you to search for music by artist. Music source from iTunes affiliate API. Made using Flutter with simple clean architecture inspired by Reso Coder and Bloc state management by Felix Angelov. Design Inspired by Spotify.
Search songs by artist | Play and pause song |
---|---|
Intial screen | Empty result | Connection error |
---|---|---|
Supported features
- Search song preview by the artist
- Play and stop a song
- Playing indicator
- Play song in the background
- Portrait lock
- Error handling includes empty results, server errors, and connection errors.
Supported devices
- You can run this app on Android API level 16 (Jelly Bean) or above.
In this project, I try to implement some stacks like
- Implement Clean architecture that inspired by reso coder
- Bloc state management using flutter_bloc
- implement simple atomic design
- Service Locator using get_it
- unit test using a build-in test kit from flutter and bloc test
- mocking using mocktail
- state logging using bloc observer
- handle debounce event.
Prerequisites
- Before you begin, ensure you have installed flutter based on your operating system
- Android device or Android emulator with Android API level 16 (Jelly Bean) or above.
How to build
- Ensure you have flutter installed
- Clone this repository
git clone https://github.com/Muhibush/music_player.git
- Open projects on your IDE like Android Studio, Visual Code, etc..
- Open android simulator or connect your android device
- Run
flutter pub get
to get all dependencies that are needed - Use command
flutter run
to build in debug mode or useflutter run --release
to build release mode.
How to run unit test
- Run
flutter test
inside the project directory - Generate coverage report using
flutter test --coverage
, a coverage report seems to be generated into a file/coverage/lcov.info
.
Contact
If you want to contact me you can reach me at Instagram or Linkedin.