初始化

This commit is contained in:
谢宇宁
2026-09-15 15:44:13 +07:00
commit a23ba685e9
1065 changed files with 101122 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgdj/hj_model/video_model.dart';
import 'package:hgdj/hj_page/user_center_page/user_center_page.dart';
import 'package:hgdj/tools_base/widget/net_image_widget.dart';
class UserAvatar extends StatelessWidget {
final double size;
final bool showVip;
final Publisher? model;
final bool isCircle;
final double? bigVsize;
final bool showBorder;
final GestureTapCallback? onTap;
const UserAvatar({
super.key,
this.size = 52,
this.showVip = false,
this.model,
this.isCircle = true,
this.bigVsize,
this.showBorder = false,
this.onTap,
});
@override
Widget build(BuildContext context) {
return Container(
width: size,
height: size,
decoration: BoxDecoration(
border: showBorder
? Border.all(color: Color(0xffDB361F), width: 2)
: null,
borderRadius: BorderRadius.circular(100)),
child: Stack(
alignment: Alignment.center,
children: [
GestureDetector(
onTap: onTap ??
() {
Get.to(() => UserCenterPage(uid: model?.uid ?? 0),
preventDuplicates: false);
},
child: NetworkImageLoader(
imageUrl: model?.portrait ?? '',
width: size - (showBorder ? 4 : 0),
height: size - (showBorder ? 4 : 0),
borderRadius: isCircle ? size / 2 : 0,
),
),
],
),
);
}
}