Compare commits
No commits in common. "dacf5461f3c782dca486cdd8da1f2c6a535bdbeb" and "ff1886cec17e7fecd22cfeb004d8d588b1cb7fd7" have entirely different histories.
dacf5461f3
...
ff1886cec1
Binary file not shown.
Before Width: | Height: | Size: 88 KiB |
|
@ -23,5 +23,4 @@ class PathAssets {
|
||||||
static const String imgKtpCropped = 'assets/images/img-ktp-cropped.png';
|
static const String imgKtpCropped = 'assets/images/img-ktp-cropped.png';
|
||||||
static const String imgKtpClear = 'assets/images/img-ktp-clear.png';
|
static const String imgKtpClear = 'assets/images/img-ktp-clear.png';
|
||||||
static const String imgKtpBlur = 'assets/images/img-ktp-blur.png';
|
static const String imgKtpBlur = 'assets/images/img-ktp-blur.png';
|
||||||
static const String imgSuccessSignup = 'assets/images/img-success-signup.png';
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,80 +55,78 @@ class ButtonView extends StatelessWidget {
|
||||||
final widthPrefix =
|
final widthPrefix =
|
||||||
this.widthPrefix ?? (heightWrapContent ? width! / 4.7 : _widthBtn / 16);
|
this.widthPrefix ?? (heightWrapContent ? width! / 4.7 : _widthBtn / 16);
|
||||||
|
|
||||||
return Center(
|
return Container(
|
||||||
child: Container(
|
margin: EdgeInsets.symmetric(vertical: marginVertical ?? 32.0),
|
||||||
margin: EdgeInsets.symmetric(vertical: marginVertical ?? 24.0),
|
width: width ?? _widthBtn,
|
||||||
width: width ?? _widthBtn,
|
height: heightWrapContent ? null : height ?? _heightBtn,
|
||||||
height: heightWrapContent ? null : height ?? _heightBtn,
|
child: ElevatedButton(
|
||||||
child: ElevatedButton(
|
style: ElevatedButton.styleFrom(
|
||||||
style: ElevatedButton.styleFrom(
|
disabledBackgroundColor: isOutlined ? Colors.white : color.surface,
|
||||||
disabledBackgroundColor: isOutlined ? Colors.white : color.surface,
|
padding: contentPadding,
|
||||||
padding: contentPadding,
|
backgroundColor: backgroundColor ??
|
||||||
backgroundColor: backgroundColor ??
|
(isOutlined
|
||||||
(isOutlined
|
? Colors.white
|
||||||
? Colors.white
|
: isSecondaryColor
|
||||||
: isSecondaryColor
|
? ColorPalette.grey
|
||||||
? ColorPalette.grey
|
: ColorPalette.primary),
|
||||||
: ColorPalette.primary),
|
elevation: 0,
|
||||||
elevation: 0,
|
shape: RoundedRectangleBorder(
|
||||||
shape: RoundedRectangleBorder(
|
borderRadius: BorderRadius.circular(sizeBorderRadius ?? 48),
|
||||||
borderRadius: BorderRadius.circular(sizeBorderRadius ?? 48),
|
side: isOutlined
|
||||||
side: isOutlined
|
? BorderSide(
|
||||||
? BorderSide(
|
color: disabled
|
||||||
color: disabled
|
? color.surface
|
||||||
? color.surface
|
: isSecondaryColor
|
||||||
: isSecondaryColor
|
? ColorPalette.greyBorder
|
||||||
? ColorPalette.greyBorder
|
: ColorPalette.primary,
|
||||||
: ColorPalette.primary,
|
)
|
||||||
)
|
: BorderSide.none,
|
||||||
: BorderSide.none,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onPressed: disabled ? null : onPressed,
|
),
|
||||||
child: Row(
|
onPressed: disabled ? null : onPressed,
|
||||||
mainAxisAlignment: mainAxisAlignmentContent ??
|
child: Row(
|
||||||
(prefixIcon != null
|
mainAxisAlignment: mainAxisAlignmentContent ??
|
||||||
? MainAxisAlignment.center
|
(prefixIcon != null
|
||||||
: suffixIcon != null
|
? MainAxisAlignment.center
|
||||||
? MainAxisAlignment.end
|
: suffixIcon != null
|
||||||
: MainAxisAlignment.center),
|
? MainAxisAlignment.end
|
||||||
children: [
|
: MainAxisAlignment.center),
|
||||||
if (prefixIcon != null) ...[
|
children: [
|
||||||
prefixIcon!,
|
if (prefixIcon != null) ...[
|
||||||
SizedBox(width: widthPrefix),
|
prefixIcon!,
|
||||||
] else
|
SizedBox(width: widthPrefix),
|
||||||
Container(),
|
] else
|
||||||
Flexible(
|
Container(),
|
||||||
child: Text(
|
Flexible(
|
||||||
name,
|
child: Text(
|
||||||
textAlign: TextAlign.center,
|
name,
|
||||||
maxLines: maxLines,
|
textAlign: TextAlign.center,
|
||||||
overflow: TextOverflow.ellipsis,
|
maxLines: maxLines,
|
||||||
style: TextStyle(
|
overflow: TextOverflow.ellipsis,
|
||||||
fontSize: textSize ?? 16,
|
style: TextStyle(
|
||||||
fontWeight: textWeight,
|
fontSize: textSize ?? 16,
|
||||||
color: textColor ??
|
fontWeight: textWeight,
|
||||||
(disabled && isOutlined
|
color: textColor ??
|
||||||
? color.primary
|
(disabled && isOutlined
|
||||||
: disabled
|
? color.primary
|
||||||
? Colors.white
|
: disabled
|
||||||
: isOutlined && isSecondaryColor
|
? Colors.white
|
||||||
? ColorPalette.blackFont
|
: isOutlined && isSecondaryColor
|
||||||
: isOutlined
|
? ColorPalette.blackFont
|
||||||
? color.primary
|
: isOutlined
|
||||||
: isSecondaryColor
|
? color.primary
|
||||||
? Colors.white
|
: isSecondaryColor
|
||||||
: Colors.white),
|
? Colors.white
|
||||||
),
|
: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (suffixIcon != null) ...[
|
),
|
||||||
SizedBox(width: widthSuffix),
|
if (suffixIcon != null) ...[
|
||||||
suffixIcon!
|
SizedBox(width: widthSuffix),
|
||||||
] else
|
suffixIcon!
|
||||||
Container()
|
] else
|
||||||
],
|
Container()
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,14 +3,10 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TextCaption extends StatelessWidget {
|
class TextCaption extends StatelessWidget {
|
||||||
final String title, subtitle;
|
final String title, subtitle;
|
||||||
final TextAlign? textAlignSubtitle;
|
|
||||||
final CrossAxisAlignment? crossAxisAlignment;
|
|
||||||
const TextCaption({
|
const TextCaption({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.title,
|
required this.title,
|
||||||
this.subtitle = '',
|
this.subtitle = '',
|
||||||
this.textAlignSubtitle,
|
|
||||||
this.crossAxisAlignment,
|
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -18,7 +14,7 @@ class TextCaption extends StatelessWidget {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 32.0),
|
padding: const EdgeInsets.only(bottom: 32.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: crossAxisAlignment ?? CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
|
@ -34,7 +30,6 @@ class TextCaption extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(top: 8.0),
|
padding: const EdgeInsets.only(top: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
subtitle,
|
subtitle,
|
||||||
textAlign: textAlignSubtitle ?? TextAlign.start,
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
|
@ -94,12 +94,12 @@ class TextFormView extends StatelessWidget {
|
||||||
name,
|
name,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
// color: ColorPalette.greyLight,
|
color: ColorPalette.greyLight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
suffixLable ??
|
suffixLable ??
|
||||||
const Text(
|
const Text(
|
||||||
"",
|
" * ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
class StringUtils {
|
|
||||||
static bool emailValidation(String email) {
|
|
||||||
return RegExp(
|
|
||||||
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
|
|
||||||
.hasMatch(email);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool phoneValidation(String phone) {
|
|
||||||
return RegExp(r'^(\+62|62|0)8[1-9][0-9]{6,10}$').hasMatch(phone);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool passwordValidation(String password) {
|
|
||||||
return RegExp(r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*?[\W_])(?=.{8,})')
|
|
||||||
.hasMatch(password);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,151 +0,0 @@
|
||||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
|
||||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
|
||||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
|
||||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
|
||||||
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
|
||||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
|
||||||
import 'package:cims_apps/core/route/route.dart';
|
|
||||||
import 'package:cims_apps/core/utils/size_config.dart';
|
|
||||||
import 'package:cims_apps/features/auth/registration/view/submission_data/submission_parent.dart';
|
|
||||||
import 'package:cims_apps/features/auth/registration/viewmodel/registration_viewmodel.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
class RegistrationPasswordView extends StatelessWidget {
|
|
||||||
const RegistrationPasswordView({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return ChangeNotifierProvider(
|
|
||||||
create: (context) => RegistrationViewModel(),
|
|
||||||
builder: (context, child) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
title: const Text('Sign Up'),
|
|
||||||
),
|
|
||||||
body: SingleChildScrollView(
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
|
||||||
child: Consumer<RegistrationViewModel>(
|
|
||||||
builder: (context, provider, child) {
|
|
||||||
return Form(
|
|
||||||
key: provider.formKey,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const TextCaption(
|
|
||||||
title: 'Create your password',
|
|
||||||
subtitle:
|
|
||||||
'The password you create serves as your login',
|
|
||||||
),
|
|
||||||
TextFormView(
|
|
||||||
name: 'Password',
|
|
||||||
hintText: 'Input password',
|
|
||||||
ctrl: provider.passwordCtrl,
|
|
||||||
obscureText: !provider.showPassword,
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Password must filled';
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
suffixIcon: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
provider.toggleVisibility();
|
|
||||||
},
|
|
||||||
child: Icon(
|
|
||||||
provider.showPassword
|
|
||||||
? Icons.visibility_off_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
color: ColorPalette.greyDarker,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 32.0,
|
|
||||||
),
|
|
||||||
TextFormView(
|
|
||||||
name: 'Confirm Password',
|
|
||||||
hintText: 'Input password',
|
|
||||||
ctrl: provider.confirmPasswordCtrl,
|
|
||||||
obscureText: !provider.showPasswordConfirm,
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Password must filled';
|
|
||||||
} else if (value != provider.passwordCtrl.text) {
|
|
||||||
return 'Password must be same';
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
suffixIcon: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
provider.toggleVisibilityConfirm();
|
|
||||||
},
|
|
||||||
child: Icon(
|
|
||||||
provider.showPasswordConfirm
|
|
||||||
? Icons.visibility_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
color: ColorPalette.greyDarker,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ButtonView(
|
|
||||||
name: 'Confirm',
|
|
||||||
onPressed: () {
|
|
||||||
if (provider.formKey.currentState!.validate()) {
|
|
||||||
routePush(context, page: const DialogSuccess());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class DialogSuccess extends StatelessWidget {
|
|
||||||
const DialogSuccess({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
body: Container(
|
|
||||||
padding: const EdgeInsets.all(24.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
ImageView(
|
|
||||||
image: PathAssets.imgSuccessSignup,
|
|
||||||
width: SizeConfig.width * .8,
|
|
||||||
),
|
|
||||||
const TextCaption(
|
|
||||||
title: 'Success',
|
|
||||||
subtitle:
|
|
||||||
'Congratulations, your account creation was successful!',
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
textAlignSubtitle: TextAlign.center,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: SizeConfig.height * .2,
|
|
||||||
),
|
|
||||||
ButtonView(
|
|
||||||
name: 'Next',
|
|
||||||
marginVertical: 8.0,
|
|
||||||
onPressed: () {
|
|
||||||
routePush(context,
|
|
||||||
page: const SubmissionParent(),
|
|
||||||
routeType: RouteType.pushReplace);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,7 +2,7 @@ import 'package:cims_apps/application/component/button/button_view.dart';
|
||||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
||||||
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
||||||
import 'package:cims_apps/core/route/route.dart';
|
import 'package:cims_apps/core/route/route.dart';
|
||||||
import 'package:cims_apps/features/auth/registration/view/registration_password_view.dart';
|
import 'package:cims_apps/features/auth/registration/view/initial_registration_step.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class RegistrationView extends StatelessWidget {
|
||||||
ButtonView(
|
ButtonView(
|
||||||
name: 'Next',
|
name: 'Next',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
routePush(context, page: const RegistrationPasswordView());
|
routePush(context, page: const InitialRegistrationStep());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||||
import 'package:cims_apps/core/route/route.dart';
|
|
||||||
import 'package:cims_apps/core/utils/size_config.dart';
|
import 'package:cims_apps/core/utils/size_config.dart';
|
||||||
import 'package:cims_apps/features/auth/registration/view/submission_data/initial_take_photo.dart';
|
import 'package:cims_apps/features/auth/registration/view/submission_data/initial_take_photo.dart';
|
||||||
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_email.dart';
|
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_email.dart';
|
||||||
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_personal_data.dart';
|
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_personal_data.dart';
|
||||||
import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart';
|
import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart';
|
||||||
import 'package:cims_apps/features/bottom_navigation_view.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -73,63 +71,53 @@ class _SubmissionParentState extends State<SubmissionParent> {
|
||||||
return ChangeNotifierProvider(
|
return ChangeNotifierProvider(
|
||||||
create: (context) => SubmissionDataViewModel(),
|
create: (context) => SubmissionDataViewModel(),
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
return WillPopScope(
|
return Scaffold(
|
||||||
onWillPop: () async {
|
appBar: AppBar(
|
||||||
await routePush(context,
|
title: const Text('Registration'),
|
||||||
page: const BottomNavigationView(),
|
),
|
||||||
routeType: RouteType.pushReplace);
|
body: Stack(
|
||||||
return false;
|
children: [
|
||||||
},
|
Consumer<SubmissionDataViewModel>(
|
||||||
child: Scaffold(
|
builder: (context, provider, child) {
|
||||||
appBar: AppBar(
|
return Column(
|
||||||
title: const Text('Registration'),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
body: Stack(
|
children: [
|
||||||
children: [
|
Padding(
|
||||||
Consumer<SubmissionDataViewModel>(
|
padding: const EdgeInsets.symmetric(
|
||||||
builder: (context, provider, child) {
|
horizontal: 16.0, vertical: 16.0),
|
||||||
return Column(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
children: List.generate(
|
||||||
children: [
|
provider.stepAmount,
|
||||||
Padding(
|
(index) => _stepItem(
|
||||||
padding: const EdgeInsets.symmetric(
|
isCurrentStep: provider.currentStep == index + 1,
|
||||||
horizontal: 16.0, vertical: 16.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: List.generate(
|
|
||||||
provider.stepAmount,
|
|
||||||
(index) => _stepItem(
|
|
||||||
isCurrentStep:
|
|
||||||
provider.currentStep == index + 1,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: Container(
|
Expanded(
|
||||||
padding:
|
child: Container(
|
||||||
const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
child: _content(provider.currentStep),
|
child: _content(provider.currentStep),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
provider.currentStep == 3
|
),
|
||||||
? const SizedBox()
|
provider.currentStep == 3
|
||||||
: Align(
|
? const SizedBox()
|
||||||
alignment: Alignment.bottomCenter,
|
: Align(
|
||||||
child: ButtonView(
|
alignment: Alignment.bottomCenter,
|
||||||
name: 'Next',
|
child: ButtonView(
|
||||||
marginVertical: 16.0,
|
name: 'Next',
|
||||||
onPressed: () {
|
marginVertical: 16.0,
|
||||||
provider.nextSubmission(context);
|
onPressed: () {
|
||||||
},
|
provider.nextSubmission(context);
|
||||||
),
|
},
|
||||||
)
|
),
|
||||||
],
|
)
|
||||||
);
|
],
|
||||||
}),
|
);
|
||||||
],
|
}),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class RegistrationViewModel extends ChangeNotifier {
|
|
||||||
TextEditingController passwordCtrl = TextEditingController();
|
|
||||||
TextEditingController confirmPasswordCtrl = TextEditingController();
|
|
||||||
var formKey = GlobalKey<FormState>();
|
|
||||||
bool showPassword = false;
|
|
||||||
bool showPasswordConfirm = false;
|
|
||||||
|
|
||||||
void toggleVisibility() {
|
|
||||||
showPassword = !showPassword;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
void toggleVisibilityConfirm() {
|
|
||||||
showPasswordConfirm = !showPasswordConfirm;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user