Rounded rectangles and round controls are now square across the app; only status dots, glows, the sun, rings and the breathing circle stay round. Cards, rows, thumbnails, featured cards, category tiles, the standing card and the nav are larger. Home gets a quick To-do list kept on the device (TodoItem in InternalMemory), seeded with sample items in mock mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
64 lines
1.8 KiB
Dart
64 lines
1.8 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
|
|
import '../../about/internal/application/TextType.dart';
|
|
import '../../utils/Colors.dart';
|
|
import '../text/Text.dart';
|
|
|
|
/// A labelled minus / value / plus control for sets, reps and seconds.
|
|
/// Numbers are stepped, not typed — nobody wants a keyboard mid-routine-edit.
|
|
Widget countStepper(
|
|
String label,
|
|
String value, {
|
|
required VoidCallback onMinus,
|
|
required VoidCallback onPlus,
|
|
bool canMinus = true,
|
|
}) {
|
|
return Container(
|
|
padding: const EdgeInsets.fromLTRB(14, 10, 8, 10),
|
|
decoration: BoxDecoration(
|
|
color: colorWhite,
|
|
borderRadius: BorderRadius.zero,
|
|
border: Border.all(color: colorBorder, width: 1),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
text(label.toUpperCase(), 9, TextType.Bold,
|
|
color: colorGrey2, letterSpacing: 1.0),
|
|
const SizedBox(height: 4),
|
|
text(value, 17, TextType.Medium, color: colorPrimaryDark),
|
|
],
|
|
),
|
|
),
|
|
_stepButton(CupertinoIcons.minus, canMinus ? onMinus : null),
|
|
const SizedBox(width: 6),
|
|
_stepButton(CupertinoIcons.plus, onPlus),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _stepButton(IconData icon, VoidCallback? onTap) {
|
|
final bool enabled = onTap != null;
|
|
|
|
return GestureDetector(
|
|
onTap: onTap,
|
|
behavior: HitTestBehavior.opaque,
|
|
child: Container(
|
|
width: 34,
|
|
height: 34,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: enabled ? colorSecondary : colorInset,
|
|
borderRadius: BorderRadius.zero,
|
|
),
|
|
child: Icon(icon,
|
|
size: 14, color: enabled ? colorPrimaryDark : colorGrey),
|
|
),
|
|
);
|
|
}
|