import 'package:flutter/material.dart';
import '../../domain/models/card.dart';

class DetailsPage extends StatelessWidget {
  final CardData data;

  const DetailsPage(this.data, {super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Padding(
        padding: const EdgeInsets.all(20),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Center(
              child: Image.network(
                data.imageUrl ?? '',
              ),
            ),
            const SizedBox(height: 20),
            Text(data.fullName.toString(),
                style:
                    const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
            const SizedBox(height: 10),
            Text(data.title.toString(),
                style: const TextStyle(fontSize: 22, color: Colors.black87)),
            const SizedBox(height: 10),
            Text(data.family.toString(),
                style: const TextStyle(fontSize: 22, color: Colors.black87)),
          ],
        ),
      ),
    );
  }
}
