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.
33 lines
936 B
Dart
33 lines
936 B
Dart
import 'package:flutter/material.dart';
|
|
import '../../../../core/theme/app_spacing.dart';
|
|
|
|
/// 币种头像组件
|
|
///
|
|
/// 显示币种图标或首字母的圆形头像,带主题色边框和背景。
|
|
class CoinAvatar extends StatelessWidget {
|
|
final String? icon;
|
|
const CoinAvatar({super.key, this.icon});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
return Container(
|
|
width: 44,
|
|
height: 44,
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.primary.withOpacity(0.1),
|
|
borderRadius: BorderRadius.circular(AppRadius.md),
|
|
border: Border.all(color: colorScheme.primary.withOpacity(0.2)),
|
|
),
|
|
child: Center(
|
|
child: Text(icon ?? '?',
|
|
style: TextStyle(
|
|
fontSize: 20,
|
|
color: colorScheme.primary,
|
|
fontWeight: FontWeight.bold,
|
|
)),
|
|
),
|
|
);
|
|
}
|
|
}
|