.github
.vscode
android
assets
buildtools
ios
lib
database
models
pods
screens
services
widgets
account
account_name.dart
account_nameplate.dart
account_pfc.dart
account_picker.dart
account_picker.g.dart
account_session_sheet.dart
account_session_sheet.g.dart
badge.dart
event_calendar.dart
fortune_graph.dart
leveling_progress.dart
status.dart
status.g.dart
status_creation.dart
chat
content
post
realms
tour
alert.dart
app_notification.dart
app_notification.freezed.dart
app_notification.g.dart
app_scaffold.dart
check_in.dart
check_in.g.dart
context_menu.dart
response.dart
firebase_options.dart
main.dart
route.dart
route.gr.dart
linux
macos
web
windows
.gitignore
.metadata
README.md
analysis_options.yaml
build.yaml
devtools_options.yaml
firebase.json
pubspec.lock
pubspec.yaml
58 lines
1.7 KiB
Dart
58 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:styled_widget/styled_widget.dart';
|
|
|
|
class LevelingProgressCard extends StatelessWidget {
|
|
final int level;
|
|
final int experience;
|
|
final double progress;
|
|
|
|
const LevelingProgressCard({
|
|
super.key,
|
|
required this.level,
|
|
required this.experience,
|
|
required this.progress,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
margin: EdgeInsets.zero,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Row(
|
|
spacing: 8,
|
|
crossAxisAlignment: CrossAxisAlignment.baseline,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
textBaseline: TextBaseline.alphabetic,
|
|
children: [
|
|
Text(
|
|
'levelingProgressLevel'.tr(args: [level.toString()]),
|
|
style: GoogleFonts.robotoMono(),
|
|
).fontSize(13).bold(),
|
|
Text(
|
|
'levelingProgressExperience'.tr(args: [experience.toString()]),
|
|
style: GoogleFonts.robotoMono(),
|
|
).fontSize(13),
|
|
],
|
|
),
|
|
const Gap(8),
|
|
Tooltip(
|
|
message: '${(progress).toStringAsFixed(1)}%',
|
|
child: LinearProgressIndicator(
|
|
minHeight: 4,
|
|
value: progress / 100,
|
|
color: Theme.of(context).colorScheme.primary,
|
|
backgroundColor:
|
|
Theme.of(context).colorScheme.surfaceContainerHigh,
|
|
),
|
|
),
|
|
],
|
|
).padding(horizontal: 16, vertical: 12),
|
|
);
|
|
}
|
|
}
|