forked from eatvio/eatvio_app
feat(diary): Navbar added to diary edit screen
This commit is contained in:
@@ -61,7 +61,7 @@ class ChatSelectScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
_buildUserprofile(context)
|
||||
_buildChatList(context)
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -72,7 +72,7 @@ class ChatSelectScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
_buildUserprofile(BuildContext context) {
|
||||
_buildChatList(BuildContext context) {
|
||||
return BlocSelector<ChatSelectBloc, ChatSelectState, ChatSelectModel?>(
|
||||
selector: (state) => state.chatSelectModelObj,
|
||||
builder: (context, chatSelectModelObj) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
|
||||
import 'package:eatvio_app/widgets/custom_edit_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_scale_element.dart';
|
||||
//import 'package:eatvio_app/widgets/custom_bottom_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_bottom_bar.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
@@ -57,44 +57,73 @@ class DiaryEditScreen extends StatelessWidget {
|
||||
BuildContext context, DiaryEditLoadedState state) {
|
||||
mediaQueryData = MediaQuery.of(context);
|
||||
return RefreshIndicator(
|
||||
onRefresh: refreshPage(context),
|
||||
child: FormBuilder(
|
||||
onRefresh: refreshPage(context),
|
||||
child: Stack(
|
||||
children: [
|
||||
FormBuilder(
|
||||
child: SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 240, 242, 245),
|
||||
resizeToAvoidBottomInset: true,
|
||||
body: SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHeaderRow(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildWakupRetire(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildMeal(context, state),
|
||||
SizedBox(height: 20.v),
|
||||
_buildMood(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildNutritionChart(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildComment(context, state),
|
||||
],
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 240, 242, 245),
|
||||
resizeToAvoidBottomInset: true,
|
||||
body: SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHeaderRow(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildWakupRetire(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildMeal(context, state),
|
||||
SizedBox(height: 20.v),
|
||||
_buildMood(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildNutritionChart(context, state),
|
||||
SizedBox(height: 30.v),
|
||||
_buildComment(context, state),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: _buildBottomBar(context),
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: _buildEndDay(context),
|
||||
),
|
||||
)));
|
||||
Positioned(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 50.v, // Adjusted position to lift the button higher
|
||||
child: _buildEndDay(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_buildEndDay(BuildContext context) {
|
||||
return CustomOutlinedButton(
|
||||
text: "Закончить день",
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 41.v,
|
||||
),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
onPressed: onFinishDayPressed(context),
|
||||
// Установите прозрачный фон
|
||||
);
|
||||
}
|
||||
|
||||
refreshPage(BuildContext context) {
|
||||
@@ -159,6 +188,10 @@ class DiaryEditScreen extends StatelessWidget {
|
||||
};
|
||||
}
|
||||
|
||||
_buildBottomBar(BuildContext context) {
|
||||
return CustomBottomBar(onChanged: (BottomBarEnum type) {});
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
_buildAddProduct(BuildContext context, DiaryEditLoadedState state) {
|
||||
return CustomOutlinedButton(
|
||||
@@ -1082,22 +1115,6 @@ class DiaryEditScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
_buildEndDay(BuildContext context) {
|
||||
return CustomOutlinedButton(
|
||||
text: "Закончить день",
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 41.v,
|
||||
),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
onPressed: onFinishDayPressed(context),
|
||||
// Установите прозрачный фон
|
||||
);
|
||||
}
|
||||
|
||||
Function() onFinishDayPressed(BuildContext context) {
|
||||
return () {
|
||||
|
||||
Reference in New Issue
Block a user