passwordTextField method

Stack passwordTextField()

Implementation

Stack passwordTextField() {
  return Stack(
    children: [
      Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(15),
          border: Border.all(
            color: ColorHelper.grey02_2,
            width: 1,
          ),
        ),
        padding: const EdgeInsets.fromLTRB(16, 2, 16, 2),
        margin: const EdgeInsets.only(top: 10),
        child: TextField(
          controller: controller.signInPassTxtController,
          obscureText: controller.signIn_obscurePassText.value,
          keyboardType: TextInputType.text,
          autofillHints: const [AutofillHints.password],
          textInputAction: TextInputAction.go,
          onSubmitted: (value) {
            try {
              TextInput.finishAutofillContext();
            } catch (e) {
              log('Error auto filling ${e.toString()}');
            }
            controller.logIn();
          },
          style: TextStyle(
            fontSize: 16,
            fontWeight: FontWeight.w400,
            color: ColorHelper.neutralMediumText,
          ),
          decoration: InputDecoration(
            hintText: '*****************',
            hintStyle: TextStyle(
              fontSize: 16,
              fontWeight: FontWeight.w400,
              color: ColorHelper.neutralMediumText,
            ),
            contentPadding: const EdgeInsets.symmetric(vertical: 16.0),
            border: InputBorder.none,
            suffixIcon:
             IconButton(
              icon: Icon(
                controller.signIn_obscurePassText.value
                    ? CupertinoIcons.eye_slash
                    : CupertinoIcons.eye,
                size: 20.0,
                color: ColorHelper.grey05,
              ),
              onPressed: () {
                controller.signIn_obscurePassText.value =
                    !controller.signIn_obscurePassText.value;
              },
            )
          ),
        ),
      ),
      Positioned(
        left: 24,
        top: -2,
        child: Container(
          padding: const EdgeInsets.symmetric(horizontal: 4),
          color: Colors.white,
          child: Row(
            children: [
              Text(
                'Password',
                style: TextStyle(
                  fontSize: 11.dp,
                  color: ColorHelper.grey05,
                ),
              ),
              Text(
                ' *',
                style: TextStyle(
                  fontSize: 11.dp,
                  color: ColorHelper.primaryColor2,
                ),
              ),
            ],
          ),
        ),
      ),
    ],
  );
}