Skip to content

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

Redraw the design language: Figtree, calmer cards and a light theme that reads

InlitXf177c15c08ff
diff --git a/lib/theme/app_colors.dart b/lib/theme/app_colors.dart
index c2d97e9..3a02d7f 100644
--- a/lib/theme/app_colors.dart
+++ b/lib/theme/app_colors.dart
@@ -57,9 +57,9 @@ class GymColors extends ThemeExtension<GymColors> {
static const dark = GymColors(
pageBg: Color(0xFF0A0908),
bg: Color(0xFF0A0A0A),
- bgRaised: Color(0xFF161616),
- bgRaised2: Color(0xFF202020),
- border: Color(0xFF2A2A2A),
+ bgRaised: Color(0xFF1C1C1C),
+ bgRaised2: Color(0xFF2B2B2B),
+ border: Color(0xFF3E3E3E),
navBg: Color(0xD90A0A0A),
text: Color(0xFFFFFFFF),
textSecondary: Color(0xFF9A9A9A),
@@ -75,37 +75,37 @@ class GymColors extends ThemeExtension<GymColors> {
sage: Color(0xFF8FA377),
sageSoft: Color(0x298FA377),
mutedFill: Color(0xFF2A2A2A),
- heatEmpty: Color(0xFF181818),
+ heatEmpty: Color(0xFF242424),
info: Color(0xFF7FA8C9),
warn: Color(0xFFE0B15A),
danger: Color(0xFFE5674C),
);
static const light = GymColors(
- pageBg: Color(0xFFEDE6DA),
- bg: Color(0xFFF7F3EC),
- bgRaised: Color(0xFFFFFDF9),
- bgRaised2: Color(0xFFEFE7DA),
- border: Color(0xFFE3D9C9),
- navBg: Color(0xE6F7F3EC),
- text: Color(0xFF1C1714),
- textSecondary: Color(0xFF6E6358),
- textTertiary: Color(0xFF857A6E),
- ember: Color(0xFF1C1714),
+ pageBg: Color(0xFFFFFEFD),
+ bg: Color(0xFFF7F4F0),
+ bgRaised: Color(0xFFFFFFFF),
+ bgRaised2: Color(0xFFECE8E3),
+ border: Color(0xFFE0DBD5),
+ navBg: Color(0xF2FFFEFD),
+ text: Color(0xFF1A1713),
+ textSecondary: Color(0xFF5F574F),
+ textTertiary: Color(0xFF8A8179),
+ ember: Color(0xFF1A1713),
emberDeep: Color(0xFF000000),
- onEmber: Color(0xFFFDFBF7),
- emberSoft: Color(0x141C1714),
- emberShadow: Color(0x241C1714),
- accent: Color(0xFFA85B36),
- accentSoft: Color(0x1FA85B36),
+ onEmber: Color(0xFFFFFFFF),
+ emberSoft: Color(0x121A1713),
+ emberShadow: Color(0x1F1A1713),
+ accent: Color(0xFF9E4E27),
+ accentSoft: Color(0x1F9E4E27),
brass: Color(0xFF8A6B41),
- sage: Color(0xFF4F6B41),
- sageSoft: Color(0x235F7A50),
- mutedFill: Color(0xFFDCCFB8),
- heatEmpty: Color(0xFFE8DFD0),
- info: Color(0xFF37648B),
- warn: Color(0xFF8A6218),
- danger: Color(0xFFB0341C),
+ sage: Color(0xFF3D7A52),
+ sageSoft: Color(0x1F3D7A52),
+ mutedFill: Color(0xFFE9E4DE),
+ heatEmpty: Color(0xFFE7E2DC),
+ info: Color(0xFF3268A0),
+ warn: Color(0xFF9A6A12),
+ danger: Color(0xFFC0392B),
);
@override
diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart
index aa38721..aa1fe07 100644
--- a/lib/theme/app_theme.dart
+++ b/lib/theme/app_theme.dart
@@ -7,6 +7,7 @@ class AppTheme {
static const String disp = 'Oswald';
static const String sans = 'IBM Plex Sans';
+ static const String round = 'Figtree';
static ThemeData get dark => _build(Brightness.dark, GymColors.dark);
static ThemeData get light => _build(Brightness.light, GymColors.light);
@@ -50,6 +51,22 @@ class AppTheme {
height: height,
);
+ static TextStyle f(
+ double size, {
+ FontWeight weight = FontWeight.w700,
+ Color? color,
+ double? letterSpacing,
+ double height = 1.15,
+ }) =>
+ TextStyle(
+ fontFamily: round,
+ fontSize: size,
+ fontWeight: weight,
+ color: color,
+ letterSpacing: letterSpacing,
+ height: height,
+ );
+
static TextStyle s(
double size, {
FontWeight weight = FontWeight.w400,
diff --git a/lib/widgets/dialogs.dart b/lib/widgets/dialogs.dart
index 8d41228..71e1920 100644
--- a/lib/widgets/dialogs.dart
+++ b/lib/widgets/dialogs.dart
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import '../l10n/l10n.dart';
import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
+import 'ui_kit.dart';
AlertDialog appDialog(
GymColors gc, {
@@ -12,7 +13,11 @@ AlertDialog appDialog(
}) =>
AlertDialog(
backgroundColor: gc.bgRaised,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
+ insetPadding: const EdgeInsets.symmetric(horizontal: 28),
+ titlePadding: const EdgeInsets.fromLTRB(24, 24, 24, 10),
+ contentPadding: const EdgeInsets.fromLTRB(24, 0, 24, 8),
+ actionsPadding: const EdgeInsets.fromLTRB(16, 0, 16, 12),
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(26)),
title: title,
content: content,
actions: actions,
@@ -21,8 +26,13 @@ AlertDialog appDialog(
Widget dialogAction(String label, Color color, VoidCallback onPressed, {bool strong = true}) =>
TextButton(
onPressed: onPressed,
- child: Text(label,
- style: AppTheme.s(14, weight: strong ? FontWeight.w700 : FontWeight.w400, color: color)),
+ style: TextButton.styleFrom(
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(100)),
+ ),
+ child: Text(titleCase(label),
+ style: AppTheme.f(14,
+ weight: strong ? FontWeight.w700 : FontWeight.w600, color: color)),
);
Future<bool> askConfirm(
@@ -38,8 +48,10 @@ Future<bool> askConfirm(
context: context,
builder: (dctx) => appDialog(
gc,
- title: Text(title, style: AppTheme.d(18, weight: FontWeight.w700, color: gc.text)),
- content: Text(body, style: AppTheme.s(13, color: gc.textSecondary)),
+ title: Text(title, style: AppTheme.f(19, weight: FontWeight.w800, color: gc.text)),
+ content: Text(body,
+ style: AppTheme.f(13.5,
+ weight: FontWeight.w500, color: gc.textSecondary, height: 1.45)),
actions: [
dialogAction(cancelLabel ?? t.cancel, gc.textSecondary, () => Navigator.of(dctx).pop(false),
strong: false),
@@ -64,19 +76,20 @@ Future<double?> askNumber(
context: context,
builder: (dctx) => appDialog(
gc,
- title: Text(title, style: AppTheme.d(14, weight: FontWeight.w700, color: gc.text, letterSpacing: 2)),
+ title: Text(titleCase(title), style: AppTheme.f(19, weight: FontWeight.w800, color: gc.text)),
content: TextField(
controller: controller,
autofocus: true,
keyboardType: TextInputType.numberWithOptions(decimal: decimal),
textAlign: TextAlign.center,
- style: AppTheme.d(32, weight: FontWeight.w700, color: gc.text),
+ style: AppTheme.f(34, weight: FontWeight.w800, color: gc.text, height: 1.1),
cursorColor: gc.accent,
onSubmitted: (v) => Navigator.of(dctx).pop(v),
decoration: InputDecoration(
filled: true,
fillColor: gc.bgRaised2,
- border: OutlineInputBorder(borderRadius: BorderRadius.circular(14), borderSide: BorderSide.none),
+ contentPadding: const EdgeInsets.symmetric(vertical: 18, horizontal: 16),
+ border: OutlineInputBorder(borderRadius: BorderRadius.circular(18), borderSide: BorderSide.none),
),
),
actions: [
diff --git a/lib/widgets/note_kit.dart b/lib/widgets/note_kit.dart
index 25f9ab0..701adc9 100644
--- a/lib/widgets/note_kit.dart
+++ b/lib/widgets/note_kit.dart
@@ -1,7 +1,7 @@
import 'dart:io';
import 'package:flutter/material.dart';
-import 'package:phosphor_flutter/phosphor_flutter.dart';
+import 'package:phosphoricons_flutter/phosphoricons_flutter.dart';
import 'package:video_player/video_player.dart';
import '../l10n/l10n.dart';
@@ -75,7 +75,7 @@ class NoteCalendar extends StatelessWidget {
Expanded(
child: Text(t.monthYear(month),
textAlign: TextAlign.center,
- style: AppTheme.d(15, weight: FontWeight.w700, color: gc.text)),
+ style: AppTheme.f(15, weight: FontWeight.w700, color: gc.text)),
),
_arrow(gc, PhosphorIconsBold.caretRight, t.noteNextMonth, () => onMonth(1)),
],
@@ -87,7 +87,7 @@ class NoteCalendar extends StatelessWidget {
Expanded(
child: Text(t.weekdayInitial((t.firstWeekday + i - 1) % 7 + 1).toUpperCase(),
textAlign: TextAlign.center,
- style: AppTheme.d(10.5,
+ style: AppTheme.f(10.5,
weight: FontWeight.w600, color: gc.textTertiary, letterSpacing: 1)),
),
],
@@ -150,7 +150,7 @@ class NoteCalendar extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('${day.day}',
- style: AppTheme.d(13.5,
+ style: AppTheme.f(13.5,
weight: isToday || on ? FontWeight.w700 : FontWeight.w500,
color: on
? gc.text
@@ -194,7 +194,6 @@ Future<void> showNoteDaySheet(BuildContext context, DateTime day) async {
padding: sheetPad(context, bottom: 26),
decoration: BoxDecoration(
color: gc.bgRaised,
- border: Border.all(color: gc.border),
borderRadius: const BorderRadius.vertical(top: Radius.circular(28)),
),
child: Column(
@@ -204,9 +203,9 @@ Future<void> showNoteDaySheet(BuildContext context, DateTime day) async {
const SheetHandle(),
const SizedBox(height: 18),
Text(noteDayLabel(day).toUpperCase(),
- style: AppTheme.d(13, weight: FontWeight.w700, color: gc.text, letterSpacing: 2)),
+ style: AppTheme.f(13, weight: FontWeight.w700, color: gc.text, letterSpacing: 0.4)),
const SizedBox(height: 3),
- Text(t.fullDate(day), style: AppTheme.s(12.5, color: gc.textTertiary)),
+ Text(t.fullDate(day), style: AppTheme.f(12.5, weight: FontWeight.w500, color: gc.textTertiary)),
const SizedBox(height: 18),
for (final k in NoteKind.values) ...[
if (k != NoteKind.values.first) const SizedBox(height: 8),
@@ -218,7 +217,6 @@ Future<void> showNoteDaySheet(BuildContext context, DateTime day) async {
decoration: BoxDecoration(
color: gc.bgRaised2,
borderRadius: BorderRadius.circular(16),
- border: Border.all(color: gc.border),
),
child: Row(
children: [
@@ -226,7 +224,7 @@ Future<void> showNoteDaySheet(BuildContext context, DateTime day) async {
const SizedBox(width: 14),
Expanded(
child: Text(noteKindLabel(k),
- style: AppTheme.s(14, weight: FontWeight.w600, color: gc.text)),
+ style: AppTheme.f(14, weight: FontWeight.w600, color: gc.text)),
),
Icon(PhosphorIconsRegular.caretRight, size: 14, color: gc.textTertiary),
],
@@ -262,7 +260,7 @@ class NoteKindBadge extends StatelessWidget {
Icon(noteKindIcon(kind), size: compact ? 10 : 12, color: color),
SizedBox(width: compact ? 4 : 5),
Text(noteKindLabel(kind).toUpperCase(),
- style: AppTheme.d(compact ? 9.5 : 10.5,
+ style: AppTheme.f(compact ? 9.5 : 10.5,
weight: FontWeight.w600, color: color, letterSpacing: 1)),
],
),
@@ -297,7 +295,7 @@ class NoteKindPicker extends StatelessWidget {
color: selected == kind
? noteKindColor(gc, kind).withValues(alpha: 0.14)
: gc.bgRaised,
- borderRadius: BorderRadius.circular(14),
+ borderRadius: BorderRadius.circular(18),
border: Border.all(
color: selected == kind ? noteKindColor(gc, kind) : gc.border,
width: selected == kind ? 1.4 : 1,
@@ -314,7 +312,7 @@ class NoteKindPicker extends StatelessWidget {
child: Text(
noteKindLabel(kind),
maxLines: 1,
- style: AppTheme.s(11.5,
+ style: AppTheme.f(11.5,
weight: FontWeight.w600,
color: selected == kind
? noteKindColor(gc, kind)
@@ -368,7 +366,7 @@ class NoteFilterBar extends StatelessWidget {
),
child: Center(
child: Text(label,
- style: AppTheme.s(12.5,
+ style: AppTheme.f(12.5,
weight: FontWeight.w600, color: on ? color : gc.textSecondary)),
),
),
@@ -429,7 +427,6 @@ class NoteCard extends StatelessWidget {
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: gc.bgRaised,
- border: Border.all(color: gc.border),
borderRadius: BorderRadius.circular(18),
),
child: Stack(
@@ -450,7 +447,7 @@ class NoteCard extends StatelessWidget {
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.right,
- style: AppTheme.s(11.5, color: gc.textTertiary),
+ style: AppTheme.f(11.5, weight: FontWeight.w500, color: gc.textTertiary),
),
),
],
@@ -459,13 +456,13 @@ class NoteCard extends StatelessWidget {
Text(note.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
- style: AppTheme.s(15, weight: FontWeight.w600, color: gc.text, height: 1.3)),
+ style: AppTheme.f(15, weight: FontWeight.w600, color: gc.text, height: 1.3)),
if (note.body.isNotEmpty) ...[
const SizedBox(height: 4),
Text(note.body,
maxLines: 3,
overflow: TextOverflow.ellipsis,
- style: AppTheme.s(13, color: gc.textSecondary, height: 1.4)),
+ style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary, height: 1.4)),
],
if (note.media.isNotEmpty) ...[
const SizedBox(height: 12),
@@ -585,8 +582,7 @@ class NoteThumb extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: gc.bgRaised2,
- borderRadius: BorderRadius.circular(12),
- border: Border.all(color: gc.border),
+ borderRadius: BorderRadius.circular(16),
),
clipBehavior: Clip.antiAlias,
child: Center(child: inner),
@@ -597,11 +593,11 @@ class NoteThumb extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: const Color(0xA6000000),
- borderRadius: BorderRadius.circular(12),
+ borderRadius: BorderRadius.circular(16),
),
alignment: Alignment.center,
child: Text(badge!,
- style: AppTheme.d(14, weight: FontWeight.w700, color: Colors.white)),
+ style: AppTheme.f(14, weight: FontWeight.w700, color: Colors.white)),
),
),
if (onRemove != null)
@@ -619,7 +615,6 @@ class NoteThumb extends StatelessWidget {
decoration: BoxDecoration(
color: gc.bgRaised2,
shape: BoxShape.circle,
- border: Border.all(color: gc.border),
),
child: Icon(PhosphorIconsBold.x, size: 11, color: gc.text),
),
@@ -705,7 +700,7 @@ class _MediaViewerState extends State<_MediaViewer> {
const Spacer(),
if (widget.media.length > 1)
Text('${_index + 1}/${widget.media.length}',
- style: AppTheme.d(14, weight: FontWeight.w600, color: Colors.white)),
+ style: AppTheme.f(14, weight: FontWeight.w600, color: Colors.white)),
const SizedBox(width: 10),
],
),
diff --git a/lib/widgets/ui_kit.dart b/lib/widgets/ui_kit.dart
index df50b55..cd8434b 100644
--- a/lib/widgets/ui_kit.dart
+++ b/lib/widgets/ui_kit.dart
@@ -65,7 +65,6 @@ class SearchField extends StatelessWidget {
padding: const EdgeInsets.only(left: 16, right: 6),
decoration: BoxDecoration(
color: color ?? gc.bgRaised,
- border: Border.all(color: gc.border),
borderRadius: BorderRadius.circular(100),
),
child: Row(children: [
@@ -75,13 +74,13 @@ class SearchField extends StatelessWidget {
child: TextField(
controller: controller,
onChanged: onChanged,
- style: AppTheme.s(14, color: gc.text),
+ style: AppTheme.f(14, weight: FontWeight.w500, color: gc.text),
cursorColor: gc.accent,
decoration: InputDecoration(
isCollapsed: true,
border: InputBorder.none,
hintText: hint,
- hintStyle: AppTheme.s(14, color: gc.textSecondary),
+ hintStyle: AppTheme.f(14, weight: FontWeight.w500, color: gc.textSecondary),
),
),
),
@@ -164,17 +163,19 @@ class GhostButton extends StatelessWidget {
onTap: onTap,
child: Container(
height: 46,
+ padding: const EdgeInsets.symmetric(horizontal: 20),
alignment: Alignment.center,
decoration: BoxDecoration(
- border: Border.all(color: gc.border),
- borderRadius: BorderRadius.circular(14),
+ color: context.gc.bgRaised2,
+ borderRadius: BorderRadius.circular(100),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 16, color: gc.ember),
const SizedBox(width: 8),
- Text(label, style: AppTheme.d(13, weight: FontWeight.w600, color: gc.text, letterSpacing: 1)),
+ Text(titleCase(label),
+ style: AppTheme.f(13.5, weight: FontWeight.w700, color: gc.text)),
],
),
),
@@ -284,7 +285,9 @@ class ScreenHeader extends StatelessWidget {
ScreenTitle(title, size: titleSize, spacing: titleSpacing),
if (subtitle != null) ...[
const SizedBox(height: 2),
- Text(subtitle!, style: AppTheme.s(12.5, color: gc.textSecondary)),
+ Text(subtitle!,
+ style: AppTheme.f(12.5,
+ weight: FontWeight.w500, color: gc.textSecondary)),
],
],
),
@@ -295,6 +298,13 @@ class ScreenHeader extends StatelessWidget {
}
}
+String titleCase(String s) {
+ if (s.isEmpty || s != s.toUpperCase()) return s;
+ if (s.length <= 4 && !s.contains(' ')) return s;
+ if (RegExp(r'[0-9]').hasMatch(s)) return s;
+ return s[0] + s.substring(1).toLowerCase();
+}
+
class ScreenTitle extends StatelessWidget {
const ScreenTitle(this.text, {super.key, this.size = 22, this.spacing = 2});
final String text;
@@ -302,7 +312,10 @@ class ScreenTitle extends StatelessWidget {
final double spacing;
@override
Widget build(BuildContext context) =>
- Text(text, style: AppTheme.d(size, weight: FontWeight.w700, color: context.gc.text, letterSpacing: spacing));
+ Text(titleCase(text),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppTheme.f(size, weight: FontWeight.w800, color: context.gc.text));
}
class Kicker extends StatelessWidget {
@@ -313,7 +326,7 @@ class Kicker extends StatelessWidget {
final double spacing;
@override
Widget build(BuildContext context) =>
- Text(text, style: AppTheme.d(size, weight: FontWeight.w600, color: color, letterSpacing: spacing));
+ Text(text, style: AppTheme.f(size, weight: FontWeight.w600, color: color, letterSpacing: spacing));
}
class StepperControl extends StatelessWidget {
@@ -356,7 +369,7 @@ class StepperControl extends StatelessWidget {
Widget label = Container(
constraints: BoxConstraints(minWidth: minWidth),
alignment: Alignment.center,
- child: Text(value, style: AppTheme.d(fontSize, weight: FontWeight.w700, color: gc.text)),
+ child: Text(value, style: AppTheme.f(fontSize, weight: FontWeight.w700, color: gc.text)),
);
if (onEdit != null) {
label = GestureDetector(behavior: HitTestBehavior.opaque, onTap: onEdit, child: label);
@@ -387,7 +400,7 @@ class ToolRow extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Flexible(child: Text(label, style: AppTheme.s(13, weight: FontWeight.w600, color: gc.textSecondary))),
+ Flexible(child: Text(label, style: AppTheme.f(13, weight: FontWeight.w600, color: gc.textSecondary))),
control,
],
),
@@ -428,7 +441,7 @@ class SegToggle extends StatelessWidget {
borderRadius: BorderRadius.circular(100),
),
child: Text(o.label,
- style: AppTheme.s(fontSize,
+ style: AppTheme.f(fontSize,
weight: FontWeight.w600, color: o.selected ? gc.onEmber : gc.textSecondary)),
),
),
@@ -508,7 +521,8 @@ class Pill extends StatelessWidget {
child: Container(
padding: EdgeInsets.symmetric(horizontal: hPad, vertical: vPad),
decoration: BoxDecoration(color: bg, borderRadius: BorderRadius.circular(100)),
- child: Text(label, style: AppTheme.s(fontSize, weight: FontWeight.w600, color: fg)),
+ child: Text(titleCase(label),
+ style: AppTheme.f(fontSize, weight: FontWeight.w600, color: fg)),
),
);
}
@@ -549,9 +563,9 @@ class PrimaryButton extends StatelessWidget {
Flexible(
child: FittedBox(
fit: BoxFit.scaleDown,
- child: Text(label,
+ child: Text(titleCase(label),
maxLines: 1,
- style: AppTheme.d(16, weight: FontWeight.w600, color: f, letterSpacing: 2)),
+ style: AppTheme.f(15.5, weight: FontWeight.w700, color: f, letterSpacing: 0.2)),
),
),
],