SearchBar constructor

const SearchBar({
  1. Key? key,
  2. double height = 46,
  3. Color? backgroundColor,
  4. double underlineHeight = 0,
  5. Color underlineColor = const Color(0xFFeeeeee),
  6. bool visibilityUnderline = false,
  7. double borderWidth = 1,
  8. Color borderColor = const Color(0xffe5e5e5),
  9. Color color = const Color(0xffffffff),
  10. EdgeInsetsGeometry margin = const EdgeInsets.only(left: 20, top: 4, right: 20, bottom: 6),
  11. double borderRadius = 4,
  12. double textFontSize = 14.0,
  13. Color textColor = const Color(0xff1A1A1A),
  14. String hint = "点击这里开始搜索吧",
  15. Icon searchIcon = const Icon(Icons.search, color: Color(0xffA6A6A6)),
  16. SearchBarClick? click,
})

Implementation

const SearchBar(
    {Key? key,
    this.height = 46,
    this.backgroundColor,
    this.underlineHeight = 0,
    this.underlineColor = const Color(0xFFeeeeee),
    this.visibilityUnderline = false,
    this.borderWidth = 1,
    this.borderColor = const Color(0xffe5e5e5),
    this.color = const Color(0xffffffff),
    this.margin = const EdgeInsets.only(left: 20, top: 4, right: 20, bottom: 6),
    this.borderRadius = 4,
    this.textFontSize = 14.0,
    this.textColor = const Color(0xff1A1A1A),
    this.hint = "点击这里开始搜索吧",
    this.searchIcon = const Icon(
      Icons.search,
      color: Color(0xffA6A6A6),
    ),
    this.click})
    : super(key: key);