email added to profile view adnd custom text field changes
This commit is contained in:
parent
cd83375b98
commit
17c100a035
|
|
@ -4,23 +4,26 @@ import 'package:get/get.dart';
|
|||
|
||||
class SignInScreenController extends GetxController {
|
||||
final GlobalKey<ScaffoldState> screenKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
// final emailController = TextEditingController(text: "");
|
||||
// final passwordController = TextEditingController(text: "");
|
||||
final emailController = TextEditingController(text: "ashu@gmail.com");
|
||||
final passwordController = TextEditingController(text: "Abc@1234");
|
||||
final emailController = TextEditingController(text: "jack.davis@gmail.com");
|
||||
final passwordController = TextEditingController(text: "abc@1234");
|
||||
final emailErrorMsg = "".obs, passwordErrorMsg = "".obs;
|
||||
|
||||
// final isRememberMe = false.obs;
|
||||
final isLoading = false.obs;
|
||||
final obsecure = true.obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
emailController.text =
|
||||
LocalStorageManager.getSessionToken(tokenKey: LocalStorageKeys.kSaveEmailKey);
|
||||
emailController.text = LocalStorageManager.getSessionToken(
|
||||
tokenKey: LocalStorageKeys.kSaveEmailKey);
|
||||
// isRememberMe.value = _sessionManagement
|
||||
// .getSessionToken(tokenKey: SessionKeys.kRememberMeKey)
|
||||
// .toLowerCase() ==
|
||||
// "true";
|
||||
emailController.text = 'ashu@gmail.com';
|
||||
emailController.text = 'jack.davis@gmail.com';
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@ class CustomTextFieldWidget extends StatelessWidget {
|
|||
final ValueChanged<String>? onChange;
|
||||
final bool isEnabled;
|
||||
final bool isObscure;
|
||||
final Widget? suffix;
|
||||
final BorderRadius? borderRadius;
|
||||
final Color? borderColor;
|
||||
final Color? disabledColor;
|
||||
final double? borderWidth;
|
||||
final Widget? bottomChild;
|
||||
final TextInputType? inputType;
|
||||
|
|
@ -33,17 +35,21 @@ class CustomTextFieldWidget extends StatelessWidget {
|
|||
this.isObscure = false,
|
||||
this.borderRadius,
|
||||
this.borderColor,
|
||||
this.disabledColor,
|
||||
this.borderWidth = 1.0,
|
||||
this.bottomChild,
|
||||
this.textCapitalization,
|
||||
this.inputType,
|
||||
this.inputFormatters,
|
||||
this.inputFormatters, this.suffix,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isEnabled
|
||||
? Colors.white
|
||||
: disabledColor ?? CustomAppColors.kSmokeColor.withOpacity(0.5),
|
||||
borderRadius: borderRadius,
|
||||
border: Border.all(
|
||||
color: borderColor ?? CustomAppColors.kSmokeColor,
|
||||
|
|
@ -54,24 +60,19 @@ class CustomTextFieldWidget extends StatelessWidget {
|
|||
vertical: 10.h,
|
||||
horizontal: 15.w,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// CustomTextWidget(
|
||||
// text: heading,
|
||||
// fontSize: 10.sp,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontColor: CustomAppColors.kLightTextColor,
|
||||
// alignment: Alignment.centerLeft,
|
||||
// textAlign: TextAlign.left,
|
||||
// ),
|
||||
Text(
|
||||
heading,
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: CustomAppColors.kLightTextColor,
|
||||
),
|
||||
|
|
@ -125,6 +126,10 @@ class CustomTextFieldWidget extends StatelessWidget {
|
|||
if (bottomChild != null) bottomChild!,
|
||||
],
|
||||
),
|
||||
),
|
||||
suffix ?? const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
|
@ -36,52 +37,62 @@ class _SignInScreenState extends State<SignInScreen> {
|
|||
height: 132.h,
|
||||
width: 203.w,
|
||||
),
|
||||
|
||||
CustomTextWidget(
|
||||
text: ConstantText.kWelcomeBack,
|
||||
fontColor: CustomAppColors.kIconColor,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 24.sp,
|
||||
),
|
||||
|
||||
CustomTextWidget(
|
||||
text: ConstantText.kPleaseLoginToContinue,
|
||||
fontColor: CustomAppColors.kIconColor,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 30.0.h),
|
||||
child: CustomTextFieldWidget(
|
||||
controller: _controller.emailController,
|
||||
hintText: ConstantText.kPleaseInputEmail,
|
||||
heading: ConstantText.kEmailHeading,
|
||||
onChange: (_){
|
||||
onChange: (_) {
|
||||
_controller.validateEmail();
|
||||
},
|
||||
),
|
||||
),
|
||||
Obx((){
|
||||
Obx(() {
|
||||
return CustomErrorMsg(
|
||||
message: _controller.emailErrorMsg.value,
|
||||
);
|
||||
}),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 15.0.h),
|
||||
child: CustomTextFieldWidget(
|
||||
child: Obx(() {
|
||||
return CustomTextFieldWidget(
|
||||
controller: _controller.passwordController,
|
||||
hintText: "******",
|
||||
heading: ConstantText.kPasswordHeading,
|
||||
onChange: (_){
|
||||
onChange: (_) {
|
||||
_controller.validatePassword();
|
||||
},
|
||||
isObscure: true,
|
||||
isObscure: _controller.obsecure(),
|
||||
maxLines: 1,
|
||||
suffix: IconButton(
|
||||
onPressed: _controller.obsecure.toggle,
|
||||
icon: Icon(
|
||||
_controller.obsecure.isTrue
|
||||
? CupertinoIcons.eye_slash
|
||||
: CupertinoIcons.eye,
|
||||
color: _controller.obsecure.isTrue
|
||||
? CustomAppColors.kLightGreyColor
|
||||
: Get.theme.colorScheme.primary,
|
||||
size: 24.r,
|
||||
),
|
||||
),
|
||||
Obx((){
|
||||
);
|
||||
}),
|
||||
),
|
||||
Obx(() {
|
||||
return CustomErrorMsg(
|
||||
message: _controller.passwordErrorMsg.value,
|
||||
);
|
||||
|
|
@ -119,10 +130,9 @@ class _SignInScreenState extends State<SignInScreen> {
|
|||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 8.0.h),
|
||||
child: Obx((){
|
||||
child: Obx(() {
|
||||
return CustomAppButton(
|
||||
isLoading: _controller.isLoading.value,
|
||||
buttonText: ConstantText.kLogIn.toUpperCase(),
|
||||
|
|
@ -151,7 +161,6 @@ class _SignInScreenState extends State<SignInScreen> {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
|
|
|
|||
|
|
@ -33,31 +33,31 @@ class _ClientProfileScreenState extends State<ClientProfileScreen> {
|
|||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
showAppBar: false,
|
||||
appBar: CustomAppBar(
|
||||
leadingButton: Container(),
|
||||
showBoxShadow: false,
|
||||
titleWidget: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () => controller.backButtonPressed(context),
|
||||
child: CustomImageWidget(
|
||||
imagePath: AssetsManager.kBackIcon,
|
||||
height: 11.53.h,
|
||||
width: 8.66.w,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 15,
|
||||
),
|
||||
CustomTextWidget(
|
||||
text: 'Client: ${controller.serviceUser()?.displayName ?? ""}',
|
||||
isExpanded: false,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontColor: CustomAppColors.kDarkBlueTextColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
// appBar: CustomAppBar(
|
||||
// leadingButton: Container(),
|
||||
// showBoxShadow: false,
|
||||
// titleWidget: Row(
|
||||
// children: [
|
||||
// InkWell(
|
||||
// onTap: () => controller.backButtonPressed(context),
|
||||
// child: CustomImageWidget(
|
||||
// imagePath: AssetsManager.kBackIcon,
|
||||
// height: 11.53.h,
|
||||
// width: 8.66.w,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 15,
|
||||
// ),
|
||||
// CustomTextWidget(
|
||||
// text: 'Client: ${controller.serviceUser()?.displayName ?? ""}',
|
||||
// isExpanded: false,
|
||||
// fontSize: 16.sp,
|
||||
// fontWeight: FontWeight.w700,
|
||||
// fontColor: CustomAppColors.kDarkBlueTextColor),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
body: Obx(() {
|
||||
if (controller.serviceUser() == null) {
|
||||
return FrequentFunctions.centerText(text: "User detail not found");
|
||||
|
|
@ -84,6 +84,11 @@ class _ClientProfileScreenState extends State<ClientProfileScreen> {
|
|||
text: detail.displayName,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
CustomTextWidget(
|
||||
text: detail.email ?? "",
|
||||
fontSize: 12.sp,
|
||||
fontColor: Colors.grey,
|
||||
fontWeight: FontWeight.w400),
|
||||
16.verticalSpace,
|
||||
BuildDetailRow(
|
||||
title: 'Contact Number',
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import '../models/clients/HealthIssuesDetailsModel.dart';
|
|||
import '../models/clients/allClientsList/AllClientsResponse.dart';
|
||||
import '../models/clients/documents_list_model.dart';
|
||||
import '../models/create_care_plan_request.dart';
|
||||
import '../models/profile_screen_model.dart';
|
||||
|
||||
class ClientService {
|
||||
static final ClientService _instance = ClientService._private();
|
||||
|
|
|
|||
Reference in New Issue