NoCopyrightSound
Unofficial NoCopyrightSound client for flutter to play/download copyright free songs
πGenres
- Bass
- Chill
- Drum Bass
- Drum Step
- Dubstep
- EDM
- Electronic
- Future House
- Hard Style
- House
- Indie
- Melodic Dubstep
- Trap
- Glitch Hop
- Phonk
- Future Bass
- Bass House
π₯ Moods
- Angry
- Dark
- Dreamy
- Epic
- Euphoric
- Energetic
- Fear
- Funny
- Glamorous
- Gloomy
- Happy
- Hopeful
- LaidBack
- Mysterious
- Peaceful
- Quirky
- Relaxing
- Restless
- Romantic
- Sad
- Scary
- Sexy
- Suspense
- Weird
π₯ Usage
Add the dependency in pubspec.yaml:
dependencies:
...
ncs_io: latest_version
π Methods
Fetch Music
Fetch the latest music from the NCS dashboard.
List<Song> songs = await NCS.getMusic(page: 1);
Search Music
Search for music with various filters.
List<Song> results = await NCS.searchMusic(
search: 'Sky High',
genreType: GenreType.bass.id,
mood: Mood.happy.id,
version: [Version.regular.value],
);
Get Artist details
Fetch detailed information about an artist.
// Fetch using artist URL
Artist artistInfo = await NCS.getArtistInfo(artist: '/artist/1/alan-walker');
// Fetch using Artist object from a Song
Artist details = await NCS.getArtistInfo(artist: song.artists.first);
Error Handling
The package throws NcsException for network or parsing errors, making it easy to handle failures gracefully.
try {
final songs = await NCS.getMusic();
} on NcsException catch (e) {
// Handle NCS specific errors
print('NCS API Error: ${e.message}');
} catch (e) {
// Handle other errors
print('Unexpected error: $e');
}
Helper Extensions
Easily get human-readable names from IDs.
String genreName = 1.genreName; // Returns 'Bass'
String moodName = 1.moodName; // Returns 'Angry'
βοΈ Authors
- Ashish Pipaliya - Author
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π§° Contribution
Feel free to raise issues and open PR
Libraries
- ncs_io
- Unofficial NoCopyrightSound (NCS) client for Flutter.