Initial commit

This commit is contained in:
Rui Barbosa
2026-05-18 09:37:50 +01:00
commit 7685118e0b
120 changed files with 5990 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
// lib/models/media_info.dart
//
// Represents the currently playing track's metadata.
// Populated by NotificationListenerService via platform channel.
import 'dart:typed_data';
class MediaInfo {
final String title;
final String artist;
final String album;
final Uint8List? albumArt; // Raw bytes from notification
final bool isPlaying;
const MediaInfo({
required this.title,
required this.artist,
required this.album,
this.albumArt,
required this.isPlaying,
});
// Empty/idle state
static const empty = MediaInfo(
title: 'Nothing Playing',
artist: '',
album: '',
isPlaying: false,
);
MediaInfo copyWith({
String? title,
String? artist,
String? album,
Uint8List? albumArt,
bool? isPlaying,
}) {
return MediaInfo(
title: title ?? this.title,
artist: artist ?? this.artist,
album: album ?? this.album,
albumArt: albumArt ?? this.albumArt,
isPlaying: isPlaying ?? this.isPlaying,
);
}
@override
String toString() => 'MediaInfo(title: $title, artist: $artist, isPlaying: $isPlaying)';
}