import 'package:flutter/material.dart'; import '../models/user_info.dart'; class UserHeader extends StatelessWidget { final UserInfo? userInfo; final String? radioId; const UserHeader({ super.key, required this.userInfo, this.radioId, }); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(16), child: Row( children: [ CircleAvatar( radius: 32, backgroundColor: Theme.of(context).colorScheme.primaryContainer, child: Icon( Icons.person, size: 32, color: Theme.of(context).colorScheme.onPrimaryContainer, ), ), const SizedBox(width: 16), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( userInfo?.name ?? 'N/A', style: Theme.of(context).textTheme.headlineSmall?.copyWith( fontWeight: FontWeight.bold, ), ), const SizedBox(height: 4), Text( userInfo?.username ?? 'N/A', style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Colors.grey[600], ), ), if (radioId != null) ...[ const SizedBox(height: 4), Text( radioId!, style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Colors.grey[600], ), ), ], ], ), ), ], ), ); } }