Move skills system documentation from bottom to top of CLAUDE.md for better organization. Refactor Flutter asset page by extracting UI components into separate files and updating import structure for improved modularity.
37 lines
880 B
Dart
37 lines
880 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// 圆形头像组件
|
|
///
|
|
/// 显示用户首字母或默认比特币符号。通过 [radius] 控制大小,
|
|
/// [fontSize] 控制文字大小,[text] 可传入用户头像文字。
|
|
class AvatarCircle extends StatelessWidget {
|
|
final double radius;
|
|
final double fontSize;
|
|
final String? text;
|
|
|
|
const AvatarCircle({
|
|
super.key,
|
|
required this.radius,
|
|
required this.fontSize,
|
|
this.text,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
|
|
return CircleAvatar(
|
|
radius: radius,
|
|
backgroundColor: colorScheme.primary.withOpacity(0.15),
|
|
child: Text(
|
|
text ?? '₿',
|
|
style: TextStyle(
|
|
fontSize: fontSize,
|
|
color: colorScheme.primary,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|