dateField function

Row dateField(
  1. TextEditingController textController,
  2. String hintText,
  3. bool isEnabled,
  4. String img,
)

Implementation

Row dateField(TextEditingController textController, String hintText,
    bool isEnabled, String img) {
  return Row(
    children: [
      Expanded(
        child: TextField(
          enabled: isEnabled,
          controller: textController,
          style: TextStyle(
            fontSize: 14.dp,
            fontWeight: FontWeight.w500,
            color: ColorHelper.neutralDark,
          ),
          decoration: InputDecoration(
            isCollapsed: true,
            border: InputBorder.none,
            disabledBorder: InputBorder.none,
            enabledBorder: InputBorder.none,
            focusedBorder: InputBorder.none,
            hintText: hintText,
            hintStyle: TextStyle(
              fontSize: 16.dp,
              fontWeight: FontWeight.w400,
              color: ColorHelper.neutralLightText,
            ),
          ),
        ),
      ),
      img.isNotEmpty
          ? Image.asset(
              'assets/home/$img.png',
              width: 20,
            )
          : const SizedBox.shrink(),
    ],
  );
}