import 'package:flutter/material.dart';
import 'package:sendtrain/database/database.dart';
import 'package:sendtrain/widgets/media/media_content.dart';

class MediaDetails extends StatelessWidget {
  const MediaDetails({super.key, required this.media});

  final MediaItem media;

  @override
  Widget build(BuildContext context) {
    return Padding(
        padding: EdgeInsets.fromLTRB(15, 0, 15, 15),
        child: ListView(
            shrinkWrap: true,
            children: <Widget>[
              ClipRRect(
                borderRadius: BorderRadius.circular(10),
                child: MediaContent(media: media),
              ),
              const SizedBox(height: 15),
              Padding(
                  padding: EdgeInsets.fromLTRB(15, 0, 15, 15),
                  child: Text(
                    media.description,
                    style: const TextStyle(fontSize: 20),
                  )),

              const Divider(
                indent: 20,
                endIndent: 20,
              )
            ]));
  }
}
