feat:增加睡眠记录

This commit is contained in:
2025-12-02 14:09:56 +08:00
parent 2cc69b4019
commit 8a71ea542e
14 changed files with 402 additions and 129 deletions

View File

@@ -1,3 +1,4 @@
import 'package:fitnote/widget/record/common.dart';
import 'package:flutter/material.dart';
class NumberInput extends StatefulWidget {
@@ -29,6 +30,8 @@ class _NumberInputState extends State<NumberInput> {
late num _currentValue;
final Color disabledColor = Colors.grey.shade400;
final double width = 150;
final double height = 36;
@override
void initState() {
@@ -74,8 +77,8 @@ class _NumberInputState extends State<NumberInput> {
final colors = Theme.of(context).colorScheme;
return Container(
width: 32,
height: 32,
width: height,
height: height,
child: Material(
color: disabled ? disabledColor : colors.primary.withAlpha(100),
child: InkWell(
@@ -89,14 +92,9 @@ class _NumberInputState extends State<NumberInput> {
@override
Widget build(BuildContext context) {
final colors = Theme.of(context).colorScheme;
return Container(
width: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
border: Border.all(color: colors.primary, width: 1.5),
),
width: width,
decoration: buildBoxDecoration(context),
child: IntrinsicWidth(
child: Row(
mainAxisSize: MainAxisSize.min,