diff --git a/lib/presentation/diary/diary_edit_screen/bloc/diary_edit_event.dart b/lib/presentation/diary/diary_edit_screen/bloc/diary_edit_event.dart index 6997cf72..183f4500 100644 --- a/lib/presentation/diary/diary_edit_screen/bloc/diary_edit_event.dart +++ b/lib/presentation/diary/diary_edit_screen/bloc/diary_edit_event.dart @@ -15,4 +15,4 @@ class DiaryEditInitialEvent extends DiaryEditEvent { List get props => []; } -class ToggleWakeupExpandedEvent extends DiaryEditEvent {} +//class ToggleWakeupExpandedEvent extends DiaryEditEvent {} diff --git a/lib/presentation/diary/diary_edit_screen/diary_edit_screen.dart b/lib/presentation/diary/diary_edit_screen/diary_edit_screen.dart index aaa3d707..c345b3fa 100644 --- a/lib/presentation/diary/diary_edit_screen/diary_edit_screen.dart +++ b/lib/presentation/diary/diary_edit_screen/diary_edit_screen.dart @@ -94,7 +94,7 @@ class DiaryEditScreen extends StatelessWidget { SizedBox(height: 30.v), _buildImageStack(context), SizedBox(height: 20.v), - _buildMood(moodList), + _buildMood(moodList, context, state), SizedBox(height: 30.v), _buildHeaderColumn(context), SizedBox(height: 30.v), @@ -794,8 +794,8 @@ Widget _buildWakupRetire(BuildContext context, DiaryEditLoadedState state) { children: [ GestureDetector( onTap: () { - BlocProvider.of(context) - .add(ToggleWakeupExpandedEvent()); + /*BlocProvider.of(context) + .add(ToggleWakeupExpandedEvent());*/ }, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -832,7 +832,7 @@ Widget _buildWakupRetire(BuildContext context, DiaryEditLoadedState state) { child: AbsorbPointer( child: TextFormField( decoration: InputDecoration( - labelText: ' сколько вы легли спать?', + labelText: 'Во сколько вы легли спать?', suffixIcon: Icon(Icons.access_time), ), initialValue: state.retireController.toString(), @@ -847,23 +847,44 @@ Widget _buildWakupRetire(BuildContext context, DiaryEditLoadedState state) { ); } -Widget _buildMood(List moodList) { +Widget _buildMood( + List moodList, BuildContext context, DiaryEditLoadedState state) { return Padding( - padding: EdgeInsets.symmetric(horizontal: 16.h), - child: CustomDropDown( - icon: Container( - margin: EdgeInsets.fromLTRB(30.h, 30.v, 20.h, 30.v), - child: CustomImageView( - imagePath: ImageConstant.imgArrowLeft, - height: 10.v, - width: 18.h, + padding: EdgeInsets.symmetric(horizontal: 16.h), + child: Column(children: [ + GestureDetector( + onTap: () { + /*BlocProvider.of(context) + .add(ToggleWakeupExpandedEvent());*/ + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Ваше настроение после приема пищи", + style: CustomTextStyles.bodyMediumBlack900, + ), + Icon(state.wakeupExpanded + ? Icons.arrow_drop_up + : Icons.arrow_drop_down), + ], + ), ), - ), - hintText: "Ваше настроение после приема пищи", - items: moodList, - onChanged: (value) {}, - ), - ); + if (state.wakeupExpanded) + CustomDropDown( + icon: Container( + margin: EdgeInsets.fromLTRB(30.h, 30.v, 20.h, 30.v), + child: CustomImageView( + imagePath: ImageConstant.imgArrowLeft, + height: 10.v, + width: 18.h, + ), + ), + hintText: "Ваше настроение после приема пищи", + items: moodList, + onChanged: (value) {}, + ), + ])); } Future _selectTime(