feat(feed): add recipes screen

This commit is contained in:
mso7nueh
2024-08-02 11:52:10 +03:00
parent c78f8dacdf
commit 904adbba2f
111 changed files with 1511 additions and 1784 deletions

View File

@@ -247,12 +247,16 @@ class _ExpandableListState extends State<ExpandableList> {
value: value,
child: SizedBox(
// Используем SizedBox для ограничения ширины элемента списка
width: MediaQuery.of(context).size.width * 0.8, // Устанавливаем желаемую ширину элемента списка
width: MediaQuery
.of(context)
.size
.width * 0.8, // Устанавливаем желаемую ширину элемента списка
child: Text(value),
),
);
}).toList(),
isExpanded: true, // Расширяем список на всю доступную ширину
isExpanded: true,
// Расширяем список на всю доступную ширину
decoration: InputDecoration(labelText: 'Активность'),
),
Row(
@@ -391,11 +395,9 @@ class _ExpandableListState extends State<ExpandableList> {
return baseUrl + '/api/profile/update';
}
Future<http.Response> _sendHttpRequest(
Map<String, dynamic> profileData,
String apiUrl,
String? token,
) {
Future<http.Response> _sendHttpRequest(Map<String, dynamic> profileData,
String apiUrl,
String? token,) {
return http.post(
Uri.parse(apiUrl),
body: json.encode(profileData),
@@ -420,16 +422,17 @@ class _ExpandableListState extends State<ExpandableList> {
void _showErrorDialog(String errorMessage) {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text('Ошибка'),
content: Text(errorMessage),
actions: [
TextButton(
onPressed: onTapOk(context),
child: Text('OK'),
builder: (context) =>
AlertDialog(
title: Text('Ошибка'),
content: Text(errorMessage),
actions: [
TextButton(
onPressed: onTapOk(context),
child: Text('OK'),
),
],
),
],
),
);
}