aves_mio1/lib/widgets/stats/percent_text.dart
FabioMich66 19a982ede6
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-03-05 15:51:30 +01:00

33 lines
960 B
Dart

import 'package:aves/theme/styles.dart';
import 'package:aves/theme/themes.dart';
import 'package:aves/widgets/common/basic/text/outlined.dart';
import 'package:aves/widgets/common/extensions/build_context.dart';
import 'package:aves/widgets/common/extensions/theme.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
class LinearPercentIndicatorText extends StatelessWidget {
final double percent;
const LinearPercentIndicatorText({
super.key,
required this.percent,
});
@override
Widget build(BuildContext context) {
final percentFormatter = NumberFormat.percentPattern(context.locale);
return OutlinedText(
textSpans: [
TextSpan(
text: percentFormatter.format(percent),
style: TextStyle(
shadows: Theme.of(context).isDark ? AStyles.embossShadows : null,
),
),
],
outlineColor: Themes.firstLayerColor(context),
);
}
}