How to Set Hide and UnHide Password icon on SuffixIcon on TextformField ?

 suffixIcon: controller.isHidePassword
                           ? IconButton(
                               onPressed: () {
                                 controller.showOrHidePassword(false);
                               },
                               icon: const Icon(
                                 Icons.visibility_off,
                                 color: AppColors.appIconColor,
                                 size: 25,
                               ),
                             )
                           : IconButton(
                               onPressed: () {
                                 controller.showOrHidePassword(true);
                               },
                               icon: const Icon(
                                 Icons.visibility,
                                 color: AppColors.appIconColor,
                                 size: 25,
                               ),
                             ),
                     ),


Comments

Popular Posts