Created a new Profile section, added new styles, made some layouts for user profile screen
This commit is contained in:
@@ -13,4 +13,103 @@ class ImageConstant {
|
||||
static String imgFavorite = '$imagePath/img_favorite.svg';
|
||||
|
||||
static String imageNotFound = 'assets/images/image_not_found.png';
|
||||
|
||||
// Настройки images
|
||||
|
||||
static String imgClose = '$imagePath/img_close.svg';
|
||||
|
||||
static String imgOverflowmenu = '$imagePath/img_overflowmenu.svg';
|
||||
|
||||
// Блог images
|
||||
static String imgRectangle14 = '$imagePath/img_rectangle_14.png';
|
||||
|
||||
static String imgRectangle14220x341 =
|
||||
'$imagePath/img_rectangle_14_220x341.png';
|
||||
|
||||
// Блог - Tab Container images
|
||||
static String imgCrop = '$imagePath/img_crop.svg';
|
||||
|
||||
// Статья images
|
||||
static String imgRectangle14220x375 =
|
||||
'$imagePath/img_rectangle_14_220x375.png';
|
||||
|
||||
static String imgVector = '$imagePath/img_vector.svg';
|
||||
|
||||
static String imgEllipse132x32 = '$imagePath/img_ellipse_1_32x32.png';
|
||||
|
||||
static String imgLike6 = '$imagePath/img_like_6.svg';
|
||||
|
||||
static String imgLike5 = '$imagePath/img_like_5.svg';
|
||||
|
||||
static String imgEllipse11 = '$imagePath/img_ellipse_1_1.png';
|
||||
|
||||
static String imgCloseBlueGray900 = '$imagePath/img_close_blue_gray_900.svg';
|
||||
|
||||
static String imgSend1 = '$imagePath/img_send_1.svg';
|
||||
|
||||
// Личный кабинет One images
|
||||
static String imgEdit = '$imagePath/img_edit.svg';
|
||||
|
||||
static String imgStatistic = '$imagePath/img_statistic.svg';
|
||||
|
||||
static String imgStatisticGray200 = '$imagePath/img_statistic_gray_200.svg';
|
||||
|
||||
// Личный кабинет Two images
|
||||
static String imgMegaphone = '$imagePath/img_megaphone.svg';
|
||||
|
||||
// Common images
|
||||
|
||||
static String imgEllipse1 = '$imagePath/img_ellipse_1.png';
|
||||
|
||||
static String imgGrid = '$imagePath/img_grid.svg';
|
||||
|
||||
static String imgSearch = '$imagePath/img_search.svg';
|
||||
|
||||
static String imgArea1 = '$imagePath/img_area_1.svg';
|
||||
|
||||
static String imgLine1 = '$imagePath/img_line_1.svg';
|
||||
|
||||
static String imgLine2 = '$imagePath/img_line_2.svg';
|
||||
|
||||
static String imgLine3 = '$imagePath/img_line_3.svg';
|
||||
|
||||
static String imgEllipse125x25 = '$imagePath/img_ellipse_1_25x25.png';
|
||||
|
||||
static String imgEllipse2 = '$imagePath/img_ellipse_2.png';
|
||||
|
||||
static String imgEllipse3 = '$imagePath/img_ellipse_3.png';
|
||||
|
||||
static String imgNav = '$imagePath/img_nav.svg';
|
||||
|
||||
static String imgNavBlueGray400 = '$imagePath/img_nav_blue_gray_400.svg';
|
||||
|
||||
static String imgNavBlueGray40024x23 =
|
||||
'$imagePath/img_nav_blue_gray_400_24x23.svg';
|
||||
|
||||
static String imgNavPrimary = '$imagePath/img_nav_primary.svg';
|
||||
|
||||
static String imgNavBlueGray40024x25 =
|
||||
'$imagePath/img_nav_blue_gray_400_24x25.svg';
|
||||
|
||||
static String imgEye = '$imagePath/img_eye.svg';
|
||||
|
||||
static String imgFavoriteWhiteA700 = '$imagePath/img_favorite_white_a700.svg';
|
||||
|
||||
static String imgEllipse134x34 = '$imagePath/img_ellipse_1_34x34.png';
|
||||
|
||||
static String img = '$imagePath/img_.png';
|
||||
|
||||
static String imgEllipse142x42 = '$imagePath/img_ellipse_1_42x42.png';
|
||||
|
||||
static String imgIconMoreHorizontal =
|
||||
'$imagePath/img_icon_more_horizontal.svg';
|
||||
|
||||
static String imgRectangle14250x311 =
|
||||
'$imagePath/img_rectangle_14_250x311.png';
|
||||
|
||||
static String imgIconMessageSquare = '$imagePath/img_icon_message_square.svg';
|
||||
|
||||
static String imgIconHeart = '$imagePath/img_icon_heart.svg';
|
||||
|
||||
static String imgIconShare2 = '$imagePath/img_icon_share_2.svg';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/models/my_profile_model.dart';
|
||||
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.
|
||||
class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
MyProfileBloc(MyProfileState initialState) : super(initialState) {
|
||||
on<MyProfileInitialEvent>(_onInitialize);
|
||||
}
|
||||
|
||||
_onInitialize(
|
||||
MyProfileInitialEvent event,
|
||||
Emitter<MyProfileState> emit,
|
||||
) async {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'my_profile_bloc.dart';
|
||||
|
||||
/// Abstract class for all events that can be dispatched from the
|
||||
///K0 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.
|
||||
class MyProfileInitialEvent extends MyProfileEvent {
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'my_profile_bloc.dart';
|
||||
|
||||
/// Represents the state of K0 in the application.
|
||||
class MyProfileState extends Equatable {
|
||||
MyProfileState({this.k0ModelObj});
|
||||
|
||||
MyProfileModel? k0ModelObj;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
k0ModelObj,
|
||||
];
|
||||
MyProfileState copyWith({MyProfileModel? k0ModelObj}) {
|
||||
return MyProfileState(
|
||||
k0ModelObj: k0ModelObj ?? this.k0ModelObj,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
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 copyWith() {
|
||||
return MyProfileModel();
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
@@ -0,0 +1,833 @@
|
||||
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/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);
|
||||
|
||||
static Widget builder(BuildContext context) {
|
||||
return BlocProvider<MyProfileBloc>(
|
||||
create: (context) =>
|
||||
MyProfileBloc(MyProfileState())..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)
|
||||
]))));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
PreferredSizeWidget _buildAppBar(BuildContext context) {
|
||||
return CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 15.h, top: 13.v, bottom: 14.v),
|
||||
onTap: () {
|
||||
onTapArrowLeft(context);
|
||||
}),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
child: Row(children: [
|
||||
AppbarTitleCircleimage(imagePath: ImageConstant.imgEllipse1),
|
||||
AppbarSubtitle(
|
||||
text: "Дмитрий Коваль",
|
||||
margin: EdgeInsets.only(left: 35.h, top: 12.v, bottom: 9.v))
|
||||
])),
|
||||
actions: [
|
||||
AppbarSubtitle(
|
||||
text: "Выйти",
|
||||
margin: EdgeInsets.symmetric(horizontal: 16.h, vertical: 17.v))
|
||||
]);
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildMyBlog(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 7.h),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgGrid,
|
||||
height: 24.adaptSize,
|
||||
width: 24.adaptSize,
|
||||
margin: EdgeInsets.symmetric(vertical: 3.v)),
|
||||
Expanded(
|
||||
child: CustomOutlinedButton(
|
||||
text: "Мой блог".toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 10.h)))
|
||||
]));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildSettings(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 7.h),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgSearch,
|
||||
height: 24.adaptSize,
|
||||
width: 24.adaptSize,
|
||||
margin: EdgeInsets.symmetric(vertical: 3.v)),
|
||||
Expanded(
|
||||
child: CustomOutlinedButton(
|
||||
text: "Настройки".toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 10.h)))
|
||||
]));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildAreaChart(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
child: Column(children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 7.h),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Вес:", style: CustomTextStyles.titleSmallBluegray800),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "Было:",
|
||||
style:
|
||||
CustomTextStyles.bodyMediumBluegray800_1),
|
||||
TextSpan(
|
||||
text: " 80",
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800ExtraBold)
|
||||
]),
|
||||
textAlign: TextAlign.left),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "Стало:",
|
||||
style: CustomTextStyles
|
||||
.bodyMediumBluegray800_1),
|
||||
TextSpan(
|
||||
text: " 55",
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800ExtraBold)
|
||||
]),
|
||||
textAlign: TextAlign.left))
|
||||
])
|
||||
])),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(
|
||||
height: 139.v,
|
||||
width: 350.h,
|
||||
child: Stack(alignment: Alignment.centerLeft, children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Text("01.04.21", style: theme.textTheme.bodySmall)),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(children: [
|
||||
_buildLineChart(context,
|
||||
text100: "100", text50: "50", text0: "0"),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 10.h,
|
||||
top: 6.v,
|
||||
bottom: 4.v),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 112.v,
|
||||
width: 304.h,
|
||||
child: Stack(
|
||||
alignment:
|
||||
Alignment.centerLeft,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment
|
||||
.centerLeft,
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child:
|
||||
VerticalDivider(
|
||||
width:
|
||||
1.h,
|
||||
thickness:
|
||||
1.v))),
|
||||
Align(
|
||||
alignment: Alignment
|
||||
.centerLeft,
|
||||
child: Padding(
|
||||
padding: EdgeInsets
|
||||
.only(
|
||||
left: 101
|
||||
.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width:
|
||||
1.h,
|
||||
thickness:
|
||||
1.v)))),
|
||||
Align(
|
||||
alignment: Alignment
|
||||
.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets
|
||||
.only(
|
||||
right: 100
|
||||
.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width:
|
||||
1.h,
|
||||
thickness:
|
||||
1.v)))),
|
||||
Align(
|
||||
alignment:
|
||||
Alignment.center,
|
||||
child: SizedBox(
|
||||
width: 304.h,
|
||||
child:
|
||||
Divider())),
|
||||
Align(
|
||||
alignment: Alignment
|
||||
.topCenter,
|
||||
child: SizedBox(
|
||||
width: 304.h,
|
||||
child:
|
||||
Divider())),
|
||||
CustomImageView(
|
||||
imagePath:
|
||||
ImageConstant
|
||||
.imgArea1,
|
||||
height: 88.v,
|
||||
width: 304.h,
|
||||
alignment: Alignment
|
||||
.bottomCenter)
|
||||
])),
|
||||
Divider()
|
||||
])))
|
||||
]),
|
||||
SizedBox(height: 3.v),
|
||||
Container(
|
||||
width: 240.h,
|
||||
margin:
|
||||
EdgeInsets.only(left: 8.h, right: 82.h),
|
||||
child: Row(children: [
|
||||
Text("01.01.21",
|
||||
style: theme.textTheme.bodySmall),
|
||||
Spacer(flex: 49),
|
||||
Text("01.02.21",
|
||||
style: theme.textTheme.bodySmall),
|
||||
Spacer(flex: 50),
|
||||
Text("01.03.21",
|
||||
style: theme.textTheme.bodySmall)
|
||||
]))
|
||||
])),
|
||||
SizedBox(
|
||||
height: 138.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h,
|
||||
thickness: 1.v,
|
||||
indent: 6.h,
|
||||
endIndent: 20.h))
|
||||
]))
|
||||
])),
|
||||
SizedBox(height: 14.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 7.h),
|
||||
child:
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Text("Обхват:", style: CustomTextStyles.titleSmallBluegray800),
|
||||
Spacer(),
|
||||
RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "Грудь:",
|
||||
style: CustomTextStyles.bodyMediumBluegray800_1),
|
||||
TextSpan(text: " "),
|
||||
TextSpan(
|
||||
text: "90", style: CustomTextStyles.titleSmallRed200)
|
||||
]),
|
||||
textAlign: TextAlign.left),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "Талия:",
|
||||
style: CustomTextStyles.bodyMediumBluegray800_1),
|
||||
TextSpan(text: " "),
|
||||
TextSpan(
|
||||
text: "60",
|
||||
style: CustomTextStyles.titleSmallBlue800)
|
||||
]),
|
||||
textAlign: TextAlign.left)),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 16.h),
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "Бедра:",
|
||||
style: CustomTextStyles.bodyMediumBluegray800_1),
|
||||
TextSpan(text: " "),
|
||||
TextSpan(
|
||||
text: "90",
|
||||
style: CustomTextStyles.titleSmallLightgreen300)
|
||||
]),
|
||||
textAlign: TextAlign.left))
|
||||
])),
|
||||
SizedBox(height: 6.v),
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 15.h),
|
||||
child: Row(children: [
|
||||
_buildLineChart(context,
|
||||
text100: "100", text50: "50", text0: "0"),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 6.h, top: 6.v, bottom: 4.v),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 112.v,
|
||||
width: 312.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.centerLeft,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 4.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h,
|
||||
thickness: 1.v)))),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 80.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h,
|
||||
thickness: 1.v)))),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h, thickness: 1.v))),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.only(right: 79.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h,
|
||||
thickness: 1.v)))),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.only(right: 2.h),
|
||||
child: SizedBox(
|
||||
height: 112.v,
|
||||
child: VerticalDivider(
|
||||
width: 1.h,
|
||||
thickness: 1.v)))),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
width: 304.h, child: Divider())),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
width: 304.h, child: Divider())),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 36.v,
|
||||
width: 304.h,
|
||||
margin:
|
||||
EdgeInsets.only(top: 30.v),
|
||||
child: Stack(
|
||||
alignment: Alignment.topLeft,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant
|
||||
.imgLine1,
|
||||
height: 36.v,
|
||||
width: 304.h,
|
||||
alignment:
|
||||
Alignment.center),
|
||||
Align(
|
||||
alignment:
|
||||
Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(
|
||||
left: 72.h,
|
||||
top: 5.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme
|
||||
.red200,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
4.h))))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.teal100,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 26.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.red200,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin: EdgeInsets.only(
|
||||
right: 76.h, bottom: 41.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.red200,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.teal100,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 28.v,
|
||||
width: 304.h,
|
||||
margin:
|
||||
EdgeInsets.only(top: 29.v),
|
||||
child: Stack(
|
||||
alignment: Alignment.topLeft,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant
|
||||
.imgLine2,
|
||||
height: 28.v,
|
||||
width: 304.h,
|
||||
alignment:
|
||||
Alignment.center),
|
||||
Align(
|
||||
alignment:
|
||||
Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(
|
||||
left: 72.h,
|
||||
top: 9.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme
|
||||
.blue800,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
4.h))))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blue800,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 25.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blue800,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(right: 76.h),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blue800,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blue800,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgLine3,
|
||||
height: 12.v,
|
||||
width: 304.h,
|
||||
alignment: Alignment.center),
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.lightGreen300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin: EdgeInsets.only(
|
||||
left: 76.h, top: 47.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.lightGreen300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 47.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.lightGreen300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin: EdgeInsets.only(
|
||||
right: 76.h, bottom: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.lightGreen300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h)))),
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
height: 8.adaptSize,
|
||||
width: 8.adaptSize,
|
||||
margin:
|
||||
EdgeInsets.only(top: 46.v),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.lightGreen300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.h))))
|
||||
])),
|
||||
Divider(indent: 4.h, endIndent: 4.h)
|
||||
])))
|
||||
])),
|
||||
SizedBox(height: 3.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 8.h),
|
||||
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)
|
||||
]))
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildWidget(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: Text("Пройденные планы:",
|
||||
style: CustomTextStyles.titleSmallBluegray800)),
|
||||
SizedBox(height: 3.v),
|
||||
SizedBox(
|
||||
height: 95.v,
|
||||
width: 343.h,
|
||||
child: Stack(alignment: Alignment.bottomCenter, children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
child:
|
||||
Stack(alignment: Alignment.bottomRight, children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 11.v),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 6.h, vertical: 4.v),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius:
|
||||
BorderRadiusStyle.roundedBorder5),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 38.h, bottom: 1.v),
|
||||
child: Text("Лёгкий",
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
Container(
|
||||
height: 19.v,
|
||||
width: 82.h,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.greenA700,
|
||||
borderRadius:
|
||||
BorderRadius.circular(5.h)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 40.h,
|
||||
margin: EdgeInsets.only(right: 30.h),
|
||||
child: Text("Готово",
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
margin: EdgeInsets.only(bottom: 21.v),
|
||||
child:
|
||||
Stack(alignment: Alignment.bottomRight, children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 11.v),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 6.h, vertical: 4.v),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius:
|
||||
BorderRadiusStyle.roundedBorder5),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 38.h, top: 1.v),
|
||||
child: Text("Умеренный",
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
Container(
|
||||
height: 19.v,
|
||||
width: 82.h,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.greenA700,
|
||||
borderRadius:
|
||||
BorderRadius.circular(5.h)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 40.h,
|
||||
margin: EdgeInsets.only(right: 30.h),
|
||||
child: Text("Готово",
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 66.v),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 6.h, vertical: 4.v),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 38.h, bottom: 2.v),
|
||||
child: Text("Полный",
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
SizedBox(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
appTheme.deepOrange900,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5.h)))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Text("В процессе",
|
||||
style:
|
||||
theme.textTheme.titleSmall))
|
||||
]))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 5.h, vertical: 2.v),
|
||||
decoration: AppDecoration.outlineBlueGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse125x25,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h)),
|
||||
SizedBox(height: 8.v),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse2,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h)),
|
||||
SizedBox(height: 8.v),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse3,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h))
|
||||
])))
|
||||
]))
|
||||
]));
|
||||
}
|
||||
|
||||
/// Common widget
|
||||
Widget _buildLineChart(
|
||||
BuildContext context, {
|
||||
required String text100,
|
||||
required String text50,
|
||||
required String text0,
|
||||
}) {
|
||||
return Column(crossAxisAlignment: CrossAxisAlignment.end, children: [
|
||||
Text(text100,
|
||||
style: theme.textTheme.bodySmall!.copyWith(color: appTheme.gray500)),
|
||||
SizedBox(height: 44.v),
|
||||
Text(text50,
|
||||
style: theme.textTheme.bodySmall!.copyWith(color: appTheme.gray500)),
|
||||
SizedBox(height: 44.v),
|
||||
Text(text0,
|
||||
style: theme.textTheme.bodySmall!.copyWith(color: appTheme.gray500))
|
||||
]);
|
||||
}
|
||||
|
||||
/// Navigates back to the previous screen.
|
||||
onTapArrowLeft(BuildContext context) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/additional_information_screen/models/additional_information_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/additional_information_screen/models/additional_information_model.dart';
|
||||
part 'additional_information_event.dart';
|
||||
part 'additional_information_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/allergies_screen/models/allergies_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/allergies_screen/models/allergies_model.dart';
|
||||
part 'allergies_event.dart';
|
||||
part 'allergies_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/app_navigation_screen/models/app_navigation_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/app_navigation_screen/models/app_navigation_model.dart';
|
||||
part 'app_navigation_event.dart';
|
||||
part 'app_navigation_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/blood_pressure_screen/models/blood_pressure_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart';
|
||||
part 'blood_pressure_event.dart';
|
||||
part 'blood_pressure_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/body_circumferences_screen/models/body_circumferences_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart';
|
||||
part 'body_circumferences_event.dart';
|
||||
part 'body_circumferences_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/city_of_living_screen/models/city_of_living_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/city_of_living_screen/models/city_of_living_model.dart';
|
||||
part 'city_of_living_event.dart';
|
||||
part 'city_of_living_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/credentials_screen/models/credentials_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/credentials_screen/models/credentials_model.dart';
|
||||
part 'credentials_event.dart';
|
||||
part 'credentials_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/date_of_birth_screen/models/date_of_birth_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart';
|
||||
part 'date_of_birth_event.dart';
|
||||
part 'date_of_birth_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/favorite_foods_screen/models/favorite_foods_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart';
|
||||
part 'favorite_foods_event.dart';
|
||||
part 'favorite_foods_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/favorite_sports_screen/models/favorite_sports_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart';
|
||||
part 'favorite_sports_event.dart';
|
||||
part 'favorite_sports_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/gender_screen/models/gender_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/gender_screen/models/gender_model.dart';
|
||||
part 'gender_event.dart';
|
||||
part 'gender_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/height_screen/models/height_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/height_screen/models/height_model.dart';
|
||||
part 'height_event.dart';
|
||||
part 'height_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/language_select_screen/models/language_select_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/language_select_screen/models/language_select_model.dart';
|
||||
part 'language_select_event.dart';
|
||||
part 'language_select_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/medicine_intake_screen/models/medicine_intake_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart';
|
||||
part 'medicine_intake_event.dart';
|
||||
part 'medicine_intake_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/name_screen/models/name_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/name_screen/models/name_model.dart';
|
||||
part 'name_event.dart';
|
||||
part 'name_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/splash_screen/models/splash_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/splash_screen/models/splash_model.dart';
|
||||
part 'splash_event.dart';
|
||||
part 'splash_state.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/weight_screen/models/weight_model.dart';
|
||||
import 'package:eatvio_app/presentation/registration/weight_screen/models/weight_model.dart';
|
||||
part 'weight_event.dart';
|
||||
part 'weight_state.dart';
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:eatvio_app/presentation/date_of_birth_screen/date_of_birth_screen.dart';
|
||||
import 'package:eatvio_app/presentation/city_of_living_screen/city_of_living_screen.dart';
|
||||
import 'package:eatvio_app/presentation/body_circumferences_screen/body_circumferences_screen.dart';
|
||||
import 'package:eatvio_app/presentation/weight_screen/weight_screen.dart';
|
||||
import 'package:eatvio_app/presentation/allergies_screen/allergies_screen.dart';
|
||||
import 'package:eatvio_app/presentation/medicine_intake_screen/medicine_intake_screen.dart';
|
||||
import 'package:eatvio_app/presentation/splash_screen/splash_screen.dart';
|
||||
import 'package:eatvio_app/presentation/gender_screen/gender_screen.dart';
|
||||
import 'package:eatvio_app/presentation/blood_pressure_screen/blood_pressure_screen.dart';
|
||||
import 'package:eatvio_app/presentation/favorite_sports_screen/favorite_sports_screen.dart';
|
||||
import 'package:eatvio_app/presentation/favorite_foods_screen/favorite_foods_screen.dart';
|
||||
import 'package:eatvio_app/presentation/additional_information_screen/additional_information_screen.dart';
|
||||
import 'package:eatvio_app/presentation/language_select_screen/language_select_screen.dart';
|
||||
import 'package:eatvio_app/presentation/height_screen/height_screen.dart';
|
||||
import 'package:eatvio_app/presentation/credentials_screen/credentials_screen.dart';
|
||||
import 'package:eatvio_app/presentation/name_screen/name_screen.dart';
|
||||
import 'package:eatvio_app/presentation/app_navigation_screen/app_navigation_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/city_of_living_screen/city_of_living_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/body_circumferences_screen/body_circumferences_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/weight_screen/weight_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/allergies_screen/allergies_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/medicine_intake_screen/medicine_intake_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/splash_screen/splash_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/gender_screen/gender_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/blood_pressure_screen/blood_pressure_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/favorite_sports_screen/favorite_sports_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/favorite_foods_screen/favorite_foods_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/additional_information_screen/additional_information_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/language_select_screen/language_select_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/height_screen/height_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/credentials_screen/credentials_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/name_screen/name_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/app_navigation_screen/app_navigation_screen.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_profile_screen.dart';
|
||||
|
||||
class AppRoutes {
|
||||
// REGISTRATION
|
||||
@@ -59,6 +60,9 @@ class AppRoutes {
|
||||
|
||||
static const String initialRoute = '/initialRoute';
|
||||
|
||||
//PROFILE
|
||||
static const String myProfile = '/myProfile';
|
||||
|
||||
static Map<String, WidgetBuilder> get routes => {
|
||||
dateOfBirthScreen: DateOfBirthScreen.builder,
|
||||
cityOfLivingScreen: CityOfLivingScreen.builder,
|
||||
@@ -77,6 +81,7 @@ class AppRoutes {
|
||||
additionalInformationScreen: AdditionalInformationScreen.builder,
|
||||
languageSelectScreen: LanguageSelectScreen.builder,
|
||||
appNavigationScreen: AppNavigationScreen.builder,
|
||||
initialRoute: SplashScreen.builder
|
||||
initialRoute: SplashScreen.builder,
|
||||
myProfile: MyProfileScreen.builder,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,6 +22,34 @@ class AppDecoration {
|
||||
width: 1.h,
|
||||
),
|
||||
);
|
||||
static BoxDecoration get fillDeepOrange => BoxDecoration(
|
||||
color: appTheme.deepOrange900.withOpacity(0.8),
|
||||
);
|
||||
static BoxDecoration get fillGray => BoxDecoration(
|
||||
color: appTheme.gray50,
|
||||
);
|
||||
static BoxDecoration get fillGray100 => BoxDecoration(
|
||||
color: appTheme.gray100,
|
||||
);
|
||||
static BoxDecoration get fillGray60002 => BoxDecoration(
|
||||
color: appTheme.gray60002,
|
||||
);
|
||||
static BoxDecoration get fillGreenA => BoxDecoration(
|
||||
color: appTheme.greenA700.withOpacity(0.8),
|
||||
);
|
||||
static BoxDecoration get fillPrimary => BoxDecoration(
|
||||
color: theme.colorScheme.primary,
|
||||
);
|
||||
static BoxDecoration get fillWhiteA => BoxDecoration(
|
||||
color: appTheme.whiteA700,
|
||||
);
|
||||
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
||||
border: Border.all(
|
||||
color: appTheme.blueGray800,
|
||||
width: 1.h,
|
||||
strokeAlign: strokeAlignOutside,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class BorderRadiusStyle {
|
||||
@@ -34,6 +62,62 @@ class BorderRadiusStyle {
|
||||
static BorderRadius get roundedBorder1 => BorderRadius.circular(
|
||||
1.h,
|
||||
);
|
||||
|
||||
// Outline decorations
|
||||
static BoxDecoration get outlineBlack => BoxDecoration(
|
||||
color: appTheme.whiteA700,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: appTheme.black900.withOpacity(0.15),
|
||||
spreadRadius: 2.h,
|
||||
blurRadius: 2.h,
|
||||
offset: Offset(
|
||||
0,
|
||||
2,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
||||
border: Border.all(
|
||||
color: appTheme.blueGray800,
|
||||
width: 1.h,
|
||||
strokeAlign: strokeAlignOutside,
|
||||
),
|
||||
);
|
||||
// Circle borders
|
||||
static BorderRadius get circleBorder17 => BorderRadius.circular(
|
||||
17.h,
|
||||
);
|
||||
static BorderRadius get circleBorder20 => BorderRadius.circular(
|
||||
20.h,
|
||||
);
|
||||
static BorderRadius get circleBorder62 => BorderRadius.circular(
|
||||
62.h,
|
||||
);
|
||||
|
||||
// Custom borders
|
||||
static BorderRadius get customBorderBL8 => BorderRadius.only(
|
||||
bottomLeft: Radius.circular(8.h),
|
||||
);
|
||||
static BorderRadius get customBorderTL5 => BorderRadius.vertical(
|
||||
top: Radius.circular(5.h),
|
||||
);
|
||||
static BorderRadius get customBorderTL51 => BorderRadius.only(
|
||||
topLeft: Radius.circular(5.h),
|
||||
bottomRight: Radius.circular(5.h),
|
||||
);
|
||||
|
||||
// Rounded borders
|
||||
static BorderRadius get roundedBorder12 => BorderRadius.circular(
|
||||
12.h,
|
||||
);
|
||||
static BorderRadius get roundedBorder5 => BorderRadius.circular(
|
||||
5.h,
|
||||
);
|
||||
static BorderRadius get roundedBorder8 => BorderRadius.circular(
|
||||
8.h,
|
||||
);
|
||||
}
|
||||
|
||||
// Comment/Uncomment the below code based on your Flutter SDK version.
|
||||
|
||||
@@ -13,6 +13,138 @@ class CustomTextStyles {
|
||||
theme.textTheme.titleMedium!.segoeUI.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
static get bodyMediumBlack900 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.black900,
|
||||
);
|
||||
static get bodyMediumBlack90013 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 13.fSize,
|
||||
);
|
||||
static get bodyMediumBluegray800 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
);
|
||||
static get bodyMediumBluegray800_1 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
);
|
||||
static get bodyMediumBluegray800_2 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
);
|
||||
static get bodyMediumWhiteA700 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.whiteA700,
|
||||
);
|
||||
static get bodySmallMulishBlack900 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallMulishBluegray800 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallMulishBluegray80012 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallMulishBluegray80012_1 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallMulishBluegray900 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray900,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallMulishGray600 =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.gray600,
|
||||
);
|
||||
static get bodySmallMulishPrimary =>
|
||||
theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: theme.colorScheme.primary,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
static get bodySmallSegoeUIBlack900 =>
|
||||
theme.textTheme.bodySmall!.segoeUI.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 12.fSize,
|
||||
);
|
||||
// Label text style
|
||||
static get labelLargeGray60003 => theme.textTheme.labelLarge!.copyWith(
|
||||
color: appTheme.gray60003,
|
||||
);
|
||||
static get labelLargeWhiteA700 => theme.textTheme.labelLarge!.copyWith(
|
||||
color: appTheme.whiteA700,
|
||||
);
|
||||
// Title text style
|
||||
static get titleMedium16 => theme.textTheme.titleMedium!.copyWith(
|
||||
fontSize: 16.fSize,
|
||||
);
|
||||
static get titleMediumBlack => theme.textTheme.titleMedium!.copyWith(
|
||||
fontSize: 17.fSize,
|
||||
fontWeight: FontWeight.w900,
|
||||
);
|
||||
static get titleMediumBlack900 => theme.textTheme.titleMedium!.copyWith(
|
||||
color: appTheme.black900,
|
||||
);
|
||||
static get titleMediumSemiBold => theme.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
static get titleMediumWhiteA700 => theme.textTheme.titleMedium!.copyWith(
|
||||
color: appTheme.whiteA700,
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
static get titleSmallBlue800 => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.blue800,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallBluegray800 => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
);
|
||||
static get titleSmallBluegray800Bold => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontWeight: FontWeight.w700,
|
||||
);
|
||||
static get titleSmallBluegray800ExtraBold =>
|
||||
theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallBold => theme.textTheme.titleSmall!.copyWith(
|
||||
fontSize: 15.fSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
);
|
||||
static get titleSmallGreenA70001 => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.greenA70001,
|
||||
);
|
||||
static get titleSmallGreenA70001ExtraBold =>
|
||||
theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.greenA70001,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallLightgreen300 => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.lightGreen300,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallRed200 => theme.textTheme.titleSmall!.copyWith(
|
||||
color: appTheme.red200,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallSecondaryContainer =>
|
||||
theme.textTheme.titleSmall!.copyWith(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
fontWeight: FontWeight.w800,
|
||||
);
|
||||
static get titleSmallSecondaryContainer_1 =>
|
||||
theme.textTheme.titleSmall!.copyWith(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
);
|
||||
static get titleSmallSegoeUIOnPrimary =>
|
||||
theme.textTheme.titleSmall!.segoeUI.copyWith(
|
||||
color: theme.colorScheme.onPrimary,
|
||||
);
|
||||
}
|
||||
|
||||
extension on TextStyle {
|
||||
|
||||
@@ -98,6 +98,24 @@ class TextThemes {
|
||||
fontFamily: 'Mulish',
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
color: appTheme.blueGray400,
|
||||
fontSize: 14.fSize,
|
||||
fontFamily: 'Mulish',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
color: appTheme.gray500,
|
||||
fontSize: 10.fSize,
|
||||
fontFamily: 'Roboto',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
labelLarge: TextStyle(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
fontFamily: 'Mulish',
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -121,6 +139,48 @@ class PrimaryColors {
|
||||
|
||||
// BlueGray
|
||||
Color get blueGray400 => Color(0XFF7B8794);
|
||||
Color get black900 => Color(0XFF000000);
|
||||
|
||||
// Blue
|
||||
Color get blue800 => Color(0XFF1F78B4);
|
||||
|
||||
// BlueGray
|
||||
Color get blueGray300 => Color(0XFF9AA5B1);
|
||||
Color get blueGray800 => Color(0XFF323F4B);
|
||||
Color get blueGray900 => Color(0XFF2A2F4C);
|
||||
|
||||
// DeepOrange
|
||||
Color get deepOrange900 => Color(0XFF9A4A00);
|
||||
|
||||
// Gray
|
||||
Color get gray100 => Color(0XFFF0F2F5);
|
||||
Color get gray200 => Color(0XFFF0F0F0);
|
||||
Color get gray400 => Color(0XFFC1C1C1);
|
||||
Color get gray40001 => Color(0XFFC8C8C8);
|
||||
Color get gray50 => Color(0XFFF6FAFF);
|
||||
Color get gray500 => Color(0XFFA3A3A3);
|
||||
Color get gray600 => Color(0XFF6D6D6D);
|
||||
Color get gray60001 => Color(0XFF848484);
|
||||
Color get gray60002 => Color(0XFF757575);
|
||||
Color get gray60003 => Color(0XFF707070);
|
||||
|
||||
// Green
|
||||
Color get greenA700 => Color(0XFF019A3E);
|
||||
Color get greenA70001 => Color(0XFF00BE13);
|
||||
|
||||
// LightGreen
|
||||
Color get lightGreen300 => Color(0XFFB2DF8A);
|
||||
Color get lightGreenA700 => Color(0XFF18FF14);
|
||||
|
||||
// Red
|
||||
Color get red200 => Color(0XFFE3A6A6);
|
||||
|
||||
// Teal
|
||||
Color get teal100 => Color(0XFFA6CEE3);
|
||||
Color get teal900 => Color(0XFF0B3F56);
|
||||
|
||||
// White
|
||||
Color get whiteA700 => Color(0XFFFFFFFF);
|
||||
}
|
||||
|
||||
PrimaryColors get appTheme => ThemeHelper().themeColor();
|
||||
|
||||
38
lib/widgets/app_bar/appbar_subtitle.dart
Normal file
38
lib/widgets/app_bar/appbar_subtitle.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppbarSubtitle extends StatelessWidget {
|
||||
AppbarSubtitle({
|
||||
Key? key,
|
||||
required this.text,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
String text;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
onTap!.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: Text(
|
||||
text,
|
||||
style: CustomTextStyles.titleMediumBlack.copyWith(
|
||||
color: appTheme.blue400,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
42
lib/widgets/app_bar/appbar_title_circleimage.dart
Normal file
42
lib/widgets/app_bar/appbar_title_circleimage.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppbarTitleCircleimage extends StatelessWidget {
|
||||
AppbarTitleCircleimage({
|
||||
Key? key,
|
||||
this.imagePath,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
String? imagePath;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadiusStyle.circleBorder8,
|
||||
onTap: () {
|
||||
onTap!.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 40.adaptSize,
|
||||
width: 40.adaptSize,
|
||||
fit: BoxFit.contain,
|
||||
radius: BorderRadius.circular(
|
||||
20.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
73
lib/widgets/custom_outlined_button.dart
Normal file
73
lib/widgets/custom_outlined_button.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/base_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomOutlinedButton extends BaseButton {
|
||||
CustomOutlinedButton({
|
||||
Key? key,
|
||||
this.decoration,
|
||||
this.leftIcon,
|
||||
this.rightIcon,
|
||||
this.label,
|
||||
VoidCallback? onPressed,
|
||||
ButtonStyle? buttonStyle,
|
||||
TextStyle? buttonTextStyle,
|
||||
bool? isDisabled,
|
||||
Alignment? alignment,
|
||||
double? height,
|
||||
double? width,
|
||||
EdgeInsets? margin,
|
||||
required String text,
|
||||
}) : super(
|
||||
text: text,
|
||||
onPressed: onPressed,
|
||||
buttonStyle: buttonStyle,
|
||||
isDisabled: isDisabled,
|
||||
buttonTextStyle: buttonTextStyle,
|
||||
height: height,
|
||||
alignment: alignment,
|
||||
width: width,
|
||||
margin: margin,
|
||||
);
|
||||
|
||||
final BoxDecoration? decoration;
|
||||
|
||||
final Widget? leftIcon;
|
||||
|
||||
final Widget? rightIcon;
|
||||
|
||||
final Widget? label;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return alignment != null
|
||||
? Align(
|
||||
alignment: alignment ?? Alignment.center,
|
||||
child: buildOutlinedButtonWidget,
|
||||
)
|
||||
: buildOutlinedButtonWidget;
|
||||
}
|
||||
|
||||
Widget get buildOutlinedButtonWidget => Container(
|
||||
height: this.height ?? 30.v,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
child: OutlinedButton(
|
||||
style: buttonStyle,
|
||||
onPressed: isDisabled ?? false ? null : onPressed ?? () {},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
leftIcon ?? const SizedBox.shrink(),
|
||||
Text(
|
||||
text,
|
||||
style: buttonTextStyle ?? CustomTextStyles.titleSmallBold,
|
||||
),
|
||||
rightIcon ?? const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user