Files
winded/lib/features/media/domain/highlight.dart
T
philip b239ae3e5f Initial commit: Flutter app + PHP/MySQL backend on Hostinger
Replaces Firebase with a self-hosted PHP/MySQL API served from
winded.prymsolutions.com. Includes full backend (schema, auth, events,
teams, brackets, suggestions, stats, media, file upload) and updated
Flutter repositories and domain models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:13:57 -07:00

47 lines
1.2 KiB
Dart

/// Immutable domain model for a highlight video entry on the Media screen.
///
/// [thumbnailUrl] is nullable so the UI can render a placeholder when no
/// thumbnail is available — common while highlights are still being uploaded.
class Highlight {
const Highlight({
required this.id,
required this.title,
required this.description,
required this.youtubeUrl,
required this.publishedAt,
this.thumbnailUrl,
});
final String id;
final String title;
final String description;
final String youtubeUrl;
final String? thumbnailUrl;
final DateTime publishedAt;
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! Highlight) return false;
return other.id == id &&
other.title == title &&
other.description == description &&
other.youtubeUrl == youtubeUrl &&
other.thumbnailUrl == thumbnailUrl &&
other.publishedAt == publishedAt;
}
@override
int get hashCode => Object.hash(
id,
title,
description,
youtubeUrl,
thumbnailUrl,
publishedAt,
);
@override
String toString() => 'Highlight(id: $id, title: $title)';
}