add registration password page
This commit is contained in:
@@ -23,4 +23,5 @@ class PathAssets {
|
||||
static const String imgKtpCropped = 'assets/images/img-ktp-cropped.png';
|
||||
static const String imgKtpClear = 'assets/images/img-ktp-clear.png';
|
||||
static const String imgKtpBlur = 'assets/images/img-ktp-blur.png';
|
||||
static const String imgSuccessSignup = 'assets/images/img-success-signup.png';
|
||||
}
|
||||
|
||||
@@ -55,78 +55,80 @@ class ButtonView extends StatelessWidget {
|
||||
final widthPrefix =
|
||||
this.widthPrefix ?? (heightWrapContent ? width! / 4.7 : _widthBtn / 16);
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(vertical: marginVertical ?? 32.0),
|
||||
width: width ?? _widthBtn,
|
||||
height: heightWrapContent ? null : height ?? _heightBtn,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
disabledBackgroundColor: isOutlined ? Colors.white : color.surface,
|
||||
padding: contentPadding,
|
||||
backgroundColor: backgroundColor ??
|
||||
(isOutlined
|
||||
? Colors.white
|
||||
: isSecondaryColor
|
||||
? ColorPalette.grey
|
||||
: ColorPalette.primary),
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(sizeBorderRadius ?? 48),
|
||||
side: isOutlined
|
||||
? BorderSide(
|
||||
color: disabled
|
||||
? color.surface
|
||||
: isSecondaryColor
|
||||
? ColorPalette.greyBorder
|
||||
: ColorPalette.primary,
|
||||
)
|
||||
: BorderSide.none,
|
||||
return Center(
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: marginVertical ?? 24.0),
|
||||
width: width ?? _widthBtn,
|
||||
height: heightWrapContent ? null : height ?? _heightBtn,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
disabledBackgroundColor: isOutlined ? Colors.white : color.surface,
|
||||
padding: contentPadding,
|
||||
backgroundColor: backgroundColor ??
|
||||
(isOutlined
|
||||
? Colors.white
|
||||
: isSecondaryColor
|
||||
? ColorPalette.grey
|
||||
: ColorPalette.primary),
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(sizeBorderRadius ?? 48),
|
||||
side: isOutlined
|
||||
? BorderSide(
|
||||
color: disabled
|
||||
? color.surface
|
||||
: isSecondaryColor
|
||||
? ColorPalette.greyBorder
|
||||
: ColorPalette.primary,
|
||||
)
|
||||
: BorderSide.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
onPressed: disabled ? null : onPressed,
|
||||
child: Row(
|
||||
mainAxisAlignment: mainAxisAlignmentContent ??
|
||||
(prefixIcon != null
|
||||
? MainAxisAlignment.center
|
||||
: suffixIcon != null
|
||||
? MainAxisAlignment.end
|
||||
: MainAxisAlignment.center),
|
||||
children: [
|
||||
if (prefixIcon != null) ...[
|
||||
prefixIcon!,
|
||||
SizedBox(width: widthPrefix),
|
||||
] else
|
||||
Container(),
|
||||
Flexible(
|
||||
child: Text(
|
||||
name,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: maxLines,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: textSize ?? 16,
|
||||
fontWeight: textWeight,
|
||||
color: textColor ??
|
||||
(disabled && isOutlined
|
||||
? color.primary
|
||||
: disabled
|
||||
? Colors.white
|
||||
: isOutlined && isSecondaryColor
|
||||
? ColorPalette.blackFont
|
||||
: isOutlined
|
||||
? color.primary
|
||||
: isSecondaryColor
|
||||
? Colors.white
|
||||
: Colors.white),
|
||||
onPressed: disabled ? null : onPressed,
|
||||
child: Row(
|
||||
mainAxisAlignment: mainAxisAlignmentContent ??
|
||||
(prefixIcon != null
|
||||
? MainAxisAlignment.center
|
||||
: suffixIcon != null
|
||||
? MainAxisAlignment.end
|
||||
: MainAxisAlignment.center),
|
||||
children: [
|
||||
if (prefixIcon != null) ...[
|
||||
prefixIcon!,
|
||||
SizedBox(width: widthPrefix),
|
||||
] else
|
||||
Container(),
|
||||
Flexible(
|
||||
child: Text(
|
||||
name,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: maxLines,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: textSize ?? 16,
|
||||
fontWeight: textWeight,
|
||||
color: textColor ??
|
||||
(disabled && isOutlined
|
||||
? color.primary
|
||||
: disabled
|
||||
? Colors.white
|
||||
: isOutlined && isSecondaryColor
|
||||
? ColorPalette.blackFont
|
||||
: isOutlined
|
||||
? color.primary
|
||||
: isSecondaryColor
|
||||
? Colors.white
|
||||
: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (suffixIcon != null) ...[
|
||||
SizedBox(width: widthSuffix),
|
||||
suffixIcon!
|
||||
] else
|
||||
Container()
|
||||
],
|
||||
if (suffixIcon != null) ...[
|
||||
SizedBox(width: widthSuffix),
|
||||
suffixIcon!
|
||||
] else
|
||||
Container()
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user