forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -30,11 +30,11 @@ class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
||||
return BlocProvider<CreateRecipeCubit>(
|
||||
create: (BuildContext context) => sl<CreateRecipeCubit>(),
|
||||
child: Scaffold(
|
||||
backgroundColor: Color(0xFFF0F2F5),
|
||||
backgroundColor: const Color(0xFFF0F2F5),
|
||||
appBar: AppBar(
|
||||
title: Text('Добавление рецепта'),
|
||||
title: const Text('Добавление рецепта'),
|
||||
centerTitle: true,
|
||||
shape: RoundedRectangleBorder(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
bottom: Radius.circular(12),
|
||||
),
|
||||
@@ -42,13 +42,13 @@ class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.only(top: 8, bottom: 32),
|
||||
padding: const EdgeInsets.only(top: 8, bottom: 32),
|
||||
child: Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
InfoAboutRecipeWidget(),
|
||||
IngredientsWidget(),
|
||||
StepsWidget(),
|
||||
const InfoAboutRecipeWidget(),
|
||||
const IngredientsWidget(),
|
||||
const StepsWidget(),
|
||||
BlocBuilder<CreateRecipeCubit, CreateRecipeState>(
|
||||
builder: (context, state) {
|
||||
return Builder(
|
||||
@@ -58,7 +58,8 @@ class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
||||
if (context.read<CreateRecipeCubit>().validateAll()) {
|
||||
final isSuccess = await context.read<CreateRecipeCubit>().publishRecipe();
|
||||
if (isSuccess) {
|
||||
Future.delayed(Duration(milliseconds: 500), () {
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
if (!context.mounted) return;
|
||||
context.pop();
|
||||
showBottomSheetWithBlur(
|
||||
userRootNavigator: true,
|
||||
@@ -69,6 +70,7 @@ class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
||||
);
|
||||
});
|
||||
} else {
|
||||
if (!context.mounted) return;
|
||||
showErrorDialog(context, title: '${s.could_not_publish_recipe} ${state.entity.title}');
|
||||
}
|
||||
}
|
||||
@@ -83,7 +85,7 @@ class _RecipeCreateScreenState extends State<RecipeCreateScreen> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
'Опубликовать',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
|
||||
Reference in New Issue
Block a user