MethodChannelSpotikit class
An implementation of SpotikitPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- SpotikitPlatform
- MethodChannelSpotikit
Constructors
Properties
-
accessTokenStream
→ Stream<
String?> -
Stream of access tokens from the native platform.
no setteroverride
-
authStateStream
→ Stream<
AuthState> -
Stream of authentication state updates from the native platform.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
playbackStateStream
→ Stream<
SpotifyPlaybackState> -
Stream of playback state updates from the native platform.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticateSpotify(
) → Future< bool> -
Initiates the Spotify OAuth authentication flow.
override
-
connectToSpotify(
) → Future< bool> -
Connects to the Spotify App Remote.
override
-
disconnect(
) → Future< void> -
Disconnects from the Spotify App Remote.
override
-
getAccessToken(
) → Future< String?> -
Retrieves the current access token.
override
-
getPlayingTrackInfo(
) → Future< SpotifyTrackInfo?> -
Gets basic information about the currently playing track.
override
-
initialize(
{required String clientId, required String redirectUri, required String clientSecret, required String scope, required bool authenticate, required bool connectToRemote}) → Future< void> -
Initializes the Spotikit plugin with the required configuration.
override
-
isPlaying(
) → Future< bool> -
Checks if music is currently playing.
override
-
logout(
) → Future< void> -
Logs out from Spotify and disconnects the App Remote.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
Pauses the current playback.
override
-
playUri(
{required String spotifyUri}) → Future< void> -
Plays the specified Spotify URI.
override
-
previousTrack(
) → Future< void> -
Goes back to the previous track.
override
-
resume(
) → Future< void> -
Resumes the current playback.
override
-
seekTo(
{required int positionMs}) → Future< void> -
Seeks to the specified position in the current track.
override
-
skipBackward(
{int seconds = 5}) → Future< void> -
Skips backward by the specified number of seconds.
override
-
skipForward(
{int seconds = 5}) → Future< void> -
Skips forward by the specified number of seconds.
override
-
skipTrack(
) → Future< void> -
Skips to the next track.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited