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,
onChanged: (value) {
if (value.isEmpty) {
controller.searchBookings('');
}
},
onFieldSubmitted: (value) {
controller.searchBookings(value);
},
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 by Name or Email',
hintStyle: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: ColorHelper.neutralText,
),
border: const UnderlineInputBorder(
borderSide: BorderSide.none,
),
suffixIconConstraints: BoxConstraints(maxWidth: 25.dp),
suffixIcon: GestureDetector(
onTap: () =>
controller.searchBookings(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,
),
),
),
),
),
);
}