Offline gym log for Android. No account, no ads, no internet.
Dart androidbodybuildingdartexercisesf-droidfitnessfluttergymgym-apphealthprivacyself-hostedworkoutworkout-appworkout-tracker
Gym pass and chosen medals on the profile
InlitX8acacdabf346
diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dartindex 29d1837..0b8b3a3 100644--- a/lib/screens/profile_screen.dart+++ b/lib/screens/profile_screen.dart@@ -7,20 +7,19 @@ import 'package:phosphoricons_flutter/phosphoricons_flutter.dart';import '../l10n/l10n.dart';import '../models/profile.dart';-import '../models/workout.dart';import '../services/media_store.dart';import '../state/fit_state.dart';import '../theme/app_colors.dart';import '../theme/app_theme.dart';import '../widgets/entrance.dart';import '../widgets/file_thumb.dart';+import '../widgets/glass.dart';import '../widgets/medal_shelf.dart';import '../widgets/photo_source_sheet.dart';import '../widgets/profile_avatar.dart';import '../widgets/ui_kit.dart';-import 'history_screen.dart';+import 'gym_pass_screen.dart';import 'settings_screen.dart';-import 'share_sheet.dart';const List<String> kProfileBadges = ['gold', 'blue', 'green'];@@ -94,68 +93,69 @@ class _ProfileScreenState extends State<ProfileScreen> {top: MediaQuery.paddingOf(context).top,onBanner: _pickBanner,onEdit: () => showProfileSheet(context),- onShare: () => showShareSheet(context),),),SliverToBoxAdapter(- child: Padding(- padding: const EdgeInsets.fromLTRB(20, 6, 0, 0),- child: Rise(index: 0, child: _stats(gc)),- ),- ),- SliverToBoxAdapter(- child: Padding(- padding: const EdgeInsets.fromLTRB(20, 24, 20, 110),- child: Column(- crossAxisAlignment: CrossAxisAlignment.stretch,- children: [- if (fit.gamification) ...[- Rise(- index: 1,- child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [- _heading(gc, t.awardsTitle, count: '${fit.awardCount}', onMore: fit.goAwards),- const SizedBox(height: 16),- const MedalShelf(size: 66),- ]),- ),- const SizedBox(height: 30),- ],- Rise(- index: 2,- child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [- _heading(gc, t.snapshots,- count: fit.momentCount > 0 ? '${fit.momentCount}' : null,- onMore: fit.goMoments,- onAdd: fit.momentCount > 0 ? _snapshot : null),- const SizedBox(height: 16),- _photoCards(gc),- ]),- ),- if (fit.sessions.isNotEmpty) ...[- const SizedBox(height: 30),- Rise(- index: 3,- child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [- _heading(gc, t.historyTitle, count: '${fit.sessions.length}', onMore: fit.goHistory),- const SizedBox(height: 16),- for (final s in _latest) ...[- WorkoutHistoryCard(session: s),- const SizedBox(height: 10),- ],- ]),- ),- ],- const SizedBox(height: 30),- Rise(- index: 4,- child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [- _heading(gc, t.yearTitle),- const SizedBox(height: 16),- _year(gc),- ]),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ const SizedBox(height: 6),+ Rise(index: 0, child: _pills(gc)),+ Padding(+ padding: const EdgeInsets.fromLTRB(20, 26, 20, 110),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ if (fit.gamification) ...[+ Rise(+ index: 1,+ child: _box(gc,+ title: t.awardsTitle,+ count: '${fit.awardCount}',+ onMore: fit.goAwards,+ child: const SizedBox(height: 82, child: MedalShelf(size: 54))),+ ),+ const SizedBox(height: 30),+ ],+ Rise(+ index: 2,+ child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [+ _heading(gc, t.snapshots,+ count: fit.momentCount > 0 ? '${fit.momentCount}' : null,+ onMore: fit.momentCount > 0 ? fit.goMoments : null),+ const SizedBox(height: 16),+ _photoCards(gc),+ ]),+ ),+ const SizedBox(height: 30),+ if (fit.passOn) ...[+ Rise(+ index: 3,+ child: _box(gc,+ title: t.gymPass,+ count: fit.gymPasses.length > 1 ? '${fit.gymPasses.length}' : null,+ onMore: fit.goGymPasses,+ child: Padding(+ padding: const EdgeInsets.only(bottom: 6),+ child: fit.lastPass == null+ ? GymPassEmpty(onTap: () => addGymPass(context))+ : GymPassCarousel(key: ValueKey(fit.gymPasses.length)),+ )),+ ),+ const SizedBox(height: 30),+ ],+ Rise(+ index: 4,+ child: _box(gc,+ title: t.historyTitle,+ count: fit.sessions.isEmpty ? null : '${fit.sessions.length}',+ onMore: fit.sessions.isEmpty ? null : fit.goHistory,+ child: _year(gc)),+ ),+ ],),- ],- ),+ ),+ ],),),],@@ -163,8 +163,6 @@ class _ProfileScreenState extends State<ProfileScreen> {);}- List<LoggedSession> get _latest => ([...fit.sessions]..sort((a, b) => b.day.compareTo(a.day))).take(2).toList();-Widget _year(GymColors gc) {final months = fit.sessionsByMonth;final peak = months.fold(1, math.max);@@ -172,9 +170,7 @@ class _ProfileScreenState extends State<ProfileScreen> {final best = fit.bestMonthThisYear;final lifted = fit.liftedSpanOf(fit.volumeThisYearKg);- return Container(- padding: const EdgeInsets.fromLTRB(18, 18, 18, 16),- decoration: BoxDecoration(color: gc.bgRaised, borderRadius: BorderRadius.circular(22)),+ return SizedBox(child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [@@ -277,93 +273,130 @@ class _ProfileScreenState extends State<ProfileScreen> {);}- Widget _heading(GymColors gc, String title, {String? count, VoidCallback? onMore, VoidCallback? onAdd}) {+ Widget _heading(GymColors gc, String title, {String? count, VoidCallback? onMore}) {+ final label = AppTheme.f(10.5, weight: FontWeight.w700, color: gc.textTertiary, letterSpacing: 1.4);return GestureDetector(behavior: HitTestBehavior.opaque,onTap: onMore,- child: Row(- children: [- Text(title, style: AppTheme.f(21, color: gc.text)),- if (count != null) ...[- const SizedBox(width: 9),- Text(count, style: AppTheme.f(17, weight: FontWeight.w600, color: gc.textTertiary)),+ child: Padding(+ padding: const EdgeInsets.only(left: 2),+ child: Row(+ children: [+ Text(title.toUpperCase(), style: label),+ if (count != null) ...[+ const SizedBox(width: 8),+ Text(count, style: label.copyWith(color: gc.textSecondary)),+ ],+ const Spacer(),+ if (onMore != null) _seeAll(gc, onMore),],- const Spacer(),- if (onAdd != null) ...[- Semantics(- button: true,- label: t.snapNow,- child: Pressable(- onTap: onAdd,- scale: 0.88,- child: Container(- width: 32,- height: 32,- decoration: BoxDecoration(color: gc.accentSoft, shape: BoxShape.circle),- child: Icon(PhosphorIconsBold.plus, size: 15, color: gc.accent),- ),+ ),+ ),+ );+ }++ Widget _seeAll(GymColors gc, VoidCallback onTap) => Pressable(+ onTap: onTap,+ scale: 0.94,+ child: Container(+ height: 28,+ padding: const EdgeInsets.symmetric(horizontal: 12),+ alignment: Alignment.center,+ decoration: BoxDecoration(color: gc.bgRaised2, borderRadius: BorderRadius.circular(14)),+ child: Text(t.healthSeeAll, style: AppTheme.f(12, weight: FontWeight.w700, color: gc.text)),+ ),+ );++ Widget _box(GymColors gc, {required String title, String? count, VoidCallback? onMore, required Widget child}) {+ final dark = gc.bg.computeLuminance() < 0.5;+ return Container(+ padding: const EdgeInsets.all(6),+ decoration: BoxDecoration(+ color: gc.bgRaised,+ borderRadius: BorderRadius.circular(28),+ border: Border.all(color: gc.text.withValues(alpha: 0.05)),+ ),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ Container(+ padding: const EdgeInsets.fromLTRB(12, 14, 12, 8),+ decoration: BoxDecoration(+ borderRadius: BorderRadius.circular(22),+ gradient: LinearGradient(+ begin: Alignment.topCenter,+ end: Alignment.bottomCenter,+ colors: dark+ ? [Color.lerp(gc.bg, Colors.black, 0.5)!, Color.lerp(gc.bg, gc.bgRaised, 0.4)!]+ : [gc.bgRaised2, gc.bg],),),- const SizedBox(width: 12),- ],- if (onMore != null) Icon(PhosphorIconsBold.caretRight, size: 16, color: gc.textTertiary),+ child: child,+ ),+ Padding(+ padding: const EdgeInsets.fromLTRB(12, 10, 4, 4),+ child: Row(+ children: [+ Text(title, style: AppTheme.f(14, weight: FontWeight.w700, color: gc.text)),+ if (count != null) ...[+ const SizedBox(width: 7),+ Text(count, style: AppTheme.f(14, weight: FontWeight.w700, color: gc.textTertiary)),+ ],+ const Spacer(),+ if (onMore != null) _seeAll(gc, onMore),+ ],+ ),+ ),],),);}- Widget _stats(GymColors gc) {- final items = <(String, String, String)>[- (t.statWorkouts, '${fit.totalSessions}', ''),- (t.statTrained, fit.trainedSpan.$1, fit.trainedSpan.$2),- (t.statSets, '${fit.totalSets}', ''),- (t.statLifted, fit.liftedSpan.$1, fit.liftedSpan.$2),- (t.statStreak, '${fit.currentStreak}', t.statDays),+ Widget _pills(GymColors gc) {+ final cells = [+ (PhosphorIconsRegular.barbell, '${fit.totalSessions}', t.statWorkouts),+ (PhosphorIconsRegular.timer, '${fit.trainedSpan.$1} ${fit.trainedSpan.$2}', ''),+ (PhosphorIconsRegular.trendUp, '${fit.liftedSpan.$1} ${fit.liftedSpan.$2}', ''),+ if (fit.gamification) (PhosphorIconsRegular.medal, t.levelShort(fit.athleteLevel), ''),+ (PhosphorIconsRegular.scales, fit.weightLabel(fit.profile.weightKg), ''),];return SizedBox(- height: 52,+ height: 36,child: ListView.separated(scrollDirection: Axis.horizontal,- padding: const EdgeInsets.only(right: 20),- itemCount: items.length,- separatorBuilder: (_, _) => const SizedBox(width: 28),- itemBuilder: (_, i) {- final (label, value, unit) = items[i];- return Column(- crossAxisAlignment: CrossAxisAlignment.start,- mainAxisAlignment: MainAxisAlignment.center,- children: [- Text(label.toUpperCase(),- style: AppTheme.f(10.5,- weight: FontWeight.w600, color: gc.textTertiary, letterSpacing: 0.9)),- const SizedBox(height: 7),- Row(- crossAxisAlignment: CrossAxisAlignment.baseline,- textBaseline: TextBaseline.alphabetic,- children: [- RollIn(value, style: AppTheme.f(23, weight: FontWeight.w800, color: gc.text)),- if (unit.isNotEmpty) ...[- const SizedBox(width: 4),- Text(unit,- style: AppTheme.f(12, weight: FontWeight.w500, color: gc.textSecondary)),- ],- ],- ),- ],+ padding: const EdgeInsets.symmetric(horizontal: 20),+ itemCount: cells.length,+ separatorBuilder: (_, _) => const SizedBox(width: 8),+ itemBuilder: (context, i) {+ final (icon, value, label) = cells[i];+ return Container(+ padding: const EdgeInsets.symmetric(horizontal: 13),+ decoration: BoxDecoration(color: gc.bgRaised, borderRadius: BorderRadius.circular(18)),+ child: Row(mainAxisSize: MainAxisSize.min, children: [+ Icon(icon, size: 15, color: gc.text),+ const SizedBox(width: 7),+ Text(value,+ style: AppTheme.f(13.5, weight: FontWeight.w800, color: gc.text)+ .copyWith(fontFeatures: const [FontFeature.tabularFigures()])),+ if (label.isNotEmpty) ...[+ const SizedBox(width: 5),+ Text(label, style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary)),+ ],+ ]),);},),);}- static const _turns = [-0.07, 0.05, -0.035, 0.065, -0.05];+ static const _turns = [-0.06, 0.045, -0.03, 0.055];Widget _photoCards(GymColors gc) {final shots = fit.momentsNewest.take(4).map((m) => m.file).toList();const w = 104.0, h = 136.0;return Semantics(button: true,- label: shots.isEmpty ? t.snapNow : t.photosCard,+ label: shots.isEmpty ? t.addPhoto : t.photosCard,child: Pressable(onTap: shots.isEmpty ? _snapshot : fit.goMoments,scale: 0.97,@@ -371,21 +404,40 @@ class _ProfileScreenState extends State<ProfileScreen> {height: h + 20,child: LayoutBuilder(builder: (context, box) {const n = 4;- final step = math.min(w * 0.78, (box.maxWidth - w) / (n - 1));+ final step = math.min(w * 0.8, (box.maxWidth - w) / (n - 1));return Stack(clipBehavior: Clip.none,children: [for (var i = 0; i < n; i++)Positioned(left: i * step,- top: i.isOdd ? 14 : 6,+ top: i.isOdd ? 12 : 6,width: w,height: h,child: Transform.rotate(- angle: _turns[i % _turns.length],+ angle: _turns[i],child: i < shots.length ? _shot(gc, shots[i]) : _ghost(gc),),),+ if (shots.isEmpty)+ Positioned.fill(+ child: Center(+ child: Container(+ height: 36,+ padding: const EdgeInsets.symmetric(horizontal: 14),+ decoration: BoxDecoration(+ color: gc.text,+ borderRadius: BorderRadius.circular(18),+ boxShadow: [BoxShadow(color: Colors.black.withValues(alpha: 0.35), blurRadius: 18)],+ ),+ child: Row(mainAxisSize: MainAxisSize.min, children: [+ Icon(PhosphorIconsRegular.camera, size: 16, color: gc.bg),+ const SizedBox(width: 7),+ Text(t.addPhoto, style: AppTheme.f(13, weight: FontWeight.w800, color: gc.bg)),+ ]),+ ),+ ),+ ),],);}),@@ -397,16 +449,16 @@ class _ProfileScreenState extends State<ProfileScreen> {Widget _frame(GymColors gc, Widget child) {final dark = gc.bg.computeLuminance() < 0.5;return Container(- padding: const EdgeInsets.all(3),+ padding: const EdgeInsets.all(2),decoration: BoxDecoration(- color: dark ? Color.lerp(gc.bgRaised2, Colors.white, 0.1) : Colors.white,- borderRadius: BorderRadius.circular(16),+ color: dark ? gc.bgRaised2 : Colors.white,+ borderRadius: BorderRadius.circular(18),boxShadow: [BoxShadow(- color: Colors.black.withValues(alpha: dark ? 0.5 : 0.16), blurRadius: 12, offset: const Offset(0, 4)),+ color: Colors.black.withValues(alpha: dark ? 0.4 : 0.12), blurRadius: 16, offset: const Offset(0, 6)),],),- child: ClipRRect(borderRadius: BorderRadius.circular(13), child: child),+ child: ClipRRect(borderRadius: BorderRadius.circular(16), child: child),);}@@ -419,14 +471,8 @@ class _ProfileScreenState extends State<ProfileScreen> {);Widget _ghost(GymColors gc) => Opacity(- opacity: 0.55,- child: _frame(- gc,- ColoredBox(- color: gc.bgRaised2,- child: Center(child: Icon(PhosphorIconsRegular.image, size: 22, color: gc.textTertiary)),- ),- ),+ opacity: 0.5,+ child: _frame(gc, ColoredBox(color: gc.bgRaised)),);}@@ -436,25 +482,20 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {required this.top,required this.onBanner,required this.onEdit,- required this.onShare,});final GymColors gc;final double top;final VoidCallback onBanner;final VoidCallback onEdit;- final VoidCallback onShare;- static const _banner = 176.0;static const _bar = 60.0;- static const _levelRow = 34.0;+ static const _avatar = 86.0;- double get _cut => fit.gamification ? 0 : _levelRow;- double get _identity => 128.0 - _cut;- double get _identityBlock => 136.0 - _cut;+ double get _banner => top + 172;@override- double get maxExtent => _banner + _identity;+ double get maxExtent => _banner + 82;@overridedouble get minExtent => top + _bar;@@ -468,25 +509,28 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {final shrunk = range <= 0 ? 1.0 : (shrinkOffset / range).clamp(0.0, 1.0);final bytes = fit.profileBanner;final p = fit.profile;-- final height = math.max(maxExtent - shrinkOffset, minExtent);- final bannerHeight = (height - 18 - _identityBlock + 38).clamp(minExtent, height);-- return SizedBox(- height: height,- child: Stack(- children: [- Positioned(- left: 0,- right: 0,- top: 0,- height: bannerHeight,+ final bannerBottom = math.max(minExtent, _banner - shrinkOffset);+ final fade = (1 - shrunk * 2).clamp(0.0, 1.0);+ final avatarTop = bannerBottom - _avatar + 18;+ final gone = ((shrunk - 0.35) / 0.45).clamp(0.0, 1.0);+ final bar = ((shrunk - 0.7) / 0.3).clamp(0.0, 1.0);++ return Stack(+ clipBehavior: Clip.none,+ children: [+ Positioned(+ left: 0,+ right: 0,+ top: 0,+ height: bannerBottom,+ child: Opacity(+ opacity: 1 - gone,child: GestureDetector(onTap: onBanner,child: Stack(fit: StackFit.expand,children: [- Container(+ DecoratedBox(decoration: BoxDecoration(color: gc.bgRaised,image: DecorationImage(@@ -502,12 +546,12 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {begin: Alignment.topCenter,end: Alignment.bottomCenter,colors: [- gc.bg.withValues(alpha: 0.18 + 0.6 * shrunk),- gc.bg.withValues(alpha: 0.10 + 0.6 * shrunk),- gc.bg.withValues(alpha: 0.55),+ Colors.black.withValues(alpha: 0.35),+ Colors.black.withValues(alpha: 0),+ gc.bg.withValues(alpha: 0.35 + 0.65 * shrunk),gc.bg,],- stops: const [0, 0.38, 0.78, 1],+ stops: const [0, 0.3, 0.72, 1],),),),@@ -516,35 +560,73 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {),),),+ ),+ if (bar > 0)Positioned(- top: top + 9,- right: 16,- child: Row(children: [- _round(PhosphorIconsRegular.shareNetwork, onShare),- const SizedBox(width: 10),- _round(PhosphorIconsRegular.gearSix, fit.goPreferences),- ]),+ left: 0,+ right: 0,+ top: 0,+ child: IgnorePointer(+ child: Opacity(opacity: bar, child: EdgeBlur(height: top + 64, sigma: 14)),+ ),),- Positioned(- left: 20,- right: 20,- bottom: 18,+ Positioned(+ top: top + 9,+ right: 16,+ child: _round(PhosphorIconsRegular.gearSix, fit.goPreferences),+ ),+ Positioned(+ left: 0,+ right: 0,+ top: bannerBottom - 2,+ child: IgnorePointer(child: Opacity(- opacity: (1 - shrunk * 2).clamp(0.0, 1.0),- child: _full(p),+ opacity: fade,+ child: Center(+ child: Container(+ width: 36,+ height: 4,+ decoration: BoxDecoration(+ color: gc.text.withValues(alpha: 0.22),+ borderRadius: BorderRadius.circular(2),+ ),+ ),+ ),),),- Positioned(- left: 20,- top: top + 6,- height: 44,+ ),+ Positioned(+ left: 20,+ top: avatarTop,+ child: Opacity(opacity: fade, child: const ProfileAvatar(size: _avatar)),+ ),+ Positioned(+ right: 20,+ top: avatarTop + _avatar - 36,+ child: Opacity(+ opacity: fade,+ child: IgnorePointer(ignoring: fade < 0.5, child: _editPill()),+ ),+ ),+ Positioned(+ left: 20,+ right: 20,+ top: avatarTop + _avatar + 14,+ child: Opacity(opacity: fade, child: _full(p)),+ ),+ Positioned(+ left: 72,+ right: 72,+ top: top + 9,+ height: 38,+ child: IgnorePointer(child: Opacity(- opacity: ((shrunk - 0.62) / 0.38).clamp(0.0, 1.0),- child: _compact(p),+ opacity: bar,+ child: Transform.translate(offset: Offset(0, 8 * (1 - bar)), child: Center(child: _compact(p))),),),- ],- ),+ ),+ ],);}@@ -555,34 +637,49 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {child: Container(width: 38,height: 38,- decoration:- BoxDecoration(color: Colors.black.withValues(alpha: 0.5), shape: BoxShape.circle),+ decoration: BoxDecoration(color: Colors.black.withValues(alpha: 0.38), shape: BoxShape.circle),child: Icon(icon, size: 18, color: Colors.white),),);}+ Widget _editPill() {+ return Pressable(+ onTap: onEdit,+ scale: 0.94,+ child: Container(+ height: 26,+ padding: const EdgeInsets.symmetric(horizontal: 10),+ decoration: BoxDecoration(+ color: gc.text.withValues(alpha: 0.08),+ borderRadius: BorderRadius.circular(13),+ border: Border.all(color: gc.text.withValues(alpha: 0.12)),+ ),+ child: Row(mainAxisSize: MainAxisSize.min, children: [+ Icon(PhosphorIconsRegular.pencilSimple, size: 11.5, color: gc.textSecondary),+ const SizedBox(width: 5),+ Text(t.editProfile, style: AppTheme.f(11.5, weight: FontWeight.w700, color: gc.textSecondary)),+ ]),+ ),+ );+ }+Widget _compact(Profile p) {return Row(mainAxisSize: MainAxisSize.min,children: [- ProfileAvatar(size: 34),- const SizedBox(width: 11),- Column(- mainAxisAlignment: MainAxisAlignment.center,- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Row(children: [- Text(fit.displayName, style: AppTheme.f(15.5, color: gc.text)),- if (p.badge.isNotEmpty) ...[- const SizedBox(width: 5),- Icon(PhosphorIconsFill.sealCheck, size: 14, color: badgeColor(p.badge)),- ],- ]),- Text('@${fit.profileHandle}',- style: AppTheme.f(11.5, weight: FontWeight.w500, color: gc.textSecondary)),- ],+ ProfileAvatar(size: 24),+ const SizedBox(width: 8),+ Flexible(+ child: Text(fit.displayName,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: AppTheme.f(15.5, weight: FontWeight.w800, color: gc.text, letterSpacing: -0.2)),),+ if (p.badge.isNotEmpty) ...[+ const SizedBox(width: 5),+ Icon(PhosphorIconsFill.sealCheck, size: 14, color: badgeColor(p.badge)),+ ],],);}@@ -593,68 +690,26 @@ class _ProfileHeader extends SliverPersistentHeaderDelegate {mainAxisSize: MainAxisSize.min,children: [Row(- crossAxisAlignment: CrossAxisAlignment.end,children: [- ProfileAvatar(size: 76),- const Spacer(),- GestureDetector(- behavior: HitTestBehavior.opaque,- onTap: onEdit,- child: Container(- padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 10),- decoration: BoxDecoration(- color: gc.bgRaised2,- borderRadius: BorderRadius.circular(100),- ),- child: Text(t.editProfile,- style: AppTheme.f(13.5, weight: FontWeight.w600, color: gc.text)),- ),+ Flexible(+ child: Text(p.name,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: AppTheme.f(24, weight: FontWeight.w800, color: gc.text, letterSpacing: -0.3)),),+ if (p.badge.isNotEmpty) ...[+ const SizedBox(width: 7),+ Icon(PhosphorIconsFill.sealCheck, size: 19, color: badgeColor(p.badge)),+ ],],),- const SizedBox(height: 13),- Row(children: [- Flexible(- child: Text(p.name,- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: AppTheme.f(24, weight: FontWeight.w800, color: gc.text)),- ),- if (p.badge.isNotEmpty) ...[- const SizedBox(width: 7),- Icon(PhosphorIconsFill.sealCheck, size: 19, color: badgeColor(p.badge)),- ],- ]),- const SizedBox(height: 4),+ const SizedBox(height: 2),Text(- '@${fit.profileHandle} · ${fit.weightLabel(p.weightKg)}',+ '@${fit.profileHandle}',maxLines: 1,overflow: TextOverflow.ellipsis,- style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary),+ style: AppTheme.f(14, weight: FontWeight.w500, color: gc.textSecondary),),- if (fit.gamification) ...[- const SizedBox(height: 8),- Row(children: [- Container(- padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),- decoration: BoxDecoration(- color: gc.bgRaised2,- borderRadius: BorderRadius.circular(100),- ),- child: Text(t.levelShort(fit.athleteLevel),- style: AppTheme.f(12, weight: FontWeight.w700, color: gc.text)),- ),- const SizedBox(width: 8),- Flexible(- child: Text(- t.levelToNext(fit.sessionsToNextLevel, fit.athleteLevel + 1),- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: AppTheme.f(12, weight: FontWeight.w500, color: gc.textTertiary),- ),- ),- ]),- ],],);}