spotify_auth_player 0.0.7 copy "spotify_auth_player: ^0.0.7" to clipboard
spotify_auth_player: ^0.0.7 copied to clipboard

outdated

A new Flutter plugin.Spotidy Sdk which handles authorization as well as playing playlist of your choice free.

spotifyclient #

A new Flutter plugin.Spotidy Sdk which handles authorization as well as playing playlist of your choice free.

2 step Configurations #

1 . Get client id

Just go to the spotify developers site login and register your application. You just need to follow and prepare your environment from quick start .

How to register

Set redirect uri as spotify-sdk://auth and app name as your app nameand android section package name and debug,release fingerprint in registration. Your registreation is complete. you will be provided with client id.

2. Paste the files

Just goto spotify android sdk site and download spotify-app-remote-release-0.7.0.aar and spotify-auth-release-1.2.3.aar and paste it in project-name/android/ directory

Initialize Spotifire #

      await Spotifire.init(clientid: "Your client id");

Connect Remote #


      await Spotifire.connectRemote.then(print);

Play a playlist #


 if (await Spotifire.isRemoteConnected)
              await Spotifire.playPlaylist(
                  playlistUri: "spotify:playlist:37i9dQZF1DX3rxVfibe1L0");

Disconnect remote #


 if (await Spotifire.isRemoteConnected) await Spotifire.disconnectRemote;

You can get playlistUri from spotify App.

pause #


                await Spotifire.pauseMusic ;

resume #


                await Spotifire.resumeMusic;

skip previous #


                await Spotifire.skipPrevious;

skip next #

                await Spotifire.skipNext;

seekTo #


   await Spotifire.seekTo(Duration position,Duration totalDuration);
   

Listen to music stream #


  Spotifire.musicStream.listen((music) {
      // print("Music" + music.runtimeType.toString());
      if (mounted && music is Music)
        setState(() {
          _music = music;
        });
    }).onError((error) {
      print(error);
    });

get current Position by position Stream #


     Spotifire.positonStream.listen((d)=> print(d.inMilliseconds));

Demo #

alt

5
likes
0
pub points
30%
popularity

Publisher

unverified uploader

A new Flutter plugin.Spotidy Sdk which handles authorization as well as playing playlist of your choice free.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on spotify_auth_player