feat:更新图表模块
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:food_hub_app/api/recipe.dart';
|
||||
import 'package:food_hub_app/models/recipe.dart';
|
||||
import 'package:food_hub_app/utils/date_util.dart';
|
||||
import 'package:food_hub_app/utils/index.dart';
|
||||
import 'package:food_hub_app/widgets/common/index.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
import 'package:tdesign_flutter/tdesign_flutter.dart';
|
||||
|
||||
@@ -145,12 +146,10 @@ class _RecipeCalendarState extends State<RecipeCalendar> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
TDButton(
|
||||
icon: TDIcons.arrow_right,
|
||||
type: TDButtonType.fill,
|
||||
shape: TDButtonShape.circle,
|
||||
theme: TDButtonTheme.primary,
|
||||
circleIconButton(
|
||||
context: context,
|
||||
icon: Icons.chevron_right,
|
||||
onPressed: () => {}
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:food_hub_app/config/app_config.dart';
|
||||
|
||||
import 'package:food_hub_app/models/recipe.dart';
|
||||
import 'package:food_hub_app/widgets/common/image.dart';
|
||||
import 'package:tdesign_flutter/tdesign_flutter.dart';
|
||||
import 'package:food_hub_app/widgets/common/index.dart';
|
||||
|
||||
class RecipeCard extends StatelessWidget {
|
||||
final Recipe recipe;
|
||||
@@ -92,22 +92,15 @@ class RecipeCard extends StatelessWidget {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
TDButton(
|
||||
circleIconButton(
|
||||
context: context,
|
||||
icon: Icons.edit,
|
||||
size: TDButtonSize.small,
|
||||
type: TDButtonType.fill,
|
||||
shape: TDButtonShape.circle,
|
||||
theme: TDButtonTheme.primary,
|
||||
onTap: () => {},
|
||||
onPressed: () => {},
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
TDButton(
|
||||
circleIconButton(
|
||||
context: context,
|
||||
icon: Icons.book,
|
||||
size: TDButtonSize.small,
|
||||
type: TDButtonType.fill,
|
||||
shape: TDButtonShape.circle,
|
||||
theme: TDButtonTheme.primary,
|
||||
onTap: () => {},
|
||||
onPressed: () => {},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -60,9 +60,15 @@ Widget timelineContainer(List<Record> recordList) {
|
||||
builder: TimelineTileBuilder.connected(
|
||||
itemCount: recordList.length,
|
||||
connectorBuilder:
|
||||
(context, index, type) => Connector.solidLine(thickness: 2),
|
||||
(context, index, type) => Connector.solidLine(
|
||||
thickness: 2,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
indicatorBuilder: (context, index) {
|
||||
return Indicator.dot(size: 12.0);
|
||||
return Indicator.dot(
|
||||
size: 12.0,
|
||||
color: Theme.of(context).primaryColor,
|
||||
);
|
||||
},
|
||||
contentsBuilder: (context, index) {
|
||||
return TimelineCard(record: recordList[index]);
|
||||
|
||||
Reference in New Issue
Block a user