visibilityToggle function

Widget visibilityToggle(
  1. Function? onToggle,
  2. bool isHidden
)

Functions

Implementation

Widget visibilityToggle(Function? onToggle, bool isHidden) {
  return InkWell(
    onTap: onToggle != null ? () => onToggle() : null,
    child: Icon(isHidden ? Icons.visibility : Icons.visibility_off,
        color: primary),
  );
}