123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- 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: '暂无农机信息'),
- CarsCard(),
- CarsCard(),
- CarsCard(),
- CarsCard(),
- ],
- ),
- )
- ])),
- );
- }
- }
|