Added images for profile

This commit is contained in:
2023-12-28 15:25:51 +03:00
parent c4b0061f6d
commit 8641bb1dca
51 changed files with 262 additions and 62 deletions

View File

@@ -5,7 +5,7 @@ import 'package:eatvio_app/presentation/profile/my_profile_screen/models/my_prof
part 'my_profile_event.dart';
part 'my_profile_state.dart';
/// A bloc that manages the state of a K0 according to the event that is dispatched to it.
/// A bloc that manages the state of a MyProfile according to the event that is dispatched to it.
class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
MyProfileBloc(MyProfileState initialState) : super(initialState) {
on<MyProfileInitialEvent>(_onInitialize);

View File

@@ -3,13 +3,13 @@
part of 'my_profile_bloc.dart';
/// Abstract class for all events that can be dispatched from the
///K0 widget.
///MyProfile widget.
///
/// Events must be immutable and implement the [Equatable] interface.
@immutable
abstract class MyProfileEvent extends Equatable {}
/// Event that is dispatched when the K0 widget is first created.
/// Event that is dispatched when the MyProfile widget is first created.
class MyProfileInitialEvent extends MyProfileEvent {
@override
List<Object?> get props => [];

View File

@@ -2,7 +2,7 @@
part of 'my_profile_bloc.dart';
/// Represents the state of K0 in the application.
/// Represents the state of MyProfile in the application.
class MyProfileState extends Equatable {
MyProfileState({this.k0ModelObj});

View File

@@ -5,7 +5,7 @@ import 'package:equatable/equatable.dart';
/// This class defines the variables used in the [k0_page],
/// and is typically used to hold data that is passed between different parts of the application.
class MyProfileModel extends Equatable {
MyProfileModel() {}
MyProfileModel();
MyProfileModel copyWith() {
return MyProfileModel();

View File

@@ -1,11 +1,12 @@
import 'bloc/my_profile_bloc.dart';
import 'models/my_profile_model.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_subtitle.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_title_circleimage.dart';
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_title_circleimage.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_subtitle.dart';
import 'package:flutter/material.dart';
import 'bloc/my_profile_bloc.dart';
class MyProfileScreen extends StatelessWidget {
const MyProfileScreen({Key? key}) : super(key: key);
@@ -13,28 +14,33 @@ class MyProfileScreen extends StatelessWidget {
static Widget builder(BuildContext context) {
return BlocProvider<MyProfileBloc>(
create: (context) =>
MyProfileBloc(MyProfileState())..add(MyProfileInitialEvent()),
MyProfileBloc(MyProfileState(k0ModelObj: MyProfileModel()))
..add(MyProfileInitialEvent()),
child: MyProfileScreen());
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: _buildAppBar(context),
body: Container(
width: double.maxFinite,
padding: EdgeInsets.symmetric(horizontal: 8.h, vertical: 18.v),
child: Column(children: [
_buildMyBlog(context),
SizedBox(height: 15.v),
_buildSettings(context),
SizedBox(height: 30.v),
_buildAreaChart(context),
SizedBox(height: 15.v),
_buildWidget(context),
SizedBox(height: 5.v)
]))));
return BlocBuilder<MyProfileBloc, MyProfileState>(
builder: (context, state) {
return SafeArea(
child: Scaffold(
appBar: _buildAppBar(context),
body: Container(
width: double.maxFinite,
padding:
EdgeInsets.symmetric(horizontal: 8.h, vertical: 18.v),
child: Column(children: [
_buildMyBlog(context),
SizedBox(height: 15.v),
_buildSettings(context),
SizedBox(height: 30.v),
_buildAreaChart(context),
SizedBox(height: 15.v),
_buildWidget(context),
SizedBox(height: 5.v)
]))));
});
}
/// Section Widget
@@ -53,12 +59,12 @@ class MyProfileScreen extends StatelessWidget {
child: Row(children: [
AppbarTitleCircleimage(imagePath: ImageConstant.imgEllipse1),
AppbarSubtitle(
text: "Дмитрий Коваль",
text: "lbl".tr,
margin: EdgeInsets.only(left: 35.h, top: 12.v, bottom: 9.v))
])),
actions: [
AppbarSubtitle(
text: "Выйти",
text: "lbl2".tr,
margin: EdgeInsets.symmetric(horizontal: 16.h, vertical: 17.v))
]);
}
@@ -75,7 +81,7 @@ class MyProfileScreen extends StatelessWidget {
margin: EdgeInsets.symmetric(vertical: 3.v)),
Expanded(
child: CustomOutlinedButton(
text: "Мой блог".toUpperCase(),
text: "lbl3".tr.toUpperCase(),
margin: EdgeInsets.only(left: 10.h)))
]));
}
@@ -92,7 +98,7 @@ class MyProfileScreen extends StatelessWidget {
margin: EdgeInsets.symmetric(vertical: 3.v)),
Expanded(
child: CustomOutlinedButton(
text: "Настройки".toUpperCase(),
text: "lbl4".tr.toUpperCase(),
margin: EdgeInsets.only(left: 10.h)))
]));
}
@@ -107,16 +113,17 @@ class MyProfileScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Вес:", style: CustomTextStyles.titleSmallBluegray800),
Text("lbl5".tr,
style: CustomTextStyles.titleSmallBluegray800),
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
RichText(
text: TextSpan(children: [
TextSpan(
text: "Было:",
text: "lbl6".tr,
style:
CustomTextStyles.bodyMediumBluegray800_1),
TextSpan(
text: " 80",
text: "lbl_802".tr,
style: CustomTextStyles
.titleSmallBluegray800ExtraBold)
]),
@@ -126,11 +133,11 @@ class MyProfileScreen extends StatelessWidget {
child: RichText(
text: TextSpan(children: [
TextSpan(
text: "Стало:",
text: "lbl7".tr,
style: CustomTextStyles
.bodyMediumBluegray800_1),
TextSpan(
text: " 55",
text: "lbl_552".tr,
style: CustomTextStyles
.titleSmallBluegray800ExtraBold)
]),
@@ -144,7 +151,8 @@ class MyProfileScreen extends StatelessWidget {
child: Stack(alignment: Alignment.centerLeft, children: [
Align(
alignment: Alignment.bottomRight,
child: Text("01.04.21", style: theme.textTheme.bodySmall)),
child: Text("lbl_01_04_21".tr,
style: theme.textTheme.bodySmall)),
Align(
alignment: Alignment.centerLeft,
child: Row(
@@ -156,7 +164,9 @@ class MyProfileScreen extends StatelessWidget {
children: [
Row(children: [
_buildLineChart(context,
text100: "100", text50: "50", text0: "0"),
text100: "lbl_100".tr,
text50: "lbl_50".tr,
text0: "lbl_0".tr),
Expanded(
child: Padding(
padding: EdgeInsets.only(
@@ -244,13 +254,13 @@ class MyProfileScreen extends StatelessWidget {
margin:
EdgeInsets.only(left: 8.h, right: 82.h),
child: Row(children: [
Text("01.01.21",
Text("lbl_01_01_21".tr,
style: theme.textTheme.bodySmall),
Spacer(flex: 49),
Text("01.02.21",
Text("lbl_01_02_21".tr,
style: theme.textTheme.bodySmall),
Spacer(flex: 50),
Text("01.03.21",
Text("lbl_01_03_21".tr,
style: theme.textTheme.bodySmall)
]))
])),
@@ -268,16 +278,17 @@ class MyProfileScreen extends StatelessWidget {
padding: EdgeInsets.only(right: 7.h),
child:
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Text("Обхват:", style: CustomTextStyles.titleSmallBluegray800),
Text("lbl8".tr, style: CustomTextStyles.titleSmallBluegray800),
Spacer(),
RichText(
text: TextSpan(children: [
TextSpan(
text: "Грудь:",
text: "lbl9".tr,
style: CustomTextStyles.bodyMediumBluegray800_1),
TextSpan(text: " "),
TextSpan(
text: "90", style: CustomTextStyles.titleSmallRed200)
text: "lbl_902".tr,
style: CustomTextStyles.titleSmallRed200)
]),
textAlign: TextAlign.left),
Padding(
@@ -285,11 +296,11 @@ class MyProfileScreen extends StatelessWidget {
child: RichText(
text: TextSpan(children: [
TextSpan(
text: "Талия:",
text: "lbl10".tr,
style: CustomTextStyles.bodyMediumBluegray800_1),
TextSpan(text: " "),
TextSpan(
text: "60",
text: "lbl_602".tr,
style: CustomTextStyles.titleSmallBlue800)
]),
textAlign: TextAlign.left)),
@@ -298,11 +309,11 @@ class MyProfileScreen extends StatelessWidget {
child: RichText(
text: TextSpan(children: [
TextSpan(
text: "Бедра:",
text: "lbl11".tr,
style: CustomTextStyles.bodyMediumBluegray800_1),
TextSpan(text: " "),
TextSpan(
text: "90",
text: "lbl_902".tr,
style: CustomTextStyles.titleSmallLightgreen300)
]),
textAlign: TextAlign.left))
@@ -313,7 +324,9 @@ class MyProfileScreen extends StatelessWidget {
padding: EdgeInsets.only(right: 15.h),
child: Row(children: [
_buildLineChart(context,
text100: "100", text50: "50", text0: "0"),
text100: "lbl_100".tr,
text50: "lbl_50".tr,
text0: "lbl_0".tr),
Expanded(
child: Padding(
padding:
@@ -620,11 +633,11 @@ class MyProfileScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("01.01.21", style: theme.textTheme.bodySmall),
Text("01.02.21", style: theme.textTheme.bodySmall),
Text("01.03.21", style: theme.textTheme.bodySmall),
Text("01.04.21", style: theme.textTheme.bodySmall),
Text("01.05.21", style: theme.textTheme.bodySmall)
Text("lbl_01_01_21".tr, style: theme.textTheme.bodySmall),
Text("lbl_01_02_21".tr, style: theme.textTheme.bodySmall),
Text("lbl_01_03_21".tr, style: theme.textTheme.bodySmall),
Text("lbl_01_04_21".tr, style: theme.textTheme.bodySmall),
Text("lbl_01_05_21".tr, style: theme.textTheme.bodySmall)
]))
])
]));
@@ -637,7 +650,7 @@ class MyProfileScreen extends StatelessWidget {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Padding(
padding: EdgeInsets.only(left: 15.h),
child: Text("Пройденные планы:",
child: Text("msg".tr,
style: CustomTextStyles.titleSmallBluegray800)),
SizedBox(height: 3.v),
SizedBox(
@@ -667,7 +680,7 @@ class MyProfileScreen extends StatelessWidget {
Padding(
padding: EdgeInsets.only(
left: 38.h, bottom: 1.v),
child: Text("Лёгкий",
child: Text("lbl12".tr,
style: CustomTextStyles
.titleSmallBluegray800Bold)),
Container(
@@ -683,7 +696,7 @@ class MyProfileScreen extends StatelessWidget {
child: Container(
width: 40.h,
margin: EdgeInsets.only(right: 30.h),
child: Text("Готово",
child: Text("lbl13".tr,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleSmall)))
@@ -712,7 +725,7 @@ class MyProfileScreen extends StatelessWidget {
Padding(
padding: EdgeInsets.only(
left: 38.h, top: 1.v),
child: Text("Умеренный",
child: Text("lbl14".tr,
style: CustomTextStyles
.titleSmallBluegray800Bold)),
Container(
@@ -728,7 +741,7 @@ class MyProfileScreen extends StatelessWidget {
child: Container(
width: 40.h,
margin: EdgeInsets.only(right: 30.h),
child: Text("Готово",
child: Text("lbl13".tr,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleSmall)))
@@ -747,7 +760,7 @@ class MyProfileScreen extends StatelessWidget {
Padding(
padding:
EdgeInsets.only(left: 38.h, bottom: 2.v),
child: Text("Полный",
child: Text("lbl15".tr,
style: CustomTextStyles
.titleSmallBluegray800Bold)),
SizedBox(
@@ -769,7 +782,7 @@ class MyProfileScreen extends StatelessWidget {
5.h)))),
Align(
alignment: Alignment.bottomCenter,
child: Text("В процессе",
child: Text("lbl16".tr,
style:
theme.textTheme.titleSmall))
]))
@@ -826,8 +839,8 @@ class MyProfileScreen extends StatelessWidget {
]);
}
/// Navigates back to the previous screen.
/// Navigates to the previous screen.
onTapArrowLeft(BuildContext context) {
Navigator.pop(context);
NavigatorService.goBack();
}
}

View File

@@ -82,7 +82,18 @@ class LanguageSelectScreen extends StatelessWidget {
.add(ChangeDropDownEvent(value: value));
});
}),
Spacer(flex: 63)
Spacer(flex: 63),
NextStepButton(
text: "тест профиля".toUpperCase(),
margin: EdgeInsets.only(
left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: () {
Navigator.pushNamed(
context,
AppRoutes.myProfile,
);
}),
])),
bottomNavigationBar:
BlocBuilder<LanguageSelectBloc, LanguageSelectState>(