feat(profile): create blog post button

This commit is contained in:
mso7nueh
2024-10-18 15:52:21 +03:00
parent 8c1784bea4
commit 8b955bf2bf
5 changed files with 66 additions and 18 deletions

View File

@@ -54,7 +54,7 @@ class _AuthScreenState extends State<AuthScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(s.email),
SizedBox(height: 4),
const SizedBox(height: 4),
BlocSelector<AuthBloc, AuthState, TextEditingController?>(
selector: (state) => state.emailController,
builder: (context, emailController) {
@@ -67,9 +67,9 @@ class _AuthScreenState extends State<AuthScreen> {
);
},
),
SizedBox(height: 16),
const SizedBox(height: 16),
Text(s.password),
SizedBox(height: 4),
const SizedBox(height: 4),
BlocSelector<AuthBloc, AuthState, TextEditingController?>(
selector: (state) => state.passwordController,
builder: (context, passwordController) {
@@ -91,7 +91,7 @@ class _AuthScreenState extends State<AuthScreen> {
);
},
),
SizedBox(height: 16),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -135,7 +135,7 @@ class _AuthScreenState extends State<AuthScreen> {
),
],
),
SizedBox(height: 16),
const SizedBox(height: 16),
BlocBuilder<AuthBloc, AuthState>(
builder: (context, state) {
return Container(

View File

@@ -47,7 +47,7 @@ class DietCreateScreen extends StatelessWidget {
decoration: AppDecoration.fillGray,
child: ListView(
children: [
SizedBox(height: 30),
const SizedBox(height: 30),
Container(
margin: EdgeInsets.only(
left: 16,
@@ -70,17 +70,17 @@ class DietCreateScreen extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 16.0),
const SizedBox(height: 16.0),
TextFormField(
controller: state.name,
decoration: InputDecoration(labelText: 'Заголовок'),
),
SizedBox(height: 16.0),
const SizedBox(height: 16.0),
TextFormField(
controller: state.details,
decoration: InputDecoration(labelText: 'Описание'),
),
SizedBox(height: 16.0),
const SizedBox(height: 16.0),
// Здесь нужно добавить виджет для загрузки картинки
ElevatedButton(
onPressed: () => context.read<DietCreateBloc>().add(CreateDiet()),