You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
justMusic/Sources/justMUSIC/lib/components/profile_component.dart

49 lines
1.3 KiB

import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/components/statistics_component.dart';
import '../model/User.dart';
class ProfileComponent extends StatelessWidget {
final User user;
const ProfileComponent({Key? key, required this.user}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
ClipOval(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 200, maxHeight: 200),
child: Image(
image: AssetImage("assets/images/exemple_profile.png"),
height: 100.w,
width: 100.w,
),
),
),
SizedBox(
height: 10,
),
AutoSizeText(
"@${user.pseudo}",
style: GoogleFonts.plusJakartaSans(
fontSize: 15.sp,
color: Colors.white,
fontWeight: FontWeight.w400),
maxFontSize: 30,
),
SizedBox(
height: 20,
),
StatisticsComponent(
user: user,
),
],
);
}
}