feat:更新图表模块

This commit is contained in:
2025-07-27 22:28:04 +08:00
parent a2ed0f3d98
commit 34780651a8
7 changed files with 305 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:food_hub_app/widgets/common/index.dart';
class YearSelector extends StatefulWidget {
final int initialYear;
@@ -88,15 +88,11 @@ class _YearSelectorState extends State<YearSelector>
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TDButton(
circleIconButton(
context: context,
icon: Icons.chevron_left,
size: TDButtonSize.small,
type: TDButtonType.fill,
shape: TDButtonShape.circle,
theme: TDButtonTheme.primary,
onTap: () => _previousYear(),
onPressed: () => _previousYear(),
),
SizedBox(width: 10),
// 年份显示
AnimatedBuilder(
animation: _scaleAnimation,
@@ -112,16 +108,12 @@ class _YearSelectorState extends State<YearSelector>
),
),
),
SizedBox(width: 10),
TDButton(
circleIconButton(
context: context,
icon: Icons.chevron_right,
size: TDButtonSize.small,
type: TDButtonType.fill,
shape: TDButtonShape.circle,
theme: TDButtonTheme.primary,
onTap: () => _nextYear(),
),
onPressed: () => _nextYear(),
)
],
);
}
}
}