feat(feed): about diets screen

This commit is contained in:
mso7nueh
2024-08-09 15:10:27 +03:00
parent 6620ed5337
commit 4af39985ee
5 changed files with 122 additions and 4 deletions

View File

@@ -0,0 +1,94 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/constants/constants.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/material.dart';
class AboutDietScreen extends StatelessWidget {
final Datum datum;
const AboutDietScreen({super.key, required this.datum});
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: SizedBox(
width: MediaQuery.of(context).size.width - 32,
child: FloatingActionButton.extended(
heroTag: 'nextButtonRegistration',
highlightElevation: 0,
elevation: 0,
focusElevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
backgroundColor: appTheme.greenA700,
onPressed: () {},
label: Text(
'Начать диету',
style: theme.textTheme.titleSmall,
),
),
),
appBar: AppBar(),
body: SingleChildScrollView(
padding: EdgeInsets.only(bottom: 80),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
datum.name,
style: TextStyle(
color: Colors.black,
fontSize: 24,
fontWeight: FontWeight.w500,
height: 1,
),
),
),
SizedBox(height: 12),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row(
children: [
Icon(Icons.timer_outlined),
SizedBox(width: 4),
Text(
datum.duration.toString() + ' дней',
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontWeight: FontWeight.w400,
height: 1,
),
),
],
),
),
SizedBox(height: 12),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
datum.details,
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.2,
),
),
),
SizedBox(height: 12),
CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + datum.image,
),
SizedBox(height: 12),
],
),
),
);
}
}