import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

class Profile extends StatelessWidget {
  const Profile({super.key});

  @override
  Widget build(BuildContext context) {
    return Card(
      child: SizedBox(
        width: double.infinity,
        child: Padding(
          padding: const EdgeInsets.all(20),
          child: Column(
            children: [
              Container(
                constraints: const BoxConstraints(maxWidth: 200),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(180),
                  child: Image.asset('assets/profile.jpg'),
                ),
              ),
              const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
              Text(
                'Marco Skupin',
                textAlign: TextAlign.center,
                style: Theme.of(context).textTheme.displayMedium,
              ),
              const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
              Text(
                'Master of Science',
                textAlign: TextAlign.center,
                style: Theme.of(context).textTheme.titleLarge,
              ),
              const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
              TextButton(
                onPressed: () => launchUrl(Uri.parse('mailto:marco@skup.in')),
                style: ButtonStyle(
                  textStyle: WidgetStatePropertyAll(
                    Theme.of(context).textTheme.bodyMedium,
                  ),
                ),
                child: const Text('marco@skup.in'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
