forked from eatvio/eatvio_app
Settings screen (no layouts)
This commit is contained in:
@@ -123,4 +123,10 @@ final Map<String, String> ru = {
|
||||
"in_progress": "В процессе",
|
||||
"add_measure": "Добавить замер",
|
||||
"weight": "Вес",
|
||||
"plans_complete": "Пройденные планы",
|
||||
"my_settings": "Мои настройки",
|
||||
"profile": "Профиль",
|
||||
"chat": "Чат",
|
||||
"admin": "Админ",
|
||||
"diary": "Дневник",
|
||||
};
|
||||
|
||||
@@ -216,8 +216,11 @@ class MyProfileScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: NextStepButton(
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
text: "lbl4".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 10.h)))
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, AppRoutes.mySettings);
|
||||
},
|
||||
text: "my_settings".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 10.h))),
|
||||
]));
|
||||
}
|
||||
|
||||
@@ -641,7 +644,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: Text("msg".tr,
|
||||
child: Text("plans_complete".tr,
|
||||
style: CustomTextStyles.titleSmallBluegray800)),
|
||||
SizedBox(
|
||||
height: 95.v,
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
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_subtitle.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_bottom_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MySettingsScreen extends StatelessWidget {
|
||||
static Widget builder(BuildContext context) {
|
||||
return BlocProvider<MyProfileBloc>(
|
||||
create: (context) =>
|
||||
MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))
|
||||
..add(MyProfileInitialEvent()),
|
||||
child: MySettingsScreen());
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
mediaQueryData = MediaQuery.of(context);
|
||||
return BlocBuilder<MyProfileBloc, MyProfileState>(
|
||||
builder: (context, state) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: _buildAppBar(context, "my_settings".tr),
|
||||
body: Container(
|
||||
width: double.maxFinite,
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 8.h, vertical: 18.v),
|
||||
child: Column(children: [])),
|
||||
bottomNavigationBar: _buildBottomBar(context)));
|
||||
});
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
PreferredSizeWidget _buildAppBar(BuildContext context, String username) {
|
||||
return CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
onTap: () {
|
||||
onTapArrowLeft(context);
|
||||
}),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
child: Row(children: [
|
||||
AppbarSubtitle(
|
||||
text: username,
|
||||
margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v))
|
||||
])),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBottomBar(BuildContext context) {
|
||||
return CustomBottomBar(onChanged: (BottomBarEnum type) {});
|
||||
}
|
||||
|
||||
onTapArrowLeft(BuildContext context) {
|
||||
NavigatorService.goBack();
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import 'package:eatvio_app/presentation/registration/name_screen/name_screen.dar
|
||||
import 'package:eatvio_app/presentation/registration/app_navigation_screen/app_navigation_screen.dart';
|
||||
import 'package:eatvio_app/presentation/auth/auth_screen/auth_screen.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_profile_screen.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_settings_screen.dart';
|
||||
|
||||
class AppRoutes {
|
||||
// REGISTRATION
|
||||
@@ -66,6 +67,8 @@ class AppRoutes {
|
||||
//PROFILE
|
||||
static const String myProfile = '/myProfile';
|
||||
|
||||
static const String mySettings = '/mySettings';
|
||||
|
||||
static Map<String, WidgetBuilder> get routes => {
|
||||
dateOfBirthScreen: DateOfBirthScreen.builder,
|
||||
cityOfLivingScreen: CityOfLivingScreen.builder,
|
||||
@@ -87,5 +90,6 @@ class AppRoutes {
|
||||
appNavigationScreen: AppNavigationScreen.builder,
|
||||
initialRoute: SplashScreen.builder,
|
||||
myProfile: MyProfileScreen.builder,
|
||||
mySettings: MySettingsScreen.builder,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,37 +11,37 @@ class CustomBottomBar extends StatefulWidget {
|
||||
}
|
||||
|
||||
class CustomBottomBarState extends State<CustomBottomBar> {
|
||||
int selectedIndex = 0;
|
||||
int selectedIndex = 2;
|
||||
|
||||
List<BottomMenuModel> bottomMenuList = [
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNav,
|
||||
activeIcon: ImageConstant.imgNav,
|
||||
title: "lbl17".tr,
|
||||
title: "diary".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray400,
|
||||
activeIcon: ImageConstant.imgNavBlueGray400,
|
||||
title: "lbl18".tr,
|
||||
title: "my_blog".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray40024x23,
|
||||
activeIcon: ImageConstant.imgNavBlueGray40024x23,
|
||||
title: "lbl19".tr,
|
||||
title: "profile".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavPrimary,
|
||||
activeIcon: ImageConstant.imgNavPrimary,
|
||||
title: "lbl20".tr,
|
||||
title: "admin".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray40024x25,
|
||||
activeIcon: ImageConstant.imgNavBlueGray40024x25,
|
||||
title: "lbl21".tr,
|
||||
title: "chat".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
)
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user