wSearch method
Implementation
Widget wSearch() {
const border =
UnderlineInputBorder(borderSide: BorderSide(color: Colors.white));
const textStyle = TextStyle(color: Colors.white);
return Padding(
padding: const EdgeInsets.fromLTRB(12, 4, 12, 4),
child: TextField(
decoration: InputDecoration(
focusedBorder: border,
enabledBorder: border,
contentPadding: const EdgeInsets.fromLTRB(4, 8, 0, 8),
hintText: 'Key words',
hintStyle: textStyle,
prefix: const Padding(
padding: EdgeInsets.only(right: 16),
child: Text(
'搜索',
style: TextStyle(color: Colors.white),
textScaleFactor: 1.1,
),
),
suffixIcon: IconButton(
icon: const Icon(
Icons.search,
color: Colors.white,
),
onPressed: () {},
),
),
style: textStyle,
cursorColor: Colors.white,
autofocus: true,
),
);
}