mt_audio library
A generic, reusable, streams-based audio package for Flutter.
Provides background audio playback with notifications, queue management, and optional Android Auto support.
Classes
- IcyMetadata
- MediaItem
- Metadata of an audio item that can be played, or a folder containing audio items.
- MtAndroidAutoDelegate
- Abstract delegate for handling Android Auto communication.
- MtArtwork
- Artwork image widget with placeholder and error handling.
- MtAudioError
- An audio error with a code and message.
- MtAudioItem
- Immutable track metadata for audio playback.
- MtAudioPlayer
- Main public API for the mt_audio package.
- MtAudioPlayerConfig
- Configuration for MtAudioPlayer.
- MtBrowsableItem
- A browsable (non-playable) item in the media library.
- MtCarPlayBrowsableItem
- A browsable (non-playable) item in the CarPlay media library.
- MtCarPlayDelegate
- Abstract delegate for handling CarPlay communication.
- MtCarPlayHandler
- Manages CarPlay integration for audio apps.
- MtCarPlayItem
- Sealed class representing items in a CarPlay media library.
- MtCarPlayPlayableItem
- A playable item in the CarPlay media library.
- MtCarPlayRootConfig
- Configuration for the CarPlay root template.
- MtCarPlaySection
- A section of CarPlay content with an optional header.
- MtCarPlayTab
- Configuration for a tab in CarPlay tab bar.
- MtCarPlayTabBarConfig
- Configuration for CarPlay tab bar template.
- MtMediaLibraryItem
- Sealed class representing items in an Android Auto media library.
- MtNowPlayingInfo
- Displays the currently playing track's title, artist, and album.
- MtPlayableItem
- A playable item in the media library.
- MtPlaybackState
- Complete playback state of the audio player.
- MtPlayerBuilder
- Builder widget that exposes player state and actions for custom UI.
- MtPlayerState
- Player state exposed to builder function.
- MtPlayPauseButton
- An animated play/pause button with loading state support.
- MtPositionState
- Position state of the audio player.
- MtQueueItemTile
- Default queue item tile with artwork, title, artist, and drag handle.
- MtQueueListView
- A reorderable, dismissible list view for the audio queue.
- MtQueueState
- Queue state of the audio player.
- MtSeekBar
- A seek bar widget with buffered progress indicator.
- MtSkipButton
- A button for skipping forward or backward by a configured interval.
- MtSpeedSelector
- A widget for selecting playback speed.
- MtTrackSkipButton
- A button for skipping to the previous or next track in the queue.
Enums
- MtAudioErrorCode
- Error codes for audio playback errors.
- MtCarPlayRootTemplateType
- Root template type for CarPlay.
- MtCarPlayTemplateType
- Template type for browsable CarPlay items.
- MtPlaybackStatus
- Playback status of the audio player.
- MtRepeatMode
- Repeat mode for playback.
- MtSkipDirection
- Direction for skip button.
- MtTrackSkipDirection
- Direction for track skip button.
Typedefs
- MtAndroidAutoDelegateFactory = MtAndroidAutoDelegate Function(MtAudioPlayer player)
- Factory function type for creating an Android Auto delegate with player access.
- MtCarPlayDelegateFactory = MtCarPlayDelegate Function(MtAudioPlayer player)
- Factory function type for creating a CarPlay delegate with player access.
-
MtCarPlayPlayerStreams
= ({Stream<
MtAudioItem?> currentItem, Stream<MtPlaybackState> playbackState, Stream<MtPositionState> positionState}) - Function type for accessing player streams.
Exceptions / Errors
- MtAudioException
- Exception thrown by the audio player.