forked from eatvio/eatvio_app
Settings screen (no layouts)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user