mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-06 02:54:49 +08:00
show medal wall
show user follow time show top image title Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
58
lib/pages/member/widget/medal_widget.dart
Normal file
58
lib/pages/member/widget/medal_widget.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MedalWidget extends StatelessWidget {
|
||||
const MedalWidget({
|
||||
super.key,
|
||||
required this.medalName,
|
||||
required this.level,
|
||||
required this.backgroundColor,
|
||||
required this.nameColor,
|
||||
required this.levelColor,
|
||||
});
|
||||
|
||||
final String medalName;
|
||||
final int level;
|
||||
final Color backgroundColor;
|
||||
final Color nameColor;
|
||||
final Color levelColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const .symmetric(horizontal: 8, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: StyleString.mdRadius,
|
||||
color: backgroundColor,
|
||||
),
|
||||
child: Text.rich(
|
||||
strutStyle: const StrutStyle(
|
||||
height: 1,
|
||||
leading: 0,
|
||||
fontSize: 10,
|
||||
),
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: medalName,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 10,
|
||||
color: nameColor,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: ' $level',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 10,
|
||||
fontWeight: .bold,
|
||||
color: levelColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user