forked from eatvio/eatvio_app
feat(diary) Mood list layouts
This commit is contained in:
@@ -15,4 +15,4 @@ class DiaryEditInitialEvent extends DiaryEditEvent {
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class ToggleWakeupExpandedEvent extends DiaryEditEvent {}
|
||||
//class ToggleWakeupExpandedEvent extends DiaryEditEvent {}
|
||||
|
||||
@@ -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<DiaryEditBloc>(context)
|
||||
.add(ToggleWakeupExpandedEvent());
|
||||
/*BlocProvider.of<DiaryEditBloc>(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<String> moodList) {
|
||||
Widget _buildMood(
|
||||
List<String> 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<DiaryEditBloc>(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<void> _selectTime(
|
||||
|
||||
Reference in New Issue
Block a user