dreampad/lib/app/modules/home/widgets/user_widget.dart

66 lines
1.9 KiB
Dart
Raw Permalink Normal View History

2023-11-28 10:44:58 +08:00
import 'package:dreampad/app/shared/shared.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
class UserWidget extends GetView {
const UserWidget({
super.key,
required this.account,
required this.gender,
required this.occupationName,
});
final String account;
final int gender;
final String occupationName;
@override
Widget build(BuildContext context) {
return Container(
height: 67.h,
width: 215.w,
decoration: const BoxDecoration(
image: DecorationImage(
image: Images.homeUserName,
fit: BoxFit.fill,
),
),
padding: REdgeInsets.only(left: 2.0, top: 1.0, bottom: 1.0),
child: Row(
children: [
Images.homeAvatar,
Container(
padding: REdgeInsets.all(6.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
account,
style: TextStyles.mediumWhite23_111_2,
),
const RSizedBox(width: 7.0),
gender == 2 ? Images.male : Images.female,
],
),
const RSizedBox(height: 4.0),
Container(
color: const Color(0xFF000000).withOpacity(0.2),
padding: const EdgeInsets.symmetric(horizontal: 8.0),
alignment: Alignment.center,
child: Text(
occupationName,
style: TextStyles.mediumWhite12,
),
),
],
),
),
],
),
);
}
}