forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -71,9 +71,9 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(12)),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: baseUrl + '/storage/' + widget.recipe.image,
|
||||
imageUrl: '$baseUrl/storage/${widget.recipe.image}',
|
||||
fit: BoxFit.fitWidth,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
),
|
||||
@@ -85,10 +85,10 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
_iconButton('assets/icons/clock.svg', timeTitle),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
_iconButton('assets/icons/steps.svg', '${widget.recipe.steps?.length ?? 0} ${getStepForm(widget.recipe.steps?.length ?? 0)}'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton('assets/icons/calories.svg', widget.recipe.calories.toStringAsFixed(0) + ' ккал'),
|
||||
const SizedBox(width: 8),
|
||||
_iconButton('assets/icons/calories.svg', '${widget.recipe.calories.toStringAsFixed(0)} ккал'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -104,7 +104,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
},
|
||||
color: appTheme.whiteA700,
|
||||
isFavorite: isFavorite,
|
||||
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12)),
|
||||
borderRadius: const BorderRadius.vertical(bottom: Radius.circular(12)),
|
||||
width: 40,
|
||||
height: 44,
|
||||
size: 19,
|
||||
@@ -112,7 +112,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
@@ -121,13 +121,13 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
if (widget.recipe.videoUrl != null && widget.recipe.videoUrl!.isNotEmpty) ...[
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/play_icon.svg', width: 16, height: 16),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
s.there_is_a_video,
|
||||
style: TextStyles.textXSSemibold.copyWith(color: appTheme.black),
|
||||
@@ -136,7 +136,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
if (widget.recipe.description.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -165,7 +165,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
@@ -180,7 +180,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
await context.read<RecipesCubit>().likeRecipe(widget.recipe.slug, widget.index);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
FeedIconButton(
|
||||
icon: Icons.chat_bubble_outline,
|
||||
text: widget.recipe.commentsCount.toString(),
|
||||
@@ -193,7 +193,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
FeedIconButton(
|
||||
svgIcon: SvgPicture.asset(
|
||||
height: 15,
|
||||
@@ -205,19 +205,19 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
final box = context.findRenderObject() as RenderBox?;
|
||||
Share.shareUri(
|
||||
Uri.parse(
|
||||
baseUrl + '/ru/blog_post/' + widget.recipe.id.toString(),
|
||||
'$baseUrl/ru/blog_post/${widget.recipe.id}',
|
||||
),
|
||||
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
||||
);
|
||||
},
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 16,
|
||||
color: appTheme.gray500,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
widget.recipe.viewsCount.toString(),
|
||||
style: TextStyle(
|
||||
@@ -229,7 +229,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -240,7 +240,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
|
||||
_iconButton(String iconPath, [String? text]) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.whiteA700,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@@ -252,11 +252,11 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
SvgPicture.asset(
|
||||
iconPath,
|
||||
),
|
||||
if (text != null) SizedBox(width: 8),
|
||||
if (text != null) const SizedBox(width: 8),
|
||||
if (text != null)
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
Reference in New Issue
Block a user