feat(Лента): фильтрация рецептов по тегам, поиск по строке

This commit is contained in:
mso7nueh
2024-09-02 16:12:54 +03:00
parent 5a651cad9e
commit 334a6b0970
43 changed files with 2320 additions and 2160 deletions

View File

@@ -1,11 +1,11 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/profile/models/profile_model.dart' as ProfileModel;
import 'package:eatvio_app/features/profile/models/profile_model.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
class WeightChartWidget extends StatelessWidget {
final List<ProfileModel.ChartPoint> chartPoints;
final List<ChartPointModel> chartPoints;
const WeightChartWidget({
super.key,
@@ -22,7 +22,7 @@ class WeightChartWidget extends StatelessWidget {
child: Row(
children: [
Text(
'${chartPoints.last.weight} кг',
'${chartPoints.last.weight.toStringAsFixed(2)} кг',
style: TextStyle(
color: Colors.black,
fontSize: 48,
@@ -88,9 +88,9 @@ class WeightChartWidget extends StatelessWidget {
);
}
List<CartesianSeries<ProfileModel.ChartPoint, DateTime>> _getSplineSeries() {
return <CartesianSeries<ProfileModel.ChartPoint, DateTime>>[
SplineAreaSeries<ProfileModel.ChartPoint, DateTime>(
List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
return <CartesianSeries<ChartPointModel, DateTime>>[
SplineAreaSeries<ChartPointModel, DateTime>(
markerSettings: MarkerSettings(
isVisible: true,
color: appTheme.blueA400,
@@ -112,8 +112,8 @@ class WeightChartWidget extends StatelessWidget {
end: Alignment(0, 0.6),
),
name: 'Вес',
xValueMapper: (ProfileModel.ChartPoint value, int index) => value.createdAt,
yValueMapper: (ProfileModel.ChartPoint value, int index) => value.weight,
xValueMapper: (ChartPointModel value, int index) => value.createdAt,
yValueMapper: (ChartPointModel value, int index) => value.weight,
),
];
}