Skip to content

Offline gym log for Android. No account, no ads, no internet.

Put your photo and your username on the share cards

InlitXde75bf164833
diff --git a/lib/screens/share_sheet.dart b/lib/screens/share_sheet.dart
index 8132f24..00a431e 100644
--- a/lib/screens/share_sheet.dart
+++ b/lib/screens/share_sheet.dart
@@ -82,7 +82,7 @@ class _ShareSheetState extends State<_ShareSheet> {
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.9),
decoration: BoxDecoration(
color: gc.bg,
- border: Border.all(color: gc.border),
+
borderRadius: const BorderRadius.vertical(top: Radius.circular(26)),
),
clipBehavior: Clip.antiAlias,
@@ -91,20 +91,20 @@ class _ShareSheetState extends State<_ShareSheet> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- SheetHandle(color: gc.border, margin: const EdgeInsets.symmetric(vertical: 12)),
+ const SheetHandle(margin: EdgeInsets.symmetric(vertical: 14)),
Padding(
padding: const EdgeInsets.fromLTRB(20, 4, 20, 12),
child: Row(
children: [
Expanded(
child: Text(t.sharePick,
- style: AppTheme.d(17, weight: FontWeight.w700, color: gc.text)),
+ style: AppTheme.f(20, weight: FontWeight.w800, color: gc.text)),
),
],
),
),
SizedBox(
- height: 38,
+ height: 44,
child: ListView(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 20),
@@ -112,12 +112,14 @@ class _ShareSheetState extends State<_ShareSheet> {
for (final k in kinds)
Padding(
padding: const EdgeInsets.only(right: 8),
- child: Pill(
- label: _label(k),
- bg: k == kind ? gc.emberSoft : gc.bgRaised,
- fg: k == kind ? gc.text : gc.textSecondary,
- fontSize: 12.5,
- onTap: () => setState(() => _kind = k),
+ child: Center(
+ child: Pill(
+ label: _label(k),
+ bg: k == kind ? gc.emberSoft : gc.bgRaised,
+ fg: k == kind ? gc.text : gc.textSecondary,
+ fontSize: 12.5,
+ onTap: () => setState(() => _kind = k),
+ ),
),
),
],
@@ -140,7 +142,7 @@ class _ShareSheetState extends State<_ShareSheet> {
padding: const EdgeInsets.fromLTRB(20, 10, 20, 6),
child: Text(t.shareHint,
textAlign: TextAlign.center,
- style: AppTheme.s(11.5, color: gc.textTertiary, height: 1.4)),
+ style: AppTheme.f(11.5, weight: FontWeight.w500, color: gc.textTertiary, height: 1.4)),
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 6, 20, 16),
diff --git a/lib/widgets/share_cards.dart b/lib/widgets/share_cards.dart
index c6bfe79..218876f 100644
--- a/lib/widgets/share_cards.dart
+++ b/lib/widgets/share_cards.dart
@@ -10,6 +10,8 @@ import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
import 'body_map.dart';
import 'charts.dart';
+import 'profile_avatar.dart';
+import 'svg_icon.dart';
const Size kShareCardSize = Size(340, 425);
@@ -33,7 +35,6 @@ class ShareCard extends StatelessWidget {
end: Alignment.bottomRight,
colors: [gc.bgRaised, gc.bg],
),
- border: Border.all(color: gc.border),
borderRadius: BorderRadius.circular(28),
),
child: Padding(
@@ -49,12 +50,12 @@ class ShareCard extends StatelessWidget {
decoration: BoxDecoration(color: gc.accent, shape: BoxShape.circle),
),
const SizedBox(width: 8),
- Text('GYMMANE',
- style: AppTheme.d(12,
- weight: FontWeight.w700, color: gc.text, letterSpacing: 4)),
+ Text('GymMane',
+ style: AppTheme.f(13,
+ weight: FontWeight.w800, color: gc.text, letterSpacing: 0.4)),
const Spacer(),
Text(t.shortDateYear(DateTime.now()),
- style: AppTheme.s(11, color: gc.textTertiary)),
+ style: AppTheme.f(11, weight: FontWeight.w500, color: gc.textTertiary)),
],
),
const SizedBox(height: 20),
@@ -62,8 +63,14 @@ class ShareCard extends StatelessWidget {
const SizedBox(height: 14),
Container(height: 1, color: gc.border),
const SizedBox(height: 10),
- Text(fit.profile.name.isEmpty ? 'GymMane' : fit.profile.name,
- style: AppTheme.s(11, weight: FontWeight.w600, color: gc.textTertiary)),
+ Row(
+ children: [
+ const ProfileAvatar(size: 22),
+ const SizedBox(width: 8),
+ Text('@${fit.profileHandle}',
+ style: AppTheme.f(11, weight: FontWeight.w600, color: gc.textTertiary)),
+ ],
+ ),
],
),
),
@@ -78,23 +85,23 @@ class ShareCard extends StatelessWidget {
};
Widget _kicker(String text) => Text(text,
- style: AppTheme.d(11, weight: FontWeight.w600, color: gc.brass, letterSpacing: 3));
+ style: AppTheme.f(11, weight: FontWeight.w600, color: gc.brass, letterSpacing: 1.5));
Widget _stat(String label, String value, {String? unit, Color? color}) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label,
- style: AppTheme.s(9.5, weight: FontWeight.w600, color: gc.textTertiary, letterSpacing: 1)),
+ style: AppTheme.f(9.5, weight: FontWeight.w600, color: gc.textTertiary, letterSpacing: 1)),
const SizedBox(height: 3),
RichText(
text: TextSpan(
text: value,
- style: AppTheme.d(26, weight: FontWeight.w700, color: color ?? gc.text),
+ style: AppTheme.f(22, weight: FontWeight.w800, color: color ?? gc.text),
children: [
if (unit != null)
TextSpan(
text: ' $unit',
- style: AppTheme.d(12, weight: FontWeight.w700, color: gc.textSecondary)),
+ style: AppTheme.f(11, weight: FontWeight.w700, color: gc.textSecondary)),
],
),
),
@@ -111,21 +118,27 @@ class ShareCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('${fit.currentStreak}',
- style: AppTheme.d(66, weight: FontWeight.w700, color: gc.text, height: 0.95)),
+ style: AppTheme.f(66, weight: FontWeight.w700, color: gc.text, height: 0.95)),
const SizedBox(width: 8),
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Text(t.shareStreakLabel.toLowerCase(),
- style: AppTheme.s(12, weight: FontWeight.w600, color: gc.textSecondary)),
+ style: AppTheme.f(12, weight: FontWeight.w600, color: gc.textSecondary)),
),
+ const Spacer(),
+ SvgPathIcon(Ic.flame, size: 76, color: gc.accent),
],
),
- const SizedBox(height: 16),
- SizedBox(height: 122, child: Heatmap(levels: fit.heatmapLevelsFor(60))),
+ const SizedBox(height: 4),
+ Text(t.sessionsLogged(fit.sessionsThisWeek),
+ style: AppTheme.f(12, weight: FontWeight.w500, color: gc.textSecondary)),
+ const SizedBox(height: 18),
+ SizedBox(height: 118, child: Heatmap(levels: fit.heatmapLevelsFor(60))),
const Spacer(),
Row(
children: [
Expanded(child: _stat(t.shareSessionsLabel, '${fit.totalSessions}')),
+ Expanded(child: _stat(t.statTrained, fit.trainedSpan.$1, unit: fit.trainedSpan.$2)),
Expanded(
child: _stat(t.shareVolumeLabel, fit.volumeValue(fit.volume30dKg),
unit: fit.volumeUnit, color: gc.accent)),
@@ -135,6 +148,7 @@ class ShareCard extends StatelessWidget {
);
}
+
Widget _bodyMap() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -142,7 +156,7 @@ class ShareCard extends StatelessWidget {
_kicker(t.shareWeekOf),
const SizedBox(height: 6),
Text(t.shareBody,
- style: AppTheme.d(22, weight: FontWeight.w700, color: gc.text)),
+ style: AppTheme.f(22, weight: FontWeight.w700, color: gc.text)),
const SizedBox(height: 10),
Expanded(
child: Center(
@@ -163,7 +177,7 @@ class ShareCard extends StatelessWidget {
Widget _compare() {
final pair = fit.comparePair;
if (pair == null) {
- return Center(child: Text(t.compareNeedTwo, style: AppTheme.s(13, color: gc.textSecondary)));
+ return Center(child: Text(t.compareNeedTwo, style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary)));
}
final pose = fit.posesWithBoth.contains(fit.comparePose)
? fit.comparePose
@@ -189,20 +203,20 @@ class ShareCard extends StatelessWidget {
children: [
Expanded(
child: Text(t.shortDateYear(pair.from.date),
- style: AppTheme.s(11, weight: FontWeight.w600, color: gc.textTertiary)),
+ style: AppTheme.f(11, weight: FontWeight.w600, color: gc.textTertiary)),
),
const SizedBox(width: 10),
Expanded(
child: Text(t.shortDateYear(pair.to.date),
textAlign: TextAlign.right,
- style: AppTheme.s(11, weight: FontWeight.w600, color: gc.textTertiary)),
+ style: AppTheme.f(11, weight: FontWeight.w600, color: gc.textTertiary)),
),
],
),
if (delta != null) ...[
const SizedBox(height: 8),
Text('${delta > 0 ? '+' : ''}${fmt(delta)} ${fit.units}',
- style: AppTheme.d(20, weight: FontWeight.w700, color: gc.accent)),
+ style: AppTheme.f(20, weight: FontWeight.w700, color: gc.accent)),
],
],
);
@@ -215,7 +229,6 @@ class ShareCard extends StatelessWidget {
decoration: BoxDecoration(
color: gc.bgRaised2,
borderRadius: BorderRadius.circular(16),
- border: Border.all(color: gc.border),
),
clipBehavior: Clip.antiAlias,
child: path == null