import 'package:farmer_client/widgets/NullCard.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../widgets/CarsCard.dart';

class SearchPage extends StatefulWidget {
  const SearchPage({Key? key}) : super(key: key);

  @override
  State<SearchPage> createState() => _SearchPage();
}

class _SearchPage extends State<SearchPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: false,
      appBar: AppBar(
        elevation: 0,
        centerTitle: true,
        backgroundColor: Colors.white,
        title: Text(
          '搜索',
          style: TextStyle(
              color: Colors.black,
              fontSize: 17.sp,
              letterSpacing: 2,
              fontWeight: FontWeight.bold),
        ),
      ),
      body: Container(
          decoration: const BoxDecoration(
            color: Colors.white,
          ),
          child: ListView(children: [
            Container(
              width: 345.w,
              height: 34.h,
              margin: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.w),
              padding: EdgeInsets.symmetric(vertical: 0, horizontal: 10.w),
              decoration: BoxDecoration(
                  color: Color(0xFFf8f8f8),
                  borderRadius: BorderRadius.all(Radius.circular(17.w))),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Image.asset(
                    'images/icons/search.png',
                    width: 15.w,
                    height: 15.w,
                  ),
                  Container(
                    width: 300.w,
                    margin: EdgeInsets.fromLTRB(5.w, 0, 0, 0),
                    child: TextField(
                      style: TextStyle(fontSize: 14.sp),
                      decoration: const InputDecoration(
                        isCollapsed: true,
                        hintText: '搜索关键字查询',
                        border: InputBorder.none,
                        counterText: '', //去掉计数
                        floatingLabelBehavior: FloatingLabelBehavior.never,
                      ),
                      onChanged: (e) {
                        print(999);
                        setState(() {});
                      },
                    ),
                  ),
                ],
              ),
            ),
            Container(
              child: Column(
                children: [
                  // NullCard(text: '暂无农机信息'),
                ],
              ),
            )
          ])),
    );
  }
}