forked from eatvio/eatvio_app
72 lines
2.5 KiB
Dart
72 lines
2.5 KiB
Dart
import 'package:eatvio_app/core/locator_service.dart';
|
|
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
|
import 'package:eatvio_app/features/recipes/presentation/bloc/create_recipe_cubit/create_recipe_cubit.dart';
|
|
import 'package:eatvio_app/features/recipes/presentation/widgets/info_about_recipe_widget.dart';
|
|
import 'package:eatvio_app/features/recipes/presentation/widgets/ingredients_widget.dart';
|
|
import 'package:eatvio_app/features/recipes/presentation/widgets/steps_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
class RecipeCreateScreen extends StatefulWidget {
|
|
const RecipeCreateScreen({super.key});
|
|
|
|
@override
|
|
State<RecipeCreateScreen> createState() => _RecipeCreateScreenState();
|
|
}
|
|
|
|
class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider<CreateRecipeCubit>(
|
|
create: (BuildContext context) => sl<CreateRecipeCubit>(),
|
|
child: Scaffold(
|
|
backgroundColor: Color(0xFFF0F2F5),
|
|
appBar: AppBar(
|
|
title: Text('Добавление рецепта'),
|
|
centerTitle: true,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.vertical(
|
|
bottom: Radius.circular(12),
|
|
),
|
|
),
|
|
),
|
|
body: SingleChildScrollView(
|
|
physics: const BouncingScrollPhysics(),
|
|
padding: EdgeInsets.only(top: 8, bottom: 32),
|
|
child: Column(
|
|
spacing: 16,
|
|
children: [
|
|
InfoAboutRecipeWidget(),
|
|
IngredientsWidget(),
|
|
StepsWidget(),
|
|
InkWell(
|
|
onTap: () {},
|
|
borderRadius: BorderRadius.circular(20),
|
|
child: Ink(
|
|
width: MediaQuery.of(context).size.width - 32,
|
|
decoration: BoxDecoration(
|
|
color: appTheme.blueA400,
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
child: Container(
|
|
padding: const EdgeInsets.all(16),
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
'Опубликовать',
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|