searchContainer method

Container searchContainer({
  1. FocusNode? focusNode,
})

Implementation

Container searchContainer({FocusNode? focusNode}) {
  return Container(
    height: 44,
    decoration: BoxDecoration(
      color: Colors.white,
      borderRadius: BorderRadius.circular(12.dp),
      border: Border.all(
        color: ColorHelper.headerDividerColor,
      ),
    ),
    child: TextFormField(
      focusNode: focusNode,
      textAlign: TextAlign.left,
      controller: controller.searchFlightsTextController,
      cursorColor: Colors.black,
      keyboardType: TextInputType.text,
      onFieldSubmitted: (query) {
        controller.search(query);
      },
      style: TextStyle(
        fontSize: 12.dp,
        fontWeight: FontWeight.w400,
        color: ColorHelper.black02,
      ),
      decoration: InputDecoration(
        contentPadding: EdgeInsets.fromLTRB(16.dp, 10.dp, 16.dp, 6.dp),
        hintText: 'Search',
        hintStyle: TextStyle(
          fontSize: 12.dp,
          fontWeight: FontWeight.w400,
          color: ColorHelper.neutralMediumText,
        ),
        border: const UnderlineInputBorder(
          borderSide: BorderSide.none,
        ),
        suffixIcon: IconButton(
          onPressed: () {
            controller.search(controller.searchFlightsTextController.text);
          },
          icon: Padding(
            padding: const EdgeInsets.only(right: 0),
            child: SvgPicture.asset(
              'assets/myflights/ic_search.svg',
              width: 16.dp,
              height: 16.dp,
              colorFilter: const ColorFilter.mode(
                ColorHelper.neutralLightText,
                BlendMode.srcIn,
              ),
            ),
          ),
        ),
      ),
    ),
  );
}