index.dart 1.9KB

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