index.jsx.dart 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import 'package:farmer_client/widgets/layout/BasicPage.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. class SearchPage extends BasicPage {
  5. @override
  6. Widget builder(BuildContext context) {
  7. naviTitle = '搜索';
  8. return Container(
  9. decoration: const BoxDecoration(
  10. color: Colors.white,
  11. ),
  12. child: ListView(children: [
  13. Container(
  14. width: 345.w,
  15. height: 34.h,
  16. margin: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.w),
  17. padding: EdgeInsets.symmetric(vertical: 0, horizontal: 10.w),
  18. decoration: BoxDecoration(
  19. color: Color(0xFFf8f8f8),
  20. borderRadius: BorderRadius.all(Radius.circular(17.w))),
  21. child: Row(
  22. mainAxisAlignment: MainAxisAlignment.center,
  23. children: [
  24. Image.asset(
  25. 'images/icons/search.png',
  26. width: 15.w,
  27. height: 15.w,
  28. ),
  29. Container(
  30. width: 300.w,
  31. margin: EdgeInsets.fromLTRB(5.w, 0, 0, 0),
  32. child: TextField(
  33. style: TextStyle(fontSize: 14.sp),
  34. decoration: const InputDecoration(
  35. isCollapsed: true,
  36. hintText: '搜索关键字查询',
  37. border: InputBorder.none,
  38. counterText: '', //去掉计数
  39. floatingLabelBehavior: FloatingLabelBehavior.never,
  40. ),
  41. onChanged: (e) {
  42. print(999);
  43. },
  44. ),
  45. ),
  46. ],
  47. ),
  48. ),
  49. Container(
  50. child: Column(
  51. children: [
  52. // NullCard(text: '暂无农机信息'),
  53. ],
  54. ),
  55. )
  56. ]));
  57. }
  58. }