searchContainer method
Implementation
Container searchContainer() {
return Container(
// height: 40,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.dp),
border: Border.all(
color: ColorHelper.blueTint,
),
),
child: TextFormField(
controller: controller.searchTextController,
cursorColor: Colors.black,
keyboardType: TextInputType.text,
onFieldSubmitted: (query) {
controller.search(query);
},
onChanged: (query) {
if (query.isEmpty) {
controller.search('');
}
},
style: TextStyle(
fontSize: 12.dp,
fontWeight: FontWeight.w400,
color: ColorHelper.black02,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.fromLTRB(16.dp, 12.dp, 16.dp, 12.dp),
hintText: 'Search',
hintStyle: TextStyle(
fontSize: 12.dp,
fontWeight: FontWeight.w400,
color: ColorHelper.neutralMediumText,
),
border: const UnderlineInputBorder(
borderSide: BorderSide.none,
),
suffixIconConstraints: BoxConstraints(maxWidth: 25.dp),
suffixIcon: GestureDetector(
onTap: () {
controller.search(controller.searchTextController.text);
},
child: Padding(
padding: const EdgeInsets.only(right: 10),
child: SvgPicture.asset(
'assets/requests/ic_search.svg',
width: 16.dp,
height: 16.dp,
),
),
),
),
),
);
}