diet creation page

This commit is contained in:
Username1548
2024-11-20 15:28:48 +07:00
parent 92c1bb1a91
commit c292f3a767
19 changed files with 1036 additions and 38 deletions

View File

@@ -1,7 +1,9 @@
import 'package:eatvio_app/generated/l10n.dart';
import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
import 'package:flutter_svg/flutter_svg.dart';
class SortingDropDownFilter extends StatefulWidget {
const SortingDropDownFilter({super.key});
@@ -29,6 +31,11 @@ class _SortingDropDownFilterState extends State<SortingDropDownFilter> {
@override
Widget build(BuildContext context) {
return DropdownButtonFormField(
icon: SvgPicture.asset(
'assets/icons/arrow_down2.svg',
width: 12,
height: 8,
),
borderRadius: BorderRadius.circular(20),
dropdownColor: appTheme.lightGray0,
decoration: InputDecoration(
@@ -43,12 +50,21 @@ class _SortingDropDownFilterState extends State<SortingDropDownFilter> {
items: sortingTypes
.mapIndexed(
(index, value) => DropdownMenuItem(
child: Text(sortingTypes[index]),
child: Text(
sortingTypes[index],
style: TextStyles.textMMedium.copyWith(color: appTheme.black),
),
value: sortingTypes[index],
),
)
.toList(),
onChanged: (value) {},
onChanged: (value) {
if (value != null) {
setState(() {
selectedIndex = sortingTypes.indexOf(value);
});
}
},
);
}
}